CLI Reference

CLI Reference

The latere binary speaks the same HTTP API documented elsewhere on this page. One login covers both the CLI and the MCP server — both read ~/.config/latere/token.json.

Install

curl -fsSL https://latere.ai/install.sh | sh

Source: github.com/latere-ai/latere-cli.

Global flags

Every command takes:

Flag Default Description
--api-url https://cella.latere.ai Override the sandboxd base URL.

Environment variables:

Variable Purpose
SANDBOX_API_URL Same as --api-url.
LATERE_TOKEN_FILE Override the token file path (default ~/.config/latere/token.json).

latere auth

latere auth login [--token TOKEN]
latere auth whoami
latere auth logout

login accepts a token via --token, on stdin (echo $TOKEN | latere auth login), or interactively. The token is verified by hitting GET /v1/sandboxes; rejected tokens are not stored.

latere cella

latere cella create \
    --image ghcr.io/latere-ai/sandbox-base:main \
    --name my-workspace \
    --tier persistent \
    --disk 10 \
    --auto-stop-minutes 30 \
    --env GOFLAGS=-count=1

latere cella list [--json]
latere cella get <name|id>
latere cella rename <name|id> <new-name>
latere cella start  <name|id>
latere cella stop   <name|id>
latere cella delete <name|id>

latere exec and latere cella run

# Foreground: stream logs and exit with the command's code
latere exec my-workspace -- bash -lc 'go test ./...'

# Background: print command_id immediately
latere cella run my-workspace -- sleep 60
# 0193…

run --follow (-f) is identical to exec.

latere cella logs my-workspace 0193…           # one-shot from cursor 0
latere cella logs my-workspace 0193… --follow  # poll until exit, propagate code
latere cella wait my-workspace 0193… --timeout 600

latere cella import / export

# Stream in: from stdin or a path
tar -cf - ./src | latere cella import my-workspace --dest /workspace
latere cella import my-workspace --input artifact.tar

# Stream out: to stdout or a path
latere cella export my-workspace ./build -o build.tar

paths... after the sandbox argument become tar arguments; omit them to grab all of /workspace (or the directory you point --src-dir at).

Exit codes

Code Meaning
0 Success.
1 Generic CLI error (parsing, IO).
2 Auth missing or rejected.
n Forwarded process exit code from exec / run --follow / logs --follow.