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.

npmnpm
Version
0.1.5
Version published
Weekly downloads
21
-97.25%
Maintainers
1
Weekly downloads
 
Created
Source

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 "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"]
}

The response includes url, route, resourceId, versionId, input and output schemas, and the generated pipeline. Save resourceId for later edits and version management.

Run an endpoint

Use the route or full url, not the resourceId:

init run abc123 --data companyName=Snowflake --data website=https://www.snowflake.com --data targetPersona="VP Sales"
init run https://api.init.computer/v1/abc123 --body input.json
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:

init project generate "Build ticket intake and status lookup" --name "Customer Support"
init project edit <project-id> "Add ticket assignment"

You can also attach an endpoint to existing projects with the projects field in a JSON request body.

Use with AI agents

Init creates an init.json specification for what you build. Give that specification to an agent so it can discover and call your endpoints. Agents call deployed endpoints with an API key; use a revocable key and keep it out of prompts and shared files.

Send files

init run quarterly-report-reader --file file=report.pdf --data summaryStyle=executive
init run quarterly-report-reader --body multipart-request.json

Manage resources

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

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; use versions, activate, or update
init project generateGenerate a project suite
init project editExtend an existing project
init packagesList available runtime packages

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 JSON 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_DIRCredential directory; defaults to ~/.init

Output and errors

The CLI prints pretty JSON by default. Use --json for compact output. Failed requests print JSON with success: false, error, and status. Common statuses are 402 (plan limit), 429 (concurrency), 500 (server error), and 503 (temporarily unavailable).

FAQs

Package last updated on 01 Oct 2026

Related posts