Package Exports
- @ai2in/cli
- @ai2in/cli/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@ai2in/cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@ai2in/cli
Drive AI2IN sandboxes from your terminal — India-hosted secure sandboxes for AI agents.
npm i -g @ai2in/cliRequires Node 18+. Zero dependencies.
Getting started
ai2in login --key ai2in_live_… # stored in ~/.ai2in/config.json (chmod 600)
ai2in whoami # verify
ai2in run app.py # run a file in a fresh sandbox, output streamed
ai2in run -e "print(6*7)" # run an inline snippetCredentials resolve from AI2IN_API_KEY / AI2IN_BASE_URL first, then the config
file. --url points the CLI at a self-hosted engine (default https://api.ai2in.dev).
Sandboxes
ai2in create [--desktop] [--image <img>] # create; --desktop gives a Linux desktop
ai2in ls # list (running + paused)
ai2in run <file|-e code> [--sandbox <id>] # run; reuse an existing sandbox with --sandbox, keep it with --keep
ai2in pause <id> # stop the container: no CPU/RAM, filesystem preserved
ai2in resume <id> # bring it back exactly as it was
ai2in expose <id> <port> # public HTTPS URL for a port the sandbox binds
ai2in rm <id> # destroypause/resume let you park a long-running agent session cheaply. expose gives
you a shareable https://<port>-<id>.up.ai2in.dev URL to preview what the agent built.
Platform
ai2in db create postgres --name app-db # managed Postgres/Redis -> connection string
ai2in deploy nginxdemos/hello --port 80 # persistent service -> live URLExample: preview a web app an agent built
id=$(ai2in create | awk '{print $1}')
ai2in run --sandbox "$id" --keep -e "import subprocess; subprocess.Popen(['python','-m','http.server','3000'])"
ai2in expose "$id" 3000 # -> https://3000-<id>.up.ai2in.dev