New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@init-computer/cli

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@init-computer/cli

Init is a programmable backend platform. Use the official CLI to generate, deploy, and run backend endpoints from your terminal.

latest
npmnpm
Version
0.1.7
Version published
Weekly downloads
37
-94.98%
Maintainers
1
Weekly downloads
 
Created
Source

Init CLI Overview

Get started

Install Authenticate Quickstart

Guides

Generate an endpoint Run an endpoint Edit an endpoint Projects Use with AI agents Send files Manage resources

Reference

Commands Global options Environment variables Output Errors

Init CLI

Generate, deploy, and run backend endpoints from your terminal.

Init is a programmable backend platform. Describe the capability you need, and Init creates and operates the API, data, storage, and runtime behind it.

The init command brings that to terminal workflows, scripts, CI jobs, and local debugging. Use it to deploy endpoints, run them, edit versions, manage resources, and hand your backend to other AI agents.

Requires Node.js 18 or later. More at init.computer.

Install

npm install -g @init-computer/cli

Authenticate

Create an account at init.computer to get an API key, then log in:

init login --api-key init_sk_...

Or run init login with no flag to paste the key interactively.

Check or clear your session:

init auth status
init logout

The CLI saves credentials to ~/.init/config.json. Treat that file like a secret.

CI, scripts, and servers

Set INIT_API_KEY instead of logging in:

export INIT_API_KEY=init_sk_...

For local development, the CLI also reads INIT_API_KEY from a .env file in the current directory. It checks an explicit flag first, then the process environment, then .env. It reads that one key only and never uploads, lists, or syncs .env files.

Quickstart

From a prompt to a live, callable endpoint in three steps.

  • Generate an endpoint from a prompt.
  • Save the resourceId and route from the response.
  • Call the endpoint with init run.
init generate "Create a lead enrichment API. Input: companyName, website, targetPersona. Output: companySummary, buyingSignals, nextSteps. Return structured JSON only."

init run abc123 \
  --data companyName=Snowflake \
  --data website=https://www.snowflake.com \
  --data targetPersona="VP Sales"

Generate an endpoint

init generate creates a deployed backend endpoint from a prompt.

init generate "Create a lead enrichment API. Input fields: companyName, website, targetPersona. Output fields: companySummary, buyingSignals, recommendedPersonas, nextSteps. Research the company and return structured JSON only."

For long prompts, pass a JSON request body:

init generate --body request.json
{
  "prompt": "Create a lead enrichment API for B2B sales teams. Input fields: companyName string required, website url required, targetPersona string optional. Output fields: companySummary string, buyingSignals array with title evidence urgency, recommendedPersonas array with role reason outreachAngle, nextSteps array of strings. Store each generated brief and return structured JSON only.",
  "projects": ["Sales"]
}

What you get back

FieldUse it to
url, routeRun the deployed endpoint
resourceIdInspect, edit, organize, or version the endpoint
versionIdIdentify this version of the endpoint
Input and output schemaSee what the endpoint accepts and returns
Generated pipelineSee the steps the endpoint runs

Save the resourceId if you plan to change the endpoint later.

Run an endpoint

init run calls a generated endpoint. Use the route or full url, not the resourceId.

By route

init run abc123 --data companyName=Snowflake --data website=https://www.snowflake.com --data targetPersona="VP Sales"

By URL

init run https://api.init.computer/v1/abc123 --body input.json

From stdin

cat input.json | init run abc123 --body -

Edit an endpoint

Pass the endpoint's resourceId to init generate. Init keeps the same resource and creates a new version.

init generate "Keep the same behavior, but add csv and confidenceScore outputs." --resource-id resource_uuid

Projects

A project is a suite of related endpoints. You can create and edit the whole suite from a prompt, instead of building one endpoint at a time.

Create a suite

init project generate "Build ticket intake and status lookup" --name "Customer Support"

Edit a suite

init project edit <project-id> "Add ticket assignment"

You can also add a single endpoint to a project when you generate it, with the projects field in the request body (see Generate an endpoint).

Use with AI agents

Init creates an init.json specification for what you build. It describes your backend's endpoints in a form other AI agents can read, so an agent can find your endpoints and call them without a hand-written integration.

To let an agent use your backend:

  • Generate your endpoints or project.
  • Give the agent your init.json.
  • The agent calls your endpoints with your API key.

Agents call your deployed endpoints with an API key. Use a key you can revoke, and keep it out of prompts and shared files.

Send files

Endpoints that need uploads accept files with --file:

init run quarterly-report-reader \
  --file file=report.pdf \
  --data summaryStyle=executive

To send multipart input from a request file:

init run quarterly-report-reader --body multipart-request.json

Manage resources

A resource is an API you have generated.

init resources
init resources --q lead --status enabled
init resource resource_uuid
init resource resource_uuid versions
init resource resource_uuid activate version_uuid
init resource resource_uuid update --body patch.json

Example patch.json:

{
  "name": "Lead Enrichment",
  "status": "enabled"
}

Commands

CommandWhat it does
init loginSave an API key (--api-key or interactive)
init logoutClear saved credentials
init auth statusShow current authentication
init generateCreate an endpoint, or a new version with --resource-id
init runCall an endpoint by route or URL
init resourcesList endpoints; filter with --q and --status
init resourceInspect one endpoint; subcommands versions, activate, update
init project generateGenerate a project suite
init project editExtend an existing project

Run flags

FlagPurpose
--data key=valueSet an input field. Repeat for more fields.
--file field=pathUpload a file for an input field
--body <path|->Send a JSON or multipart body from a file, or stdin with -

Global options

OptionPurpose
--api-key <key>Use an API key without saving it
--base-url <url>API origin. Defaults to https://api.init.computer
--jsonPrint compact JSON
--prettyPrint pretty JSON

Environment variables

VariablePurpose
INIT_API_KEYAPI key for CI or server use
INIT_API_BASE_URLAPI origin override
INIT_CONFIG_DIRWhere credentials are saved. Defaults to ~/.init

Output

The CLI prints pretty JSON by default. Use --json for compact output in scripts:

init resources --json

Errors

Failed requests print JSON with success: false, error, and status.

StatusMeaningWhat to do
402Plan limit reachedUpgrade your plan or enable overages
429Too many concurrent requestsRetry after current runs finish
500Internal server error. The public response is intentionally broad.Retry; contact support if it persists
503Init is temporarily unavailableRetry shortly

Keep repository init.json current

Run this from a repository root to create a project and write its canonical contract into that repository:

init project apply . "Build customer ticket intake and a ticket status endpoint" --name "Customer support"

When init.json exists, Init reads project.id, applies the requested edit to that same project, then writes the updated contract back to the same file:

init project apply ./init.json "Add ticket assignment and include the assigned team in status results"

The CLI reads only INIT_API_KEY from the local process environment or local .env; it never uploads .env contents. An explicit --api-key takes precedence.

FAQs

Package last updated on 01 Oct 2026

Related posts