instabox CLI, grouped by what it works on. Add --help to any command for its
details. instabox help <command> prints the same. <id-or-name> is a machine’s ID (m_...) or name.
Sign in
login
Sign in with a device code, or sign up as an agent with no browser.--agent signs up an agent with no browser. It prints a claim page and a code for the account owner,
waits for their approval, and stores the API key they grant. See Agent sign-up.
claim
Approve an agent that printed<code>. You must be signed in.
--deny refuses the agent instead.
logout
Revoke and forget the stored credentials.whoami
Show the signed-in user.Create and inspect machines
templates
List the templates a machine can start from.ls
List your machines.list works too.
--meta K=V keeps only machines with that metadata. With several --meta flags, a machine must match
all of them, so each key may be given once (a repeated key is a usage error). The server does the filtering (GET /v1/machines?metadata=K:V), and only your own orgs’
machines are listed. An agent can tag what it creates with create --meta session=ID and find those
machines later with ls --meta session=ID.
create
Create a machine.create --json prints the machine once it runs, as get --json does. readyAt is when it became ready
(SSH, exec and files work), so readyAt minus createdAt is how long the create took. The setup script
and devcontainer run after it and are not counted. With --no-wait, --json prints the operation, which
has no readyAt; instabox get --json shows it once the machine is ready. A machine that is not ready
has no readyAt key.
create exits 75 when no host has room (retryable no_capacity), with or without --fail-fast.
--ready-timeout limits only how long create waits; it is not a lifetime limit. A machine that is ready
in time runs as usual (use --delete-after to delete it later).
The server deletes a machine only once its create has ended, and a running create cannot be cancelled.
So at the deadline create sends the delete, waits a few seconds for a create that is still running,
and then exits either way. With --json, the error carries the machine’s ID and what happened:
deleted is false, createRunning is true, and hint names the
instabox rm command to run once instabox get no longer shows the machine creating. Pass
--delete-after too as a backstop: the server then deletes the machine at that time whatever happens.
If the server accepted the delete but create did not see it finish within 20 seconds, deleted is
false, deletePending is true, deleteOperationId names the delete, and hint says to check with
instabox get and run instabox rm if the machine is still there. deleted is true only when the
delete is confirmed, so check it. If the delete failed, deleted is false and hint names the
instabox rm command. If the create request itself got no answer, machineId is absent and hint says how to
check for the machine.
get
Show one machine.get --json also has vcpus and memMiB at the top level, as well as under spec.
rename
Rename a machine in place, in any state.rename also renames the machine’s Host block in
~/.ssh/config.
usage
Show your machine and snapshot counts, and your limits.Lifecycle
See Lifecycle for what each state keeps.start, stop, suspend, resume, rm
Start, stop, pause, resume or delete a machine.suspendpauses the machine.pauseworks too.rmdeletes the machine.deleteworks too.rmand the otherrmcommands ask y/N first.--yes(-y,--force) skips the question. Off a terminal,--yesis required.
wake
Resume a machine that paused itself, and wait until it runs (up to 45 seconds).resume or start for it.
restart
Power-cycle a machine: stop it, then start it.recover works too.
--timeout is killed.
restore
Put the machine’s disks back to a snapshot’s, in place: the same ID, name, hostname and URLs.restore asks first. --stopped leaves the machine stopped.
auto-suspend
Pause the machine once it is idle that long.0 turns it off.
max-run
Pause the machine after that many running minutes, even while it is active.-1 is unlimited, and 0 pauses the machine now. On the free plan the value is fixed at
. The idle limit and the runtime limit both apply: the first one reached pauses
the machine.
resize
Change the size of/data, or give the machine another of the plan’s sizes.
--disk Ngrows or shrinks/datato N GB, on paid plans. A running machine’s disk grows live.--vcpusand--mem-mibgive the machine another of the plan’s sizes.- A shrink or a new size applies while the machine is stopped.
--restartstops the machine, resizes it and starts it: files stay, processes do not.
Run commands
exec
Run one command in a machine and exit with its code.'a | b'). Several arguments run as that exact argv.
exec exits 65 when the command exited 0 but its output was binary. Copy files with pull or cp
instead.
exec --background
Start a command detached, with no time limit, and print its job ID.
--json prints {jobId, pid}.
jobs
List, read, wait for and stop a machine’s background jobs.ls: the machine’s background jobs, with ID, status (running,exited(N),lost), start time and command.logs: a job’s output.-ffollows it until the job ends, then exits with the job’s exit code.wait: wait for a job to end, and exit with its exit code. After--timeout,waitexits 124 and leaves the job running.kill: send a signal (defaultTERM) to the job’s process group.
run
Create a machine, run one command in it, and delete the machine, also on error or Ctrl-C.--push DIRuploads the unignored files of DIR into the working directory first.--keepkeeps the machine and prints its name to stderr. A machine whose create operation failed is not kept. A machine whose wait was cut short is kept.
run exits with the command’s code, or 124 when the command timed out. Its own failures have their own
codes:
- 75: no host has room, with
--fail-fast. - 125: an API, network, create, upload or cleanup error. No room without
--fail-fastis one of these: retry later, or try another size or template. - 130: interrupted.
deleteAt: 5 minutes after
--timeout, or 10 minutes with --push. A failed cleanup delete is retried 5 times with backoff.
ps
List the machine’s processes.--all adds kernel threads.
history
List the commands run in the machine throughexec, newest first.
history works while the machine is stopped too. The server keeps the newest 200 commands, with the
first 64 KiB of each output stream. --limit is 1-200 (default 50). --cursor reads the next page.
output
Print a past command’s stored stdout and stderr, and exit with its exit code, asexec did.
<command-id>, output prints the last command. --json prints the record with stdout and
stderr.
agent
Drive a coding agent (Claude Code or Codex) inside a machine.prompt: start a turn and print the conversation ID. Without--resume, it starts a new conversation (default providerclaude).--attachuploads a file and adds its path to the prompt. A text of-reads the prompt from stdin (at most 256 KiB).-ffollows the events and exits with the turn’s exit code.events: a conversation’s JSONL events (default: the conversation prompted last).-ffollows the running turn until it ends, then exits with its exit code. Ctrl-C stops following and leaves the turn running.steer: interrupt the running turn, if there is one, and resume with the text.interrupt: stop the running turn (INT, then TERM, then KILL).ls: the conversations, with ID, provider, model and status (running,idle,interrupted,failed(N),lost).
claude -p --output-format stream-json or
codex exec --json, with permissions and sandboxing skipped (the machine is the boundary). A
conversation lives in ~/.instabox/agents/<id> in the machine, and later turns resume the agent’s
session.
Provider keys come from the machine’s environment, from your Secrets or --env:
ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN for Claude Code, and OPENAI_API_KEY or CODEX_API_KEY
for Codex. When the template lacks the agent CLI, the turn installs it with npm.
Copy files
push, pull and cp copy directories by these rules:
- SRC into an existing DST lands in
DST/<name>:push box app /data/wgives/data/w/app. SRC/,SRC/.or.copies the contents into DST itself:push box app/ /data/wputs the files of app in/data/w.- With DST omitted, the copy keeps its name:
push box .givesHOME/<dirname>.
push or cp, not scp or rsync over ssh.instabox.sh. See
SSH for why and the measured throughput.
files
List a live directory or print a text file, as root.push
Copy a file or directory into a machine.push copies only tracked files. --all adds untracked files. -p creates the
parents of REMOTE.
Past 5 GiB, split the file, push the parts, and cat them together in the machine.
pull
Copy a file or directory out of a machine.cp
Copy scp-style, in either direction.cp ./x.tgz box:/data/home/x.tgz copies in, and cp box:/data/home/x.tgz . copies out.
Monitor
These commands never wake a paused machine.disk
Show how full/data and / are.
ok below 80%, high from 80%, critical from 90%, and full.
metrics
Show CPU, memory, network and disk I/O, recorded every 30 seconds.--since goes back up to 24h.
logs
Show the console log and the recent operations, in any state.-f follows the log. See Logs and labels.
Snapshots
See Snapshots.snapshots, image and images work as snapshot.
snapshot save
Save the machine’s disks as a private snapshot.--root-only saves installed software, not home and workspace.
snapshot ls
List your snapshots.snapshot files
List a directory of the snapshot’s installed files, or print a text file.snapshot import
Build a private snapshot from a Docker or OCI image. It pulls the image in a throwaway machine, then deletes that machine.snapshot rm
Delete a snapshot. It asks y/N first, asrm does.
fork
Copy a machine into--count (1-5) machines. clone works too.
fork uses no snapshot. Otherwise it saves a snapshot and creates the copies
from it. See Parallel forks.
SSH access
See SSH.ssh
Open an SSH session to a machine, or run a command in it over SSH.--no-paste turns off the Ctrl+V image paste. See SSH.
ssh-config
Print a~/.ssh/config Host block.
ssh-cert
Refresh only the SSH certificate.ssh-token
Print a plainssh command, or a mosh command with --mosh, that needs no CLI or key.
--revoke revokes the machine’s ssh commands.
mosh
Open a session asssh does, over mosh. mosh must be installed.
port-forward
Forward local ports over SSH until Ctrl-C.forward works too.
Ports
See Ports and URLs.ports works as port.
port publish
Give a port an HTTPS URL until you unpublish it.--private: only the printed link, with its_token, opens the URL.--tcp: a public raw TCP service at a TLS address (SNI).
port ls
List the published ports of one machine or all of them.port unpublish
Remove the URL and close its connections.port setup
Install theinstabox-port command in the machine.
Orca
orca connect
Print a one-time Orca connection, as JSON.Secrets
Org Secrets reach a machine only as placeholders. See Secrets.secret works as
secrets.
- Org commands default to your personal org. With
INSTABOX_API_KEYset, they default to the key’s org. - Setting, importing and removing values require the org owner or an admin: a signed-in session, or a
workspace’s
workspace:adminkey inINSTABOX_API_KEY. --hostcan be repeated for a Secret used with several hosts. Without--host, every public HTTPS destination is allowed.--ai anthropic|openai|gemini|openrouteradds that provider’s API host.- Names in selection flags can be comma-separated or a JSON array.
create ... [--secrets all|none|NAMES]selects Secrets when the machine is created.--no-vaultturns off only personal Vault delivery. To turn off both stores on a new machine, also pass--secrets none.
secrets set
Set a Secret. The value is read from stdin or a hidden prompt.secrets import
Import a file of Secrets atomically. A FILE of- reads stdin.
secrets ls
List Secrets: metadata only, never values.secrets rm
Delete a Secret.secrets show
Show a machine’s Secret selection and delivery status.secrets select
Choose which Secrets a machine gets:all, none or names.
secrets push
Refresh Secret delivery on a running machine.Vault
Vault delivers personal env values and files, with metadata selectors. It is independent of org Secrets:--no-vault does not clear Secret selections. The CLI warns about a future Vault retirement, and these
commands remain supported.
vault set
Set an env value. The value is read from stdin or a hidden prompt.vault set-file
Set a file item. Its contents are read from stdin.vault import
Import a.env file.
vault ls, vault rm
List the items (metadata only), or remove one.vault show
Show the items that match a machine, and its last delivery.vault push
Refresh Vault delivery.vault export
Write an item that an earlier explicit migration retained to a new private file. It never prints the value.Webhooks
See Webhooks for the events and the signature.webhook works as webhooks.
Org commands default to your personal org. With INSTABOX_API_KEY set, they default to the key’s org.
webhooks create
Create a webhook. It prints the signing secret once.webhooks ls, get, update, rm
List, show, change or delete webhooks.webhooks rotate, test, deliveries, retry, events
Manage a webhook’s signing secret and deliveries, and list the event types.Workspaces
Machines, snapshots and stored data are counted against an org: your personal org, or a workspace.org, orgs, ws and workspaces work as workspace. <ws> is an org ID or name, and
create --org <ws> puts a machine in it. ls, get and members work with an API key. The other
workspace commands need instabox login.
workspace ls, get
List your orgs, or show one.ls lists your personal org first, then your workspaces. get shows an org’s plan, limits, this
month’s usage and allowance.
workspace create, rename, delete
Create, rename or delete a workspace.create prints the Stripe Checkout URL that pays the plan. The workspace exists once the checkout
completes.
Members and invites
Manage a workspace’s members and invitations.Billing
Manage an org’s plan, card, spend cap and usage alerts.subscribeputs a workspace or your personal org on a paid plan, or renews it.upgradeworks too.cardsaves a card for a free workspace.cancelends the subscription at the end of the period.resumeundoes the cancel.billingprints the Stripe portal URL.portalworks too.spend-capcaps this month’s usage beyond the allowance.alertsshows or sets the usage alert emails.
API keys
See API keys.key works as keys.
With INSTABOX_API_KEY=ibk_... set, and optionally INSTABOX_API_URL, every command other than the
keys commands uses the key instead of a sign-in. The keys commands need a sign-in.
keys create
Create an API key. It prints the secret once.keys ls
List your API keys.keys rm
Revoke an API key.Integrations
mcp
Run the instabox MCP server, or add it to an MCP client’s config.start: a stdio MCP server that uses this CLI’s sign-in orINSTABOX_API_KEY, and never opens a browser. MCP clients run it.init: add the instabox MCP server to that client’s config, and keep the rest of the file. By default the client runsinstabox mcp start.--hostedwrites the hosted URL with theX-API-Keyheader, read fromINSTABOX_API_KEYwhen the client starts.--inline-keywrites the key itself, with file mode 0600.--projectwrites the project’s config file instead of the user’s.
ci
List the org’s recent GitHub Actions jobs on instabox CI machines, newest first.feedback
Report a problem with instabox itself to the instabox team.--type:bug,feature-request,friction,other.--component:cli,api,sandbox,dashboard,skills,docs,other.
The CLI itself
version
Print the CLI version.version --json adds "outdated", and "latest" when "outdated" is true.
update
Replace this CLI with the latestinstabox npm package, the build that npx instabox@latest installs.
self-update works too.
update checks the download against the registry’s integrity hash and swaps it in place, or prints
“already up to date”. INSTABOX_NPM_REGISTRY names a registry mirror.
The daily outdated check
The daily outdated check
Once a day, the CLI compares its version with the registry’s latest. The result is cached in
update-check.json in the config directory, the check has a 1.5-second limit, and an unreachable
registry is ignored. While the versions differ, every command except update ends with one line on
stderr, never stdout: instabox <version> is outdated (latest <npm version>): run instabox update.
ssh, mosh and port-forward print the line before they connect. A --json failure leaves the
line out, so its stderr stays empty. Development builds are not checked. INSTABOX_NO_UPDATE_CHECK=1
turns the check and the line off.completion
Print a tab-completion script for commands, flags and machine names.eval "$(instabox completion bash)" to ~/.bashrc, or eval "$(instabox completion zsh)" to
~/.zshrc. instabox completion help covers fish and PowerShell. Machine names come from your machine
list, which never wakes a machine.
Global flags
JSON output
--json works on every command, and each command’s -h lists it. -o json, --output json and
--format json are the same. The exceptions are ssh, mosh and port-forward: they are interactive
and refuse it with the JSON error code json_unsupported. Use exec --json instead.
With JSON output, a failure prints {"error":{"code","message",...}} on stdout instead of text on
stderr, and still exits non-zero (2 for usage errors, code usage). API errors keep the server’s
code, status, requestId and retryable (present when true).
When stdout is not a terminal (a pipe or a file), the list and status commands print JSON without the
flag: ls, get, templates, usage, snapshot ls, port ls, keys ls, secrets ls, vault ls,
and workspace ls, get, members and invites. INSTABOX_NO_AUTO_JSON=1 or --output table keeps
the table. Every other command, exec, ssh, files and create among them, prints the same output
piped or not.
Exit codes
A failed command exits with a code for the kind of error, so a script can tell them apart. Each code is non-zero, soif ! instabox ... and $? -ne 0 checks work. --json errors exit the same way.
Commands that run something exit with its code instead:
exec, ssh, jobs wait, jobs logs -f,
agent prompt -f, output and run. The failures of run itself have their own codes: 2, 75, 125 and
130. Every error code is in Errors.