---
title: "CLI reference"
description: "Every command and flag of the promigence CLI 0.1.0-beta.14."
url: "https://www.promigence.ai/docs/cli"
site: "Promigence"
---

# promigence CLI reference

The commands of the CLI on npm, version 0.1.0-beta.14. Install: `npm i -g promigence`, then `promigence signup`, which takes an invite code (request access at https://www.promigence.ai/?ref=docs#request-access)

## Global flags
- `--json`, One JSON document on stdout (default when stdout is not a TTY, except exec --sandbox: --json or PROMIGENCE_OUTPUT=json there)
- `--text`, Human text: a result on stdout, an error on stderr
- `--api-key K`, Precedence: --api-key > PROMIGENCE_API_KEY > the stored sign-in
- `--request-timeout DUR`, How long one API request may take (default 30s); PROMIGENCE_REQUEST_TIMEOUT
- `--version`, Print the version
- `--help`, This help; `promigence <command> --help` for one command

## Setup

Sign up, check the install, and get an agent oriented in about 1,200 tokens.

### `promigence login` 
Signs you up or signs you in, by email or with GitHub or Google where those are enabled: it opens your browser, where you sign in and authorize the CLI, and saves a new API key on this machine. The key an earlier login saved here is revoked.
- `--provider NAME`, Use this sign-in method (`email`, or `github` or `google` where enabled) instead of choosing in the browser
- `--no-browser`, Print the sign-in link instead of opening a browser, then paste back the code shown after you sign in
- `--key-name N`, Name for the new API key. Default: `cli@<host>`
- `--api-url URL`, Sign in to the API at URL instead of the default, without asking for confirmation
- `--yes`, Use a non-default API set in `PROMIGENCE_API_URL` without asking for confirmation
- `--ref CODE`, Referral code, applied only if this creates a new account
- `--json`, Print the result as JSON, even in a terminal

### `promigence signup` 
Creates a new account in your browser and saves an API key on this machine. A new account sees a short welcome before it authorizes the CLI.
- `--invite CODE`, Your invite code, for a sign-up that asks for it in the terminal; where the browser asks for it, enter it there (other users can see command-line arguments)
- `--provider NAME`, Use this sign-in method (`email`, or `github` or `google` where enabled) instead of choosing in the browser
- `--no-browser`, Print the sign-up link instead of opening a browser, then paste back the code shown when you finish
- `--key-name N`, Name for the new API key. Default: `cli@<host>`
- `--api-url URL`, Sign up on the API at URL instead of the default, without asking for confirmation
- `--yes`, Use a non-default API set in `PROMIGENCE_API_URL` without asking for confirmation
- `--ref CODE`, Referral code, applied only if this creates a new account
- `--json`, Print the result as JSON, even in a terminal

### `promigence logout` 
Removes the API key saved on this machine. If `promigence login` created that key, it is revoked too, so it stops working everywhere.
- `--keep-key`, Only remove the key from this machine; it keeps working
- `--json`, Print the result as JSON, even in a terminal

### `promigence auth login` 
Saves an API key you already have on this machine. It reads the key from an environment variable (`--from-env VAR`) or from standard input, so the key stays off the command line.
- `--from-env VAR`, Read the key from the environment variable VAR
- `--api-key K`, The key itself, on the command line; accepted with a warning, because other users can see it there

### `promigence keys list` 
Lists the API keys in the project your current key belongs to, showing when each was created and last used and when it expires. Add `--project` to list another project's keys.
- `--all`, Include revoked keys
- `--project P`, List this project's keys instead (you sign in first)
- `--org ORG`, With `--project`: the organization that project is in
- `--no-browser`, Sign in without opening a browser on this machine, by pasting back a code (scripts can set `PROMIGENCE_ID_TOKEN`)
- `--yes`, Sign in to the API set in `PROMIGENCE_API_URL` without asking for confirmation
- `--json`, Print the result as JSON, even in a terminal

### `promigence keys create` 
Creates a new API key and prints its secret. The secret is shown only this once, so store it straight away.
- `--name N`, Name for the key, for example `ci-prod`. Default: `cli@<host>`
- `--org ORG`, Organization to create the key in; naming one other than your current key's signs you in. Default: your current key's organization
- `--project P`, Create the key in this project (you sign in first)
- `--service`, Make a service key for CI that keeps working after you leave the organization (owners only; you sign in first)
- `--access A`, What the key may do: `full` (the default); `run` (sandboxes, runs and builds, but no changes to secrets, keys or billing); or `read` (reads everything, files and output included, and changes nothing)
- `--expires WHEN`, When the key stops working: a lifetime such as `1h`, `30d` or `1y`, a date, or a UTC time such as `2027-01-31T12:00:00Z`. Default: never
- `--no-browser`, Sign in without opening a browser on this machine, by pasting back a code (scripts can set `PROMIGENCE_ID_TOKEN`)
- `--yes`, Sign in to the API set in `PROMIGENCE_API_URL` without asking for confirmation
- `--json`, Print the result as JSON, even in a terminal

### `promigence keys revoke KEY_ID` 
Revokes an API key so it no longer works. Keys that were created with it are revoked too.
- `--project P`, The project the key is in, if not your current key's (you sign in first)
- `--org ORG`, With `--project`: the organization that project is in
- `--no-browser`, Sign in without opening a browser on this machine, by pasting back a code (scripts can set `PROMIGENCE_ID_TOKEN`)
- `--yes`, Sign in to the API set in `PROMIGENCE_API_URL` without asking for confirmation
- `--json`, Print the result as JSON, even in a terminal

### `promigence org list` 
Lists your organizations, marking your default one with `*`. Without `--all` it lists only your current key's organization.
- `--all`, List every organization you belong to (you sign in first)
- `--no-browser`, Sign in without opening a browser on this machine, by pasting back a code (scripts can set `PROMIGENCE_ID_TOKEN`)
- `--yes`, Sign in to the API set in `PROMIGENCE_API_URL` without asking for confirmation
- `--json`, Print the result as JSON, even in a terminal

### `promigence org create NAME` 
Creates a new organization with you as its owner; you sign in first. It gets no free trial credit, so add a card before its first run.
- `--no-browser`, Sign in without opening a browser on this machine, by pasting back a code (scripts can set `PROMIGENCE_ID_TOKEN`)
- `--yes`, Sign in to the API set in `PROMIGENCE_API_URL` without asking for confirmation
- `--json`, Print the result as JSON, even in a terminal

### `promigence org switch ORG` 
Signs you in, makes ORG your default organization and saves a new API key for it on this machine. The key an earlier sign-in saved here is revoked unless you pass `--keep-old-key`.
- `--project P`, Project for the new key
- `--keep-old-key`, Keep the replaced key working instead of revoking it
- `--no-browser`, Sign in without opening a browser on this machine, by pasting back a code (scripts can set `PROMIGENCE_ID_TOKEN`)
- `--yes`, Sign in to the API set in `PROMIGENCE_API_URL` without asking for confirmation
- `--json`, Print the result as JSON, even in a terminal

### `promigence org members` 
Lists the members of your organization and their roles.
- `--org ORG`, Use an organization other than the one your current key belongs to (you sign in first)
- `--no-browser`, Sign in without opening a browser on this machine, by pasting back a code (scripts can set `PROMIGENCE_ID_TOKEN`)
- `--yes`, Sign in to the API set in `PROMIGENCE_API_URL` without asking for confirmation
- `--json`, Print the result as JSON, even in a terminal

### `promigence org invite EMAIL` 
Invites someone to your organization by email; they accept with `promigence org join`. Only owners can invite, and you sign in first.
- `--role R`, Role to give them: `owner` or `member`. Default: member
- `--org ORG`, Use an organization other than the one your current key belongs to
- `--no-browser`, Sign in without opening a browser on this machine, by pasting back a code (scripts can set `PROMIGENCE_ID_TOKEN`)
- `--yes`, Sign in to the API set in `PROMIGENCE_API_URL` without asking for confirmation
- `--json`, Print the result as JSON, even in a terminal

### `promigence org invites` 
Lists your organization's pending invites, which expire after 14 days. Add `--mine` to see the invites sent to you instead.
- `--mine`, List the invites sent to you instead (you sign in first)
- `--org ORG`, Use an organization other than the one your current key belongs to (you sign in first)
- `--no-browser`, Sign in without opening a browser on this machine, by pasting back a code (scripts can set `PROMIGENCE_ID_TOKEN`)
- `--yes`, Sign in to the API set in `PROMIGENCE_API_URL` without asking for confirmation
- `--json`, Print the result as JSON, even in a terminal

### `promigence org uninvite INVITE_ID` 
Withdraws a pending invite so it can no longer be accepted. Only owners can do this, and you sign in first.
- `--org ORG`, Use an organization other than the one your current key belongs to
- `--no-browser`, Sign in without opening a browser on this machine, by pasting back a code (scripts can set `PROMIGENCE_ID_TOKEN`)
- `--yes`, Sign in to the API set in `PROMIGENCE_API_URL` without asking for confirmation
- `--json`, Print the result as JSON, even in a terminal

### `promigence org resend INVITE_ID` 
Send an invite again (owners).
- `--org ORG`, Another org than this key's
- `--no-browser`, Sign in headless (or PROMIGENCE_ID_TOKEN)
- `--yes`, Sign in to PROMIGENCE_API_URL without the prompt
- `--json`, Force the JSON envelope

### `promigence org role USER_ID ROLE` 
Sets a member's role to `owner` or `member`; the last owner cannot be demoted. Only owners can change roles, and you sign in first.
- `--org ORG`, Use an organization other than the one your current key belongs to
- `--no-browser`, Sign in without opening a browser on this machine, by pasting back a code (scripts can set `PROMIGENCE_ID_TOKEN`)
- `--yes`, Sign in to the API set in `PROMIGENCE_API_URL` without asking for confirmation
- `--json`, Print the result as JSON, even in a terminal

### `promigence org remove USER_ID` 
Removes a member from your organization and revokes their API keys there; service keys keep working. Only owners can do this, and you sign in first.
- `--org ORG`, Use an organization other than the one your current key belongs to
- `--no-browser`, Sign in without opening a browser on this machine, by pasting back a code (scripts can set `PROMIGENCE_ID_TOKEN`)
- `--yes`, Sign in to the API set in `PROMIGENCE_API_URL` without asking for confirmation
- `--json`, Print the result as JSON, even in a terminal

### `promigence org leave [ORG]` 
Leaves an organization and revokes your API keys in it; without ORG, it leaves the one your current key belongs to. Leaving an organization other than your current key's signs you in first.
- `--no-browser`, Sign in without opening a browser on this machine, by pasting back a code (scripts can set `PROMIGENCE_ID_TOKEN`)
- `--yes`, Sign in to the API set in `PROMIGENCE_API_URL` without asking for confirmation
- `--json`, Print the result as JSON, even in a terminal

### `promigence org join INVITE_ID` 
Accepts an invite and makes you a member of that organization. You sign in first, with the email address the invite was sent to.
- `--decline`, Decline the invite instead of accepting it
- `--no-browser`, Sign in without opening a browser on this machine, by pasting back a code (scripts can set `PROMIGENCE_ID_TOKEN`)
- `--yes`, Sign in to the API set in `PROMIGENCE_API_URL` without asking for confirmation
- `--json`, Print the result as JSON, even in a terminal

### `promigence org audit` 
Shows your organization's audit log, newest first: who did what, and when. Only owners can read it, and only when signed in rather than with an API key, so run it with `--sign-in`.
- `--before SEQ`, Show entries older than SEQ (an entry's sequence number), to page back through the log
- `--limit N`, How many entries to show, at most 100. Default: 100
- `--org ORG`, Use an organization other than the one your current key belongs to
- `--sign-in`, Sign in in your browser; the log is read as you, never with an API key
- `--no-browser`, Sign in without opening a browser on this machine, by pasting back a code (scripts can set `PROMIGENCE_ID_TOKEN`)
- `--yes`, Sign in to the API set in `PROMIGENCE_API_URL` without asking for confirmation
- `--json`, Print the result as JSON, even in a terminal

### `promigence org rename ORG NAME` 
Rename it (owners).
- `--no-browser`, Sign in headless (or PROMIGENCE_ID_TOKEN)
- `--yes`, Sign in to PROMIGENCE_API_URL without the prompt
- `--json`, Force the JSON envelope

### `promigence org delete ORG` 
Deletes an organization and revokes all of its API keys. Only owners can do this; you sign in first and confirm with the organization's name.
- `--confirm NAME`, The organization's name, typed again to confirm (required)
- `--no-browser`, Sign in without opening a browser on this machine, by pasting back a code (scripts can set `PROMIGENCE_ID_TOKEN`)
- `--yes`, Sign in to the API set in `PROMIGENCE_API_URL` without asking for confirmation
- `--json`, Print the result as JSON, even in a terminal

### `promigence project list` 
Lists the projects in your organization and what each has spent this month. Every API key belongs to one project.
- `--month YYYY-MM`, Show another month's spend, as `YYYY-MM`
- `--org ORG`, Use an organization other than the one your current key belongs to (you sign in first)
- `--no-browser`, Sign in without opening a browser on this machine, by pasting back a code (scripts can set `PROMIGENCE_ID_TOKEN`)
- `--yes`, Sign in to the API set in `PROMIGENCE_API_URL` without asking for confirmation
- `--json`, Print the result as JSON, even in a terminal

### `promigence project create NAME` 
Creates a project in your organization. To work in it, create a key with `promigence keys create --project NAME`.
- `--org ORG`, Use an organization other than the one your current key belongs to (you sign in first)
- `--no-browser`, Sign in without opening a browser on this machine, by pasting back a code (scripts can set `PROMIGENCE_ID_TOKEN`)
- `--yes`, Sign in to the API set in `PROMIGENCE_API_URL` without asking for confirmation
- `--json`, Print the result as JSON, even in a terminal

### `promigence project rename PROJECT NAME` 
Renames a project. The `default` project cannot be renamed.
- `--org ORG`, Use an organization other than the one your current key belongs to (you sign in first)
- `--no-browser`, Sign in without opening a browser on this machine, by pasting back a code (scripts can set `PROMIGENCE_ID_TOKEN`)
- `--yes`, Sign in to the API set in `PROMIGENCE_API_URL` without asking for confirmation
- `--json`, Print the result as JSON, even in a terminal

### `promigence project delete PROJECT` 
Deletes an empty project: its keys must be revoked, its snapshots deleted and nothing in it still running. Only owners can do this (you sign in first), and the `default` project cannot be deleted.
- `--org ORG`, Use an organization other than the one your current key belongs to
- `--no-browser`, Sign in without opening a browser on this machine, by pasting back a code (scripts can set `PROMIGENCE_ID_TOKEN`)
- `--yes`, Sign in to the API set in `PROMIGENCE_API_URL` without asking for confirmation
- `--json`, Print the result as JSON, even in a terminal

### `promigence project cap PROJECT USD|off` 
Sets the most a project may spend in a month (UTC), in USD, or removes the cap with `off`; new work that would go past it is refused. Only owners can do this, and you sign in first.
- `--org ORG`, Use an organization other than the one your current key belongs to
- `--no-browser`, Sign in without opening a browser on this machine, by pasting back a code (scripts can set `PROMIGENCE_ID_TOKEN`)
- `--yes`, Sign in to the API set in `PROMIGENCE_API_URL` without asking for confirmation
- `--json`, Print the result as JSON, even in a terminal

### `promigence project move PROJECT` 
Moves a project, with its snapshots and secrets, to another organization and revokes all of its API keys. Only owners can do this (you sign in first); past runs and their usage stay with the original organization.
- `--to ORG`, The organization to move it to (required): one you belong to, with a card on file
- `--org ORG`, The organization the project is in now, if not your current key's
- `--no-browser`, Sign in without opening a browser on this machine, by pasting back a code (scripts can set `PROMIGENCE_ID_TOKEN`)
- `--yes`, Sign in to the API set in `PROMIGENCE_API_URL` without asking for confirmation
- `--json`, Print the result as JSON, even in a terminal

### `promigence me` 
Shows your account at a glance: organization, plan, sandboxes in use against your concurrency limit, trial credit left, spend so far, default spend cap and limits.
- `--json`, Print the result as JSON, even in a terminal

### `promigence billing card` 
Prints a checkout link for adding a payment card (owners only). Nothing is charged when you add it, and any trial credit left is used before the card is billed.
- `--json`, Print the result as JSON, even in a terminal

### `promigence doctor` 
Checks that the CLI is ready to use: the Node.js version, your API key and where it comes from, and whether the API is reachable and accepts the key. Each failed check says how to fix it.
- `--json`, Print the result as JSON, even in a terminal

### `promigence ping` 
Your distance to our servers.
- `--json`, Force the JSON envelope

### `promigence init` 
Writes a `promigence.toml` that describes how to build a snapshot of the repository in the current directory: the commit to pin, and setup and verify commands inferred from its lockfile and project files. Every inferred value is printed and can be overridden with a flag.
- `--repo U`, Git URL of the repository. Default: the `origin` remote
- `--commit SHA`, Commit to pin, as a full 40-character SHA. Default: HEAD
- `--setup CMD`, Setup command to use instead of the inferred one; repeat the flag for several steps
- `--verify CMD`, Verify command to use instead of the inferred one
- `--tier xsmall|small|medium|large-16|large|xlarge|2xlarge`, Size of the sandboxes this snapshot runs in. Default: medium
- `--force`, Overwrite an existing `promigence.toml`
- `--print`, Print what would be written, without writing anything
- `--json`, Print the result as JSON, even in a terminal

### `promigence examples` 
Lists public snapshots you can start sandboxes from right away, with no build of your own; if none are published, it shows the built-in `promigence/base`. It needs no API key.
- `--limit N`, How many snapshots to list. Default: 20
- `--bundle`, Write each public snapshot to a `.promigence` file in the current directory (none are published yet)
- `--json`, Print the result as JSON, even in a terminal

### `promigence templates` 
The templates: ready-made starting points to fork (no auth).
- `--json`, Force the JSON envelope

### `promigence templates show NAME` 
One template: everything it has installed, and its versions (no auth).
- `--packages`, List every installed package, not only the count
- `--json`, Force the JSON envelope

### `promigence agent-guide` 
Prints a short guide to the CLI, about 1,200 tokens, for an AI agent to read before it uses Promigence. `--section commands|errors|cost` prints the full command list, the error codes or the prices instead.
- `--section commands|errors|cost`, Print one section instead of the core guide: every command, every error code, or the prices
- `--code C`, Print the entry for one error code, with its fix
- `--format md|json`, Output format, Markdown or JSON. Default: md
- `--install`, Add a short Promigence section to `AGENTS.md` or `CLAUDE.md`, and write the guide into `.claude/skills` and `.cursor/rules`
- `--create`, With `--install`: create `AGENTS.md` if there is neither `AGENTS.md` nor `CLAUDE.md`
- `--check`, Show what `--install` would change without writing anything; exits 13 if anything would change

### `promigence mcp` 
Runs an MCP (Model Context Protocol) server over standard input and output, so AI agents that support MCP can create and use sandboxes. Add it with `claude mcp add promigence -- promigence mcp`; on Windows, end the command with `-- cmd /c promigence mcp` instead.
- `--read-only`, Offer only the tools that read: listing, reading a file, fetching output and reports. They still return what a sandbox holds, so this limits what the agent can change, not what it can see
- `--root PATH`, Keep the file tools to this directory of the sandbox (commands the agent runs are not limited to it)
- `--allow-tools A,B`, Offer only these tools, given as comma-separated names
- `--cap USD`, The most each sandbox or batch it starts may spend, in USD. Default: `PROMIGENCE_SPEND_CAP`, then your organization's default cap
- `--keep`, Leave the sandboxes this session created running when the server stops (by default they are ended)

### `promigence status` 
Shows whether the service is up, the state of each service, and how much of your concurrency limit is in use. Without an API key it shows the service status only.
- `--json`, Print the result as JSON, even in a terminal

### `promigence billing usage` 
Shows your organization's spending this month: plan, usage by sandbox size, credits used and the next invoice (owners only). Any key can list its own project's charges with `--ledger`.
- `--ledger`, Also list the individual charges for your current key's project
- `--limit N`, With `--ledger`: how many charges to list. Default: 20
- `--cursor C`, With `--ledger`: the `next_cursor` from an earlier page, to get the next page
- `--json`, Print the result as JSON, even in a terminal

### `promigence billing history` 
Credits and payments, newest first (owners).
- `--kind K`, All | credits | payments (default all)
- `--limit N`, How many (default 50, at most 100)
- `--cursor C`, The next_cursor of an earlier page
- `--json`, Force the JSON envelope

### `promigence referrals` 
Shows your organization's referral code, the offer that comes with it, and how your referrals stand. A friend signs up with your code by running `promigence login --ref CODE`.
- `--json`, Print the result as JSON, even in a terminal

### `promigence referrals apply <code>` 
Applies a friend's referral code to your organization; its credit comes when you pay your first plan invoice. Only an owner can apply a code, and only before the first paid invoice.
- `--json`, Print the result as JSON, even in a terminal

### `promigence pricing` 
Shows the live price list: per-second rates, the price of each sandbox size, limits and free credit. With an API key you see your organization's prices; without one, the published list.
- `--new-account`, Show the published list instead of your own prices
- `--json`, Print the result as JSON, even in a terminal

### `promigence credits` 
Shows your free-credit offer: whether it can be claimed, how much it is, when it expires and the campaign it came from, if any.
- `--json`, Print the result as JSON, even in a terminal

### `promigence credits claim` 
Opens the page where you accept the terms and claim your free credit, and prints its link. The link works once and expires after 15 minutes.
- `--no-open`, Print the link without opening a browser
- `--json`, Print the result as JSON, even in a terminal

### `promigence billing portal` 
Prints a link to the billing portal, where you can change the card on file and see past invoices (owners only).
- `--json`, Print the result as JSON, even in a terminal

## Snapshots

Build a verified environment once. Everything after this is a fork of it.

### `promigence snapshot create` 
Builds a snapshot from an image, a Dockerfile, a `devcontainer.json`, a git repository or a local directory, running your setup steps and then your verify command. Nothing is stored if the verify command fails.
- `--repo R`, The repository to build: owner/name for a connected GitHub repository, or a git URL
- `--ref R`, With `--repo` owner/name: the branch, tag or commit SHA to build. Default: the default branch
- `--commit SHA`, The exact commit to build, as a full 40-character SHA; a branch name is refused
- `--image REF`, The image to build from: a tag, which is pinned to its digest for you, or `REF@sha256:D`
- `--dockerfile PATH`, A Dockerfile to build the snapshot from
- `--context DIR|URL@SHA`, The Dockerfile's build context: a local directory, or a git URL pinned to a full commit SHA. Default: the Dockerfile's directory
- `--devcontainer PATH`, A `devcontainer.json` to build from. Default: the one in this directory
- `--no-devcontainer`, Ignore the repository's `devcontainer.json`
- `--dir PATH`, Build from a local directory, uploading only the files git tracks there
- `--from SNAP`, With `--repo` owner/name or `--dir`: the snapshot the build starts from. Default: `promigence/base`
- `--track`, With `--repo` owner/name: rebuild on every push to the branch and move `--alias` to the new snapshot; each rebuild is billed per second while it runs
- `--setup CMD`, A setup command; repeat the flag for more steps, which run in order
- `--verify CMD`, A command that must exit 0, or nothing is stored
- `--start CMD`, A command started at build time and already running in every sandbox made from the snapshot
- `--tier xsmall|small|medium|large-16|large|xlarge|2xlarge`, The size of the build and of every sandbox started from the snapshot
- `--alias N`, A name for the snapshot, unique in your organization
- `--grade CMD`, The snapshot's default grader: a command that scores a run's work in a clean copy of the environment
- `--fresh`, Do not reuse the answer to the same command from the last 10 minutes; identical inputs still reuse their existing snapshot
- `--wait`, Wait for the build to finish, for at most `--wait-timeout` (default 100s)
- `--wait-timeout DUR`, How long `--wait` waits; when it runs out, the command exits with code 11 and a build in progress keeps going. Default: 100s
- `--idempotency-key K`, A key you choose; repeating the command with the same key within 24 hours returns the first result and starts nothing new
- `--json`, Print the result as JSON, even in a terminal

### `promigence snapshot status <build_id>` 
Shows the state of a snapshot build, by its build ID. With `--wait`, it waits for the build to finish.
- `--wait`, Wait for the build to finish, for at most `--wait-timeout` (default 100s)
- `--wait-timeout DUR`, How long `--wait` waits; when it runs out, the command exits with code 11 and the build keeps going. Default: 100s
- `--log N`, Also print the last N lines of the build log
- `--json`, Print the result as JSON, even in a terminal

### `promigence snapshot list` 
Lists the snapshots in your organization, with each one's alias, tier and source.
- `--json`, Print the result as JSON, even in a terminal

### `promigence snapshot inspect <hash>` 
Shows a snapshot's record: where it came from, its tier, its verify command and whether it is verified.
- `--json`, Print the result as JSON, even in a terminal

### `promigence snapshot verify <hash>` 
Runs a snapshot's recorded verify command again, in a new sandbox started from it, to check that the snapshot still works. It prints the most the check can cost, and exits with code 6 if the check fails.
- `--json`, Print the result as JSON, even in a terminal

### `promigence snapshot export <hash>` 
Writes a portable `.promigence` bundle that identifies a snapshot exactly, with where it came from and how it was verified, for you to commit, cite or send. Anyone can check the file offline, and `--snapshot` accepts it in place of an ID.
- `--out FILE`, The file to write. Default: `<alias>.promigence`; `-`, or piping the output, writes the bundle to stdout
- `--json`, Print the result as JSON, even in a terminal

### `promigence image resolve REF` 
Pins an image tag such as `python:3.12` to its exact digest (`REF@sha256:…`), without a container runtime on your machine. Pass the result to `snapshot create --image`.
- `--registry-secret NAME`, A stored secret holding `user:password` for a private registry
- `--json`, Print the result as JSON, even in a terminal

### `promigence github connect` 
Connects GitHub through the console: it opens the console's page for connecting GitHub in your browser and waits until the connection is made, declined or expired. After that, `snapshot create --repo owner/name` can build from the repositories you gave it, private ones included.
- `--no-open`, Print the console page's link instead of opening a browser
- `--no-wait`, Print the console page's link and return without waiting
- `--wait-timeout DUR`, How long to wait for the connection; when it runs out, the command exits with code 11. Default: 10m
- `--json`, Print the result as JSON, even in a terminal

### `promigence github status` 
Shows your GitHub connection: the connected accounts, installs GitHub has not confirmed yet, and the branches that rebuild a snapshot on every push.
- `--json`, Print the result as JSON, even in a terminal

### `promigence github disconnect <installation_id|account>` 
Disconnects a GitHub account, named by its installation ID or account name: nothing more is built from it and its tracked branches stop rebuilding. The App stays installed on GitHub until you uninstall it there.
- `--json`, Print the result as JSON, even in a terminal

### `promigence github untrack <track_id|alias>` 
Stops a tracked branch, named by its track ID or by the alias it moves, from rebuilding its snapshot on every push. The snapshot itself is kept.
- `--json`, Print the result as JSON, even in a terminal

### `promigence repos` 
Lists the repositories your GitHub or GitLab connection can read; pass one to `snapshot create --repo`.
- `--page N`, Which page to show, 100 repositories a page. Default: 1
- `--provider NAME`, `github` (the default) or `gitlab`
- `--connection ID`, With `--provider gitlab`: one GitLab connection, by its `glc_…` ID
- `--json`, Print the result as JSON, even in a terminal

### `promigence gitlab connect` 
Connect GitLab read-only in the console; waits.
- `--no-open`, Print the page, open nothing
- `--no-wait`, Print the page and return
- `--wait-timeout DUR`, For the connection (10m); expiry = exit 11
- `--json`, Force the JSON envelope

### `promigence gitlab status` 
GitLab users, pending confirmations, tracks.
- `--json`, Force the JSON envelope

### `promigence gitlab disconnect <connection_id|username>` 
Revoke a GitLab connection.
- `--json`, Force the JSON envelope

### `promigence gitlab untrack <track_id|alias>` 
Stop rebuilding on commits (snapshot stays).
- `--json`, Force the JSON envelope

### `promigence snapshot delete <hash|alias>` 
Deletes one of your snapshots, by ID or alias. It is refused while any sandbox started from the snapshot is still running; finished runs keep their reports.
- `--json`, Print the result as JSON, even in a terminal

### `promigence snapshot builds` 
Lists your snapshot builds, newest first. A rejected build keeps the reason it was rejected.
- `--limit N`, How many builds to list. Default: 20
- `--state S`, Only builds in this state: `queued`, `running`, `verified`, `rejected` or `failed`
- `--cursor C`, The `next_cursor` of an earlier page, to list the page after it
- `--json`, Print the result as JSON, even in a terminal

### `promigence snapshot alias <hash> [NAME]` 
Gives a snapshot a name (an alias) to use instead of its ID, or removes it with `--clear`; with no NAME, it shows the current alias. An alias is unique within your organization.
- `--clear`, Remove the snapshot's alias instead of setting one
- `--json`, Print the result as JSON, even in a terminal

## Runs

Quote, cap, fork N copies, execute, and read which copies were valid.

### `promigence run -- CMD` 
Starts N sandboxes from a snapshot, runs CMD in each, and prints the validity report when they finish. Each sandbox ends when CMD exits, unless you pass `--keep`.
- `--snapshot H`, The snapshot to start from: an ID, an alias or `alias@commit7`, or a `./env.promigence` file. Default: `promigence/base`
- `--image REF`, Start from an image (a tag or `REF@sha256:D`) instead of `--snapshot`; the first time, its snapshot is built and the build counts toward --cap
- `--count N` **(required)**, How many sandboxes to start; commands in each get `PROMIGENCE_INDEX` (0..N-1) and `PROMIGENCE_SEED`
- `--timeout DUR`, How long each sandbox may run. Default: 15m
- `--cap USD` **(required)**, The most the run may spend, in USD; a run quoted above it is refused (exit 5)
- `--allow-partial`, If the cap cannot cover every sandbox, start as many as it allows and mark the rest `not_started`
- `--secret NAME`, Give the sandboxes a stored secret as an environment variable of the same name (repeatable)
- `--verify-each`, Re-run the snapshot's verify command in each sandbox before CMD runs
- `--network none|egress`, Outbound network access: `egress` (allowed) or `none` (no network). Default: `egress`
- `--allow HOST`, Let the sandboxes reach only these hosts (repeatable, or comma-separated; not with `--network` none)
- `--optimize-for start|compute`, What to favour: `start` (fast, wide starts) or `compute` (raw speed for long, memory-heavy jobs on tiers of 15 GiB or more). Default: `start`
- `--label K=V`, A label of your own as K=V, returned with the run (repeatable)
- `--wait-timeout DUR`, How long to wait for the run; when it runs out, the command exits with code 11 and the run keeps going. Default: 100s
- `--grade CMD`, A command that scores the work in a clean copy of the environment after CMD ends
- `--holdout CMD`, A second, held-out test command; the report shows the gap between the two pass rates
- `--grade-score M`, How the grader's result is read: `exit` (exit 0 passes), `last_line_json` (a last line such as `{"score":0.8,"pass":true}`) or `tap` (TAP output). Default: `exit`
- `--grade-timeout DUR`, Time limit for each grader. Default: 10m
- `--grade-output`, Keep the last 16 KiB of the grader's output for the report (never the held-out grader's)
- `--fail-on task|env|none`, Which failures make the command exit non-zero: `task` (all of them), `env` (all except task failures) or `none`. Default: `task`
- `--keep`, Keep the sandboxes running after CMD ends; they are billed until killed or their --timeout
- `--stream`, Show each sandbox's output live (the default in a terminal)
- `--no-stream`, Turn live output off and print one result at the end, even in a terminal
- `--max-output BYTES`, The most output kept from each of CMD's output streams. Default: 64k
- `--idempotency-key K`, A key you choose; repeating the command with the same key within 24 hours returns the first result and starts nothing new
- `--verbose`, Also show start-up timing percentiles and outcome totals in the text summary

### `promigence run quote` 
Prices a run before you start it: the most it can cost for the number of sandboxes and the timeout you give. It starts nothing and spends nothing.
- `--snapshot H`, The snapshot to price: an ID, an alias or `alias@commit7`, or a `./env.promigence` file. Default: `promigence/base`
- `--count N` **(required)**, How many sandboxes to price
- `--timeout DUR`, How long each sandbox may run. Default: 15m
- `--tier T`, The tier to price at; it must match the snapshot's assigned tier
- `--cap USD`, Check the quote against this spend cap, in USD; nothing is spent
- `--json`, Print the result as JSON, even in a terminal

### `promigence run report ID` 
Shows a run's validity report: each sandbox's outcome, whether a failure came from the environment or from your task and how to fix it, and what the run cost.
- `--json`, Print the result as JSON, even in a terminal
- `--sandboxes all|failed`, Which sandboxes to list: `all`, or only the `failed` ones. Default: the summary plus the sandboxes that did not complete
- `--sandbox SID`, Show this one sandbox in full
- `--repro`, With `--sandbox`: also print a command that runs exactly that sandbox again
- `--limit N`, How many sandboxes the text lists before saying how many more there are; 0 lists them all, and `--json` is never cut. Default: 50

### `promigence run status ID` 
Shows a run's state and how many of its sandboxes are in each state. With `--wait`, it waits for the run to finish.
- `--wait`, Wait for the run to finish, for at most `--wait-timeout` (default 100s)
- `--wait-timeout DUR`, How long `--wait` waits; when it runs out, the command exits with code 11 and the run keeps going. Default: 100s
- `--json`, Print the result as JSON, even in a terminal

### `promigence run cancel ID` 
Cancels the sandboxes of a run that are still queued. Sandboxes that already started keep running; `run kill` ends those too.
- `--json`, Print the result as JSON, even in a terminal

### `promigence run kill ID` 
Ends every sandbox of a run, including any still queued. The run's report still shows what each sandbox did before the kill.
- `--json`, Print the result as JSON, even in a terminal

### `promigence run replay ID` 
Runs the environment failures of a run again, in new sandboxes. A replay happens only when you ask for one, and it is reported apart from the run's own success figures.
- `--sandbox SID`, Replay only this sandbox (repeatable)
- `--env K=V`, A value for each variable the run's command was started with (runs keep names, never values)
- `--json`, Print the result as JSON, even in a terminal

### `promigence run open ID` 
Reopens a failed sandbox as a new, live sandbox in the state it was in when it failed, so you can look around. It has its own ID and is billed from the moment it opens.
- `--sandbox SID`, Which failed sandbox to reopen. Default: the only one
- `--cap USD`, The most the reopened sandbox may spend, in USD
- `--timeout DUR`, How long the reopened sandbox may run. Default: the run's timeout
- `--json`, Print the result as JSON, even in a terminal

### `promigence run captures ID` 
Lists the failed sandboxes of a run whose state was kept so that `run open` can reopen them, and when each one expires.
- `--delete SNAPSHOT_ID`, Delete the capture with this SNAPSHOT_ID now, before it expires
- `--json`, Print the result as JSON, even in a terminal

### `promigence run list` 
Lists your runs, newest first, with each one's state, number of sandboxes and snapshot.
- `--limit N`, How many runs to list. Default: 20
- `--state S`, Only runs in this state: `running`, `completed`, `cap_killed` or `aborted`
- `--cursor C`, The `next_cursor` of an earlier page, to list the page after it
- `--json`, Print the result as JSON, even in a terminal

## Sandboxes

Long-lived sandboxes you drive command by command: exec, files, pause, resume, fork.

### `promigence fork` 
Starts N sandboxes from a snapshot under a spend cap and waits until they are ready. Each sandbox gets its snapshot's size (`small` for the base); for another size, build a snapshot with `promigence snapshot create --image REF --tier T`.
- `--snapshot H`, The snapshot to start from: `snap_<id>`, an alias (`alias@commit7` pins a commit) or a bundle file such as `./env.promigence`. Default: `promigence/base`
- `--count N` **(required)**, How many sandboxes to start
- `--timeout DUR`, How long each sandbox may run. Default: 15m
- `--cap USD` **(required)**, The most the run may spend, in USD; a run quoted above it is refused (exit 5)
- `--allow-partial`, If the cap cannot cover every sandbox, start as many as it allows and mark the rest `not_started`
- `--secret NAME`, Give the sandboxes a stored secret as an environment variable of the same name (repeatable)
- `--verify-each`, Re-run the snapshot's verify command in each sandbox before it is handed over
- `--network none|egress`, Outbound network access: `egress` (allowed) or `none` (no network). Default: `egress`
- `--allow HOST`, Let the sandboxes reach only these hosts (repeatable, or comma-separated; not with `--network none`)
- `--optimize-for start|compute`, What to favour: `start` (fast, wide starts) or `compute` (raw speed for long, memory-heavy jobs on tiers of 15 GiB or more). Default: `start`
- `--label K=V`, A label of your own as K=V, returned with the run (repeatable)
- `--wait-timeout DUR`, How long to wait for the sandboxes to be ready; when it runs out, the command exits with code 11 and nothing is killed. Default: 100s
- `--no-wait`, Return as soon as the run is created, without waiting for the sandboxes to be ready
- `--fresh`, Always start new sandboxes; by default, the same command repeated within the same 10-minute window returns the earlier sandboxes
- `--stream`, Show output live (the default in a terminal)
- `--no-stream`, Turn live output off and print one result at the end, even in a terminal
- `--idempotency-key K`, A key you choose; repeating the command with the same key within 24 hours returns the first result and starts nothing new
- `--verbose`, Also show start-up timing percentiles and outcome totals in the text summary
- `--json`, Print the result as JSON, even in a terminal

### `promigence exec -- CMD` 
Runs a command (everything after `--`) in one sandbox with `--sandbox SID`, or in every ready sandbox of a run with `--run ID --all`.
- `--sandbox SID`, Run in this sandbox; prints the command's own output (JSON only with `--json` or `PROMIGENCE_OUTPUT=json`) and exits with its exit code: 127 if the command is not found, 125 if Promigence itself fails
- `--run ID`, The run to target, with `--all`; sandboxes still queued are reported as skipped unless you pass `--wait`
- `--all`, With `--run`, run in every ready sandbox of that run; exits with code 0 if every command exits 0, otherwise 4
- `--no-passthrough`, Exit with a Promigence exit code (0–12) instead of the command's own
- `--background`, With `--sandbox`, start the command in the background, print its `exec_id` and return at once
- `--stdin`, With `--background`, keep the command's stdin open so you can write to it with `promigence exec stdin`
- `--secret NAME`, Give the command this stored secret as an environment variable of the same name (repeatable)
- `--stream`, Show output live (the default in a terminal)
- `--no-stream`, Turn live output off and print one result at the end, even in a terminal
- `--max-output BYTES`, The most output kept from each of the command's output streams; past it the rest is cut, and text output exits with code 12. Default: 64k, or 32m (the maximum) into a pipe or file
- `--timeout DUR`, How long the command may run. Default: 15m
- `--wait`, With `--run --all`, first wait for sandboxes that are not ready yet, for at most `--wait-timeout` (default 100s)
- `--wait-timeout DUR`, How long `--wait` waits; when it runs out, the command exits with code 11 and nothing is killed. Default: 100s
- `--idempotency-key K`, A key you choose; repeating the command with the same key within 24 hours runs it only once and returns the first result

### `promigence exec output EXEC_ID` 
Prints the output of a command by its exec id. For a background command (an id starting with `x_`), name its sandbox with `--sandbox`, and add `--follow` to stream the output until the command exits.
- `--range A-B`, Only this byte range: 0-based, with B included; `A-` reads to the end
- `--sandbox SID`, Look for the command in this sandbox; required for a background command (`x_…`)
- `--run ID`, Look for the command in this run
- `--stderr`, Print the command's stderr instead of its stdout
- `--follow`, For a background command, stream its output until it exits, then exit with its exit code
- `--json`, Print the result as JSON, even in a terminal

### `promigence exec ps` 
Lists a sandbox's background commands (those started with `exec --background`), with their state and exit code.
- `--sandbox SID` **(required)**, The sandbox to list
- `--json`, Print the result as JSON, even in a terminal

### `promigence exec stdin EXEC_ID` 
Writes input to a background command's stdin. The command must have been started with `exec --background --stdin`.
- `--sandbox SID` **(required)**, The sandbox the command runs in
- `--data TEXT`, Write this text. Default: read standard input to EOF and write that
- `--file P`, Write the bytes of this local file
- `--eof`, Close the command's stdin after writing (the default when the input is piped in)
- `--no-eof`, Keep the command's stdin open after writing piped input
- `--json`, Print the result as JSON, even in a terminal

### `promigence exec kill EXEC_ID` 
Sends a signal to a background command, SIGKILL unless you choose another with `--signal`.
- `--sandbox SID` **(required)**, The sandbox the command runs in
- `--signal SIG`, The signal to send: `TERM`, `INT`, `HUP`, `KILL` or a signal number. Default: SIGKILL
- `--forget`, Then also drop the command's handle and the output kept for it
- `--json`, Print the result as JSON, even in a terminal

### `promigence files put SRC DST` 
Copies a local file SRC into a sandbox at DST, an absolute path in the sandbox. Add `--recursive` to copy a whole directory.
- `--sandbox SID` **(required)**, The sandbox to copy into
- `--recursive`, Copy a directory: SRC is a local directory and DST a directory in the sandbox (needs `tar` on this machine)
- `--json`, Print the result as JSON, even in a terminal

### `promigence files get SRC DST` 
Copies a file out of a sandbox: SRC is an absolute path in the sandbox, and DST a local path, or `-` for stdout. Add `--recursive` to copy a whole directory.
- `--sandbox SID` **(required)**, The sandbox to copy from
- `--recursive`, Copy a directory: SRC is a directory in the sandbox and DST a local directory
- `--exclude GLOB`, With `--recursive`, leave out paths that match this pattern, e.g. `.git` (repeatable)
- `--keep-links`, With `--recursive`, keep symbolic links that point outside DST (by default they stop the copy)
- `--json`, Print the result as JSON, even in a terminal

### `promigence files ls [PATH]` 
Lists a directory in a sandbox (default `/`), with each entry's type, permissions, size and modification time. Symbolic links are listed as links, not followed.
- `--sandbox SID` **(required)**, The sandbox to look in
- `--recursive`, List everything below PATH, not just one level
- `--depth N`, With `--recursive`, how many levels to go down
- `--limit N`, Stop after N entries; the output says when it was cut short
- `--no-hidden`, Leave out dotfiles (they are listed by default)
- `--json`, Print the result as JSON, even in a terminal

### `promigence files search [PATH]` 
Finds files under PATH in a sandbox (default `/`) by name pattern, by text inside them, or both. Text matches print as `path:line: text`.
- `--sandbox SID` **(required)**, The sandbox to search
- `--name GLOB`, Match file names against this pattern, e.g. `'*.py'`
- `--contains TEXT`, Find this text, taken literally, inside the matching files
- `--ignore-case`, Ignore upper and lower case for `--contains`
- `--limit N`, Stop after N matches; the output says when it was cut short
- `--no-hidden`, Skip dotfiles and dot-directories
- `--json`, Print the result as JSON, even in a terminal

### `promigence files mkdir PATH` 
Creates a directory at PATH, an absolute path in a sandbox.
- `--sandbox SID` **(required)**, The sandbox to create it in
- `--parents`, Like `mkdir -p`: create missing parent directories, and do not fail if it already exists
- `--mode OCTAL`, Permissions in octal, e.g. `755`
- `--json`, Print the result as JSON, even in a terminal

### `promigence files mv SRC DST` 
Moves or renames a file or directory inside a sandbox; SRC and DST are absolute paths.
- `--sandbox SID` **(required)**, The sandbox the paths are in
- `--overwrite`, Replace DST if it already exists
- `--json`, Print the result as JSON, even in a terminal

### `promigence files cp SRC DST` 
Copies a file or directory to another place in the same sandbox; SRC and DST are both absolute paths in the sandbox.
- `--sandbox SID` **(required)**, The sandbox the paths are in
- `--recursive`, Copy a directory and everything under it
- `--overwrite`, Replace DST if it already exists
- `--json`, Print the result as JSON, even in a terminal

### `promigence files chmod PATH` 
Changes the permissions, owner or group of a path in a sandbox; give at least one of `--mode`, `--uid` or `--gid`.
- `--sandbox SID` **(required)**, The sandbox the path is in
- `--mode OCTAL`, New permissions in octal, e.g. `755`
- `--uid N`, New owner, as a numeric user id
- `--gid N`, New group, as a numeric group id
- `--recursive`, Apply to the directory and everything under it
- `--json`, Print the result as JSON, even in a terminal

### `promigence agent start claude|codex|opencode` 
Starts a coding agent (`claude`, `codex` or `opencode`) in a new sandbox, with its model key taken from a stored secret. With `--prompt` it works on a task in the background; otherwise it prints the command that opens its terminal, or `--attach` opens it now.
- `--key-secret NAME[=VAR]`, The stored secret that holds the model key; NAME=VAR gives it to the agent as VAR. Default: `ANTHROPIC_API_KEY` (`OPENAI_API_KEY` for codex)
- `--key-from-env VAR`, First store the key from this environment variable, so it never appears on the command line
- `--snapshot H`, Start from this snapshot; the agent is installed if it is missing. Default: `promigence/base`
- `--image REF@sha256:D`, Start from this container image instead of `--snapshot`
- `--repo URL`, Clone this public repository and start the agent in it
- `--prompt TEXT`, Have the agent work on this task headless, in the background
- `--model M`, The agent's model (opencode: provider/model, e.g. xai/grok-4-0709)
- `--attach`, Open the agent's terminal now
- `--timeout DUR`, How long the sandbox lives. Default: 1h
- `--cap USD`, Spend cap in US dollars. Default: `PROMIGENCE_SPEND_CAP`, or else the org's default cap
- `--wait-timeout DUR`, How long to wait for the sandbox to be ready; when it runs out, the command exits with code 11 and nothing is killed. Default: 100s
- `--json`, Print the result as JSON, even in a terminal

### `promigence sandbox kill SID` 
Ends one sandbox, which stops its billing.
- `--json`, Print the result as JSON, even in a terminal

### `promigence sandbox network SID` 
Shows what a sandbox may reach on the network and, when it has an allow-list, the hosts it was refused. `--cut` turns off its outbound access for good.
- `--cut`, Cut this sandbox's outbound access now; it cannot be turned back on
- `--json`, Print the result as JSON, even in a terminal

### `promigence sandbox shell SID [-- CMD]` 
Opens an interactive terminal in a sandbox; keys such as Ctrl-C reach the sandbox and the size follows your window. Anything after `--` runs instead of the login shell.
- `--cmd CMD`, Run this command instead of the login shell (through `sh -c`)
- `--cwd DIR`, Start in this directory
- `--env K=V`, Set an environment variable, K=V (repeatable)
- `--secret NAME[=VAR]`, Put a stored secret in the terminal's environment; NAME=VAR puts it in the variable VAR (repeatable)

### `promigence sandbox ssh SID [-- CMD]` 
Logs you in to a sandbox over SSH, with the key and access set up for you; `scp`, `sftp` and port forwarding with `-L` work too. Anything after `--` runs as a remote command.
- `--config`, Print an SSH config block instead of logging in, for an IDE, `scp`, `sftp` or `rsync`
- `--print`, Print the connection details (the `ssh` command to run) instead of logging in
- `--key PATH`, Use this key pair instead of making one (its `.pub` file must sit beside it)
- `--ttl S`, How long the access lasts, in seconds. Default and maximum: 3600
- `--idle S`, Close a session after this many seconds with no activity
- `--proxy`, Carry one connection over stdin and stdout; `ssh` itself uses this
- `--list`, List the keys that have access, then exit
- `--revoke KEY_ID`, End one key's access, then exit
- `--json`, Print the result as JSON, even in a terminal

### `promigence port expose PORT` 
Publishes a port of a sandbox at a preview URL. Anyone with the URL can reach the port until you revoke it.
- `--sandbox SID` **(required)**, The sandbox whose port to publish
- `--json`, Print the result as JSON, even in a terminal

### `promigence port list` 
Lists a sandbox's preview URLs and the ports they publish.
- `--sandbox SID` **(required)**, The sandbox whose preview URLs to list
- `--json`, Print the result as JSON, even in a terminal

### `promigence port revoke TOKEN|PORT` 
Takes preview URLs down: give a token to remove that one URL, or a port to remove every URL for it.
- `--sandbox SID` **(required)**, The sandbox the preview URL belongs to
- `--json`, Print the result as JSON, even in a terminal

### `promigence secrets set NAME` 
Stores a secret under NAME, reading the value from an environment variable, a file or stdin; a value typed on the command line is refused. Give it to sandboxes with `--secret NAME`.
- `--from-env VAR`, Read the value from this environment variable
- `--from-file P`, Read the value from this file
- `--host HOST`, Bind the secret to a host: requests sent to the address this command prints for HOST are authenticated for you, and the value stays out of the sandbox unless a run asks for it (see `--no-raw`) (repeatable)
- `--header NAME`, With `--host`, the request header that carries the key (repeatable). Default: the usual API-key headers
- `--no-raw`, With `--host`, never give the value itself to a sandbox
- `--list`, List the names of stored secrets; values are never shown
- `--delete`, Delete the secret NAME
- `--json`, Print the result as JSON, even in a terminal

### `promigence sandbox list` 
Lists your sandboxes, newest first. Filter by state or by run label, and use `--cursor` to page through.
- `--limit N`, How many to show. Default: 50
- `--state S`, Only sandboxes in these states, comma-separated: `queued`, `awaiting_capacity`, `ready`, `running`, `paused`, `ended` (repeatable)
- `--label K=V`, Only sandboxes whose run carries every label given (repeatable)
- `--cursor C`, Show the next page: pass the `next_cursor` of an earlier page
- `--json`, Print the result as JSON, even in a terminal

### `promigence sandbox pause SID` 
Pauses a sandbox: while paused it is not billed by the second and does not count against your concurrency limit. Commands started with `exec --background` are ended; anything else you started keeps running when it resumes. A paused sandbox is kept for 30 days, and resuming it starts the 30 days again; after that it is deleted (its `pause_expires_at` says when).
- `--json`, Print the result as JSON, even in a terminal

### `promigence sandbox resume SID` 
Brings a paused sandbox back and starts its clock again, for billing and for its timeout. A sandbox that was paused because its run reached its spend cap goes on only with a higher cap (`--cap`).
- `--optimize-for start|compute`, `start` or `compute`, as for `fork`. Default: what the sandbox was created with
- `--cap USD`, For a sandbox paused at its run's spend cap: the run's new, higher cap, in USD
- `--json`, Print the result as JSON, even in a terminal

### `promigence sandbox snapshot SID` 
Takes a snapshot of a running sandbox without stopping it, so new sandboxes can start from this point. Commands started with `exec --background` are ended to take it.
- `--json`, Print the result as JSON, even in a terminal
- `--alias NAME`, Give the snapshot this alias
- `--move-alias`, Take the alias from the snapshot that has it now
- `--force`, Take it even though the sandbox was given a secret; the snapshot, and every sandbox started from it, can then contain that value

### `promigence secrets list` 
Lists your stored secrets by name, with the hosts any of them are bound to; values are never shown.
- `--json`, Print the result as JSON, even in a terminal

### `promigence secrets delete NAME` 
Deletes a stored secret.
- `--json`, Print the result as JSON, even in a terminal

### `promigence sandbox info SID` 
Shows one sandbox: its state, tier, time left, cost so far and the commands it has run.
- `--json`, Print the result as JSON, even in a terminal

### `promigence sandbox extend SID` 
Gives a live sandbox more time by setting a longer total timeout. It is refused (exit 5) if the extra time would take the run past its spend cap.
- `--timeout DUR` **(required)**, The sandbox's new total timeout, e.g. `30m`
- `--json`, Print the result as JSON, even in a terminal

### `promigence sandbox autopause SID` 
Makes a sandbox pause itself once it has been idle for `--after`, or turns that off with `--off`. With no flag, shows the rule the sandbox is under.
- `--after DUR`, Pause the sandbox once it has been idle this long. Minimum: 2s
- `--off`, Never pause it for being idle; only its timeout ends it
- `--mode MODE`, What counts as idle: `requests` (the default) means no API requests; `activity` also requires no CPU use, no network traffic and no open connection inside the sandbox
- `--json`, Print the result as JSON, even in a terminal

### `promigence sandbox probe SID` 
Checks whether a sandbox's files still match the verified snapshot it started from, using the paths the snapshot recorded or the ones you name with `--path`. Exits with code 3 if they differ.
- `--path P`, Check these paths instead (repeatable); where the snapshot recorded none (the base, or one built with `--image` or from a connected repository), give each as `PATH=blake3:<hex>`
- `--json`, Print the result as JSON, even in a terminal

### `promigence files rm PATH` 
Deletes a file or directory at PATH, an absolute path in a sandbox.
- `--sandbox SID` **(required)**, The sandbox the path is in
- `--recursive`, Delete a directory and everything under it
- `--json`, Print the result as JSON, even in a terminal

## Ops

Accounts, keys, billing, organisations, connections and CI runners.

### `promigence bench burst` 
Starts N sandboxes at once and reports how many came up within the timeout and percentiles of how long they took to be ready. The sandboxes are ended once measured, unless you pass `--keep`.
- `--snapshot H` **(required)**, The snapshot to start from: an ID, an alias, `alias@commit7` or `promigence/base`
- `--count N` **(required)**, How many sandboxes to start at once
- `--timeout D`, Each sandbox's timeout. Default: 120s, as in the public burst benchmark
- `--cap USD`, Spend cap for the burst, in USD; required unless `PROMIGENCE_SPEND_CAP` is set
- `--keep`, Leave the sandboxes running afterwards; by default they are ended once measured
- `--json`, Print the result as JSON, even in a terminal

### `promigence runners github` 
Runs your GitHub Actions jobs in sandboxes: jobs with `runs-on: promigence` are picked up until you press Ctrl-C. Its GitHub token comes from the environment and needs Actions read and Administration write (with `--org`: Self-hosted runners write), or `repo` (plus `admin:org`) on a classic token.
- `--repo OWNER/REPO`, Take the jobs of this repository
- `--org ORG`, Or take the jobs of every repository in this organization
- `--runner-group NAME`, With `--org`: the runner group the runners join. Default: `Default`
- `--token-env VAR`, The environment variable holding a GitHub token. Default: `GH_TOKEN`, then `GITHUB_TOKEN`
- `--labels A,B`, The `runs-on` labels this pool takes, comma-separated; `promigence-small`, `promigence-medium` and `promigence-large` also pick a size. Default: `promigence`
- `--tier small|medium|large`, The size for a job whose labels name no size. Default: small
- `--warm N`, Keep N runners waiting so jobs start at once; they are billed while idle
- `--max M`, The most sandboxes running at once. Default: 10
- `--cap USD`, The most one job may cost, in USD. Default: what its full timeout costs at its size
- `--timeout DUR`, The longest a job may run. Default: the longest sandbox your plan allows
- `--idle-timeout DUR`, Stop a runner started on demand if no job takes it within this time. Default: 90s
- `--kill-on-exit`, On Ctrl-C, cancel running jobs instead of waiting for them
- `--prepare`, Build the runner snapshot for the `--tier` size, then exit
- `--yes`, Build a missing runner snapshot without asking; each size's build is billed per second while it runs
- `--github-api URL`, The API URL of your GitHub Enterprise Server. Default: `https://api.github.com`
- `--json`, Print the result as JSON, even in a terminal

### `promigence runners gitlab` 
Runs your GitLab CI jobs in sandboxes, as a runner with the tags you gave it in GitLab, until you press Ctrl-C. The runner token (`glrt-…`) comes from the environment and jobs on this runner can read it, so use it only for projects whose CI code you trust.
- `--url URL`, The address of your GitLab. Default: `https://gitlab.com`
- `--token-env VAR`, The environment variable holding the runner authentication token. Default: `GITLAB_RUNNER_TOKEN`
- `--executor docker|shell`, Run each job in a container (`docker`) or directly in the sandbox (`shell`). Default: `docker`
- `--default-image REF`, With `docker`: the image for a job that sets no `image:`. Default: `ubuntu:24.04`
- `--pool N`, How many runners to keep running; they are billed while idle. Default: 1 (0 with `--api-token-env`)
- `--api-token-env VAR`, The environment variable holding a GitLab token with `read_api`; with it, runners start only when jobs are pending
- `--max M`, The most sandboxes running at once. Default: 10
- `--tier small|medium|large`, The runner size. Default: small
- `--cap USD`, The most one job may cost, in USD. Default: what its full timeout costs at its size
- `--timeout DUR`, The longest a job may run. Default: the longest sandbox your plan allows
- `--idle-timeout DUR`, With `--api-token-env`: how long a runner waits for a job before it stops. Default: 90s
- `--kill-on-exit`, On Ctrl-C, cancel running jobs instead of waiting for them
- `--prepare`, Build the runner snapshot for the `--tier` size, then exit
- `--yes`, Build a missing runner snapshot without asking; the build is billed per second while it runs
- `--json`, Print the result as JSON, even in a terminal

