Skip to main content
Use this page as the command index for the amika CLI.

Global flags

Most commands accept -o/--output to choose how they print their result, so you can read output at a terminal and pipe the same command into a script or jq.
Most list commands emit a JSON array. snapshot list is the exception and emits a { "items": [...] } object. In JSON mode the CLI never prompts, so destructive commands need their confirmation flag (--force for deletes, --no-interactive for snapshot create). Progress messages go to stderr, so stdout carries only the JSON value. Commands that open a shell or an editor (rig connect, rig open, rig create --connect) and commands that show a masked credential table and ask for confirmation (secret extract, secret push) reject -o json. rig ssh and scp hand their arguments to the system ssh and scp, so they don’t take --output at all.

Naming the current rig

Inside a rig, any argument or flag that names a rig also accepts _self, which resolves to the current rig from the AMIKA_RIG_NAME environment variable:

amika rig

Manage rigs.
amika sandbox remains available as a compatibility alias. Use amika rig in new commands and scripts.

Global rig flags

Rigs always run remotely, on Amika Cloud or on one of your organization’s own hosts. --remote remains an accepted no-op for compatibility. The retired --local flag is hidden and returns an error.

Create

Create flags

--no-setup and --setup-script are mutually exclusive.
Supported agent kinds for --agent-credential, --agent-credential-type, and --no-agent-credential are claude and codex. Each flag may appear at most once per kind. --no-agent-credential is mutually exclusive with the other two for the same kind. See Inject credentials for usage.
Rigs clone from the repository remote. Push local commits before creation. The CLI rejects an inferred branch that is not present and up to date on origin.

List

Aliases: ls
Output columns: NAME, STATE, REPO, BRANCH, CREATOR. --long adds ID, BASE_SNAPSHOT, PORTS, and CREATED. CREATOR shows - when the creator is unknown, for example for a rig an API key created. Column selection only applies to text output. -o json always includes every field.

Get

Show one rig by name or ID.
Text output prints one key: value per line, with dotted keys for nested fields. ssh_host is the rig’s SSH alias from ~/.ssh/amika.conf, which you can use with ssh, scp, or an editor’s Remote-SSH.

Connect

Open an interactive shell in a rig. connect is the shell-only form of rig ssh and uses the same transport. It takes no flags.
The shell starts in /home/amika. Like rig ssh, it needs an SSH key from amika secret ssh-keygen.

Delete

Aliases: rm, remove

Stop

Stop one or more running rigs without removing them.

Start

Start (resume) one or more stopped rigs.

SSH

Aliases: sshv2 SSH into a rig. Use it like ssh: options go before the rig name, and an optional command goes after it. Every ssh option works, including port forwarding. Requires an SSH key from amika secret ssh-keygen.
rig ssh has no flags of its own: everything after ssh goes to ssh. Write Amika’s own flags before ssh, as in amika rig --remote ssh my-rig. Local (-L), dynamic (-D), and agent forwarding are supported. Agent forwarding uses a dedicated agent that holds only your Amika SSH key, so your other keys never reach the rig. Remote (-R) and X11 forwarding are not supported.

Open

Aliases: code, codev2 Open a rig in an editor or app over SSH. The command adds a named SSH host to Amika’s managed SSH config, then starts or configures the app you pick. Requires an SSH key from amika secret ssh-keygen.
rig open, --app, and the herdr app ship in the next CLI release. In v0.23.0 and earlier, run amika rig code <name> --editor <app> instead. It supports every app except herdr.
What each app does: See Open in your editor for setup details.

Agent Send

Send a message to a coding agent in an existing rig. This is the rig-scoped form of amika send --rig <name>, with the same session handling, streaming, and JSON output. The message can be a positional argument or piped through stdin. The command waits for the agent to finish. Without --session-id or --new-session, the message continues the latest API chat on the rig, or starts one if there is none. The session ID is printed to stderr as session_id: <id>.

amika send

Send a message to a coding agent and keep the conversation as a chat. Name an existing rig with --rig, continue a chat with --session-id, or omit both to create a new rig for the chat.
When send creates a rig, repository and branch selection work like rig create: the current Git repository and branch are used unless --git, --no-git, --branch, or --new-branch say otherwise. These flags can’t be combined with --rig or --session-id. In text output, the reply goes to stdout and metadata such as session_id goes to stderr. With -o json, the command prints one object with session_id, sandbox_id, agent, response, is_error, is_new_session, created_sandbox, and optional usage. If the agent fails, the command still prints its response, then exits with an error. --repo is a deprecated alias for --git.

amika sessions

Aliases: session List and read the agent chats created by amika send and amika rig agent-send.

List

Output columns: SESSION ID, AGENT, STATUS, SANDBOX, UPDATED.

Show

Print a chat’s details and every message in it.

amika scp

Aliases: scpv2 Copy files between your machine, rigs, and other SSH hosts. amika scp wraps the system scp: every argument is passed through, so the usual scp flags (-r, -p, -C, -v) work. Requires an SSH key from amika secret ssh-keygen.
A bare host:path always names a rig. Use an scp:// URI to reach another SSH host.

amika snapshot

Manage snapshots captured from running rigs. See Create a snapshot for the end-to-end flow.

Create

Capture a snapshot from a running rig. Interactive by default: it prompts for the capture mode and name, and for scrub_and_delete it previews the injected secrets that will be removed and asks for confirmation. Pass --no-interactive for a non-prompting run, which then requires --mode and --name.
Capture modes: Capture runs in the background; check progress with amika snapshot list. A snapshot of a rig on one of your own hosts stays on that host and can only boot rigs there. See Bring your own compute.

List

Aliases: ls
Output columns: NAME, STATE, PROVIDER, SOURCE, CREATED. --long adds HOST, SIZE, BASE, DESCRIPTION, and ERROR. HOST names the host a snapshot was taken on, if it came from one of your own hosts.

Delete

Aliases: rm, remove

amika service

Aliases: services Manage the services on your rigs. See Services for how to declare services in .amika/config.toml.

List

Aliases: ls
Output columns: SERVICE, SANDBOX, PORTS, URL.

Create

Add a service to a running rig, for a port you start listening on after the rig is created.

Delete

Aliases: rm, remove

amika host

Aliases: hosts Inspect and retire your organization’s own hosts (bring your own compute). See Bring your own compute for the setup flow. A host registers itself when amika-hostd up runs on the machine, so there is no command to add one. A rig runs on Amika Cloud unless amika rig create --host names one of these hosts.

List

Aliases: ls Output columns: HOSTNAME, TRANSPORT, URL, SIZES. TRANSPORT is tunnel (connected to Amika’s gateway) or listen (serves a URL it registered). A tunnel host always shows - for URL. A listen host shows - until it registers a URL, and can’t take rigs until then.

Get

Shows one host’s details and the sizes it offers. Those size names, not the cloud size vocabulary, are what rig create --host ... --size ... accepts.

Delete

Aliases: rm, remove
A host that still has rigs on it is refused: delete those rigs first. The machine itself is untouched, so stop its daemon with amika-hostd down or it registers itself again on the next amika-hostd up.

amika auth

Authentication commands.

amika auth login

Log in to Amika via the WorkOS Device Authorization Flow. Opens a browser for you to authorize the CLI.
To skip the browser flow and log in with an Amika API key, for example in CI, pass --api-key-file. Use - to read from stdin so the key never lands on disk:
A successful login also writes Amika’s managed SSH config (~/.ssh/amika.conf, included from ~/.ssh/config) and prints the files it touched. See Authentication for details on the login flow and session storage.

amika auth status

Show current authentication status.
Prints the logged-in email and organization, or “Not logged in” if no session exists.

amika auth logout

Log out of Amika and remove the saved session.

amika auth api-key create

Create an Amika API key and write it to a file. Use API keys for CI jobs, scripts, another machine’s CLI, or an amika-hostd host daemon. The key’s value is shown only once, so the command writes it to --out and never prints it, including with -o json.
amika auth api-key create needs amika CLI v0.24.0 or later. With an older CLI, create API keys in the web UI at app.amika.dev/settings/api-keys.
The file holds the bare key and a newline, so it works as-is with amika auth login --api-key-file and amika-hostd setup --non-interactive. The command checks that it can write --out before it creates the key. If the write still fails afterward, the error names the key’s ID so you can delete it in the web app. A user-scoped key acts as you. Organization-scoped keys have no user behind them, so you can’t use one to create a user-scoped key.

amika secret

Aliases: secrets Manage secrets in the remote Amika secrets store.

amika secret extract

Discover locally stored credentials and optionally push them to the remote store.
See Local credential discovery for the sources it checks.

amika secret push

Push secrets to the remote store from inline arguments, environment variables, or a .env file.
When multiple sources are used, positional arguments override --from-file values, and --from-env overrides both.

amika secret claude

Manage Claude Code credentials for rig authentication. Credentials pushed here can be injected into rigs at creation time.

amika secret claude push

Push Claude Code credentials (API key or OAuth token) to the remote Amika secrets store. Scans your system for Claude credentials and lets you choose which one to push. On macOS, the keychain is also checked.
--value and --from-file are mutually exclusive.

amika secret claude list

Aliases: ls List pushed Claude credentials.
Output columns: ID, NAME, TYPE.

amika secret claude delete

Aliases: rm Delete a Claude credential by ID.

amika secret codex

Manage Codex credentials for rig authentication. Same shape as amika secret claude: pushed credentials can be injected into rigs at creation time.

amika secret codex push

Push Codex credentials (API key or OAuth token) to the remote Amika secrets store. Scans ~/.codex/auth.json for credentials and lets you choose which one to push.
--value and --from-file are mutually exclusive.

amika secret codex list

Aliases: ls List pushed Codex credentials.
Output columns: ID, NAME, TYPE.

amika secret codex delete

Aliases: rm Delete a Codex credential by ID.

amika secret ssh-keygen

Generate an ed25519 SSH keypair and upload only its public half. rig ssh, rig connect, rig open, and scp all need one. The private key is written to ~/.ssh/amika_id_ed25519 and never leaves your machine.
Re-running the command is safe: an existing keypair at ~/.ssh/amika_id_ed25519 is reused. --force is only needed when the name already holds a different key.

amika secret ssh-key

Manage the SSH public keys that authorize access to your rigs. Keys are identified by name, and a name is unique per user.

amika secret ssh-key create

Alias for amika secret ssh-keygen, with the same flags.

amika secret ssh-key push

Upload a public key that already exists on this machine. Reads ~/.ssh/amika_id_ed25519.pub unless --from-file names another file.
Only ed25519 keys are accepted. Pushing the same key again under the same name does nothing.

amika secret ssh-key list

Aliases: ls
Output columns: ID, NAME, KEY.

amika secret ssh-key delete

Aliases: rm
Deleting a key doesn’t revoke access on rigs that are already running. The change applies the next time a rig is provisioned.

Environment variables