Skip to content

CLI

bash
npm install -g @ai2in/cli

Drive sandboxes from your terminal. Node 18+, zero dependencies.

Auth

bash
ai2in login --key ai2in_live_…      # stored in ~/.ai2in/config.json (chmod 600)
ai2in whoami                        # verify the stored credentials

Credentials resolve from AI2IN_API_KEY / AI2IN_BASE_URL first, then the config file. --url points at a self-hosted engine.

Sandboxes

bash
ai2in run <file.py>                 # run a file in a fresh sandbox, output streamed
ai2in run -e "print(6*7)"           # run an inline snippet
ai2in run app.py --sandbox <id>     # reuse an existing sandbox
ai2in run app.py --keep             # don't kill the ephemeral sandbox after

ai2in create [--desktop] [--image <img>]   # create a sandbox
ai2in ls                            # list sandboxes (running + paused)
ai2in shell <id>                    # live bash inside the sandbox (Ctrl+] detaches)
ai2in info <id>                     # status, timestamps, owning node
ai2in timeout <id> <seconds>        # auto-kill after N seconds (extendable)
ai2in pause  <id>                   # park a sandbox
ai2in resume <id>                   # bring it back
ai2in expose <id> <port>            # public HTTPS URL for a bound port
ai2in rm     <id>                   # destroy a sandbox

Platform

bash
ai2in db create <postgres|redis> [--name <n>]   # managed database -> connection string
ai2in deploy <image> [--name <n>] [--port <p>]  # persistent service -> live URL

Example: preview a web app

bash
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

Environment

VarPurpose
AI2IN_API_KEYbearer token (overrides config)
AI2IN_BASE_URLengine URL (default https://api.ai2in.dev)

Sovereign compute for Indian AI — hosted in Mumbai (ap-south-1).