Copy pageSign up

CLI reference

Commands for authentication, sandbox lifecycle, remote execution, agents, and previews.

Run Adria commands on your local computer unless a guide says otherwise. Start with Get started quickly to install the CLI and sign in.

cube --help
cube start --help
cube --version

Use --help on any command for all options supported by your installed version.

Account and repository

CommandPurpose
cube loginSign in and authorize GitHub through a browser
cube login --no-browserSign in with a URL and one-time completion code
cube logoutRevoke and remove this local Adria login
cube authShow GitHub and agent credential configuration
cube auth githubConnect or renew GitHub authorization
cube initIdentify the local GitHub repository in Adria
cube init --jsonPrint repository identity and local Git state as JSON

Sandbox lifecycle

<session> means a branch name or Session UUID. Use UUIDs outside a repository or when branch names are ambiguous.

CommandPurpose
cube start <branch-or-session-id>Create or resume a Session and enter its shell
cube connect <session>Connect to an existing Session, resuming if paused
cube sessionsList your Sessions; alias: cube ls
cube sessions --jsonPrint Sessions as JSON
cube pause <session>Stop compute and preserve disk
cube kill <session>Permanently delete a Session and its disk
cube usage --detailedShow monthly VM time and estimated cost per Session

Pause and kill return when their request is accepted. Check completion with cube sessions. cube kill --all deletes all your Sessions and disks across repositories; use a single Session target to remove only one task.

Start and connect options

OptionPurpose
--source-ref origin/releaseChoose the starting remote ref for a new branch (start only)
--tmux workCreate or attach a named remote tmux terminal
--command 'git status'Run a remote command without a PTY
--ttyAllocate a PTY for --command
--terminal currentUse the current terminal; choices: auto, current, cmux, tmux
--diagnosticsPrint Session details and startup timings
--timeout 30mSet the readiness wait; default: 20m
--ssh-configWrite a five-minute OpenSSH config and print its path

Run a command directly from your local terminal:

cube connect feature/payments --command 'git status --short'

Commands execute in the remote repository. --tmux requires an interactive shell and cannot be combined with --command. Remote commands are not automatically replayed after connection loss.

Activity and capture

CommandPurpose
cube sessions --jsonShow VM lifecycle and individual terminal agent observations
cube sessions capture <session> offDisable terminal capture for the Session
cube sessions capture <session> onEnable terminal capture on supported images

Capture records terminal input and output and is enabled by default on supported images. Turning it off stops future collection and does not delete existing data. See logs and agent status for observed state and capture behavior.

SSH and file transfer

cube connect <session> --ssh-config prints the path of a temporary OpenSSH config. Use it with ssh -F, scp -F, or sftp -F. The access grant expires after five minutes. See SSH and terminals and File operations for complete examples.

start and connect also accept OpenSSH forwarding options -L, -R, and -D.

Repository environment files

Run these commands from your local repository. Saved files are reused by new and resumed computers; use apply to refresh a running one.

CommandPurpose
cube env importSelect and save local environment files
cube env import apps/api/.envSave a specific repository environment file
cube env import --dry-runPreview file paths and key names without uploading
cube env import --shared apps/api/.envPublish team defaults with GitHub write access
cube env listShow saved paths, key names, and scopes
cube env apply <session>Refresh environment files in a running computer
cube env remove apps/api/.envRemove personal values for that file

Personal values override shared defaults. Restart your applications after applying changes. See Environment variables for updates, conflicts, and shared configuration.

Agent setup

CommandPurpose
cube auth codexSave an OpenAI API key for Codex
cube auth claudeSave an Anthropic API key for Claude Code
cube auth claude --method setup_tokenSave a Claude setup token
cube auth pi --provider anthropicSave Pi credentials for a selected provider
cube auth codex --removeDisable future delivery of this agent's credential
cube config import codex --dry-runPreview settings and resources to import
cube config import codex --waitImport and wait for cloud acceptance
cube config statusCheck import progress and readiness
cube config remove codexRemove the saved configuration import

Replace codex with claude or pi for their config commands. See Coding agents for the difference between credentials and settings.

Ports and desktop

CommandPurpose
cube open 3000 --session <session>Forward an app and open it in your local browser
cube forward 3000:8080 --session <session>Forward remote port 3000 to local port 8080
cube desktop <session>Open a supported sandbox's desktop viewer
cube browser <session> <url>Open a URL in the sandbox's browser
cube computer screenshot <session> --output screen.pngSave a desktop screenshot

Port tunnels need a ready Session and stay active while their command runs. Desktop commands require an image with desktop support. See Networking and tunnels and Computer use.

Updates

Update your installed CLI:

cube update

Set NO_COLOR=1 to disable terminal colors; use the commands' JSON flags where available for machine-readable output.

On this page