Skip to content

Commands Overview ​

TOSE CLI provides a comprehensive set of commands for deploying and managing your applications. This page gives you a complete reference of all available commands.

Global Options ​

These options are available on all commands:

bash
--json                 # Output JSON (for scripting and AI agents)
-y, --yes              # Skip confirmation prompts
--api-key <key>        # Override API key
--workspace <slug>     # Override workspace
--project <slug>       # Override project
-V, --version          # Output version number
-h, --help             # Display help for command

Command Reference ​

Authentication ​

CommandDescription
tose loginSave and verify your API key
tose logoutRemove stored credentials
tose whoamiShow current user and workspace info

Project Context ​

CommandDescription
tose initLink current directory to a TOSE project
tose useSet the active project globally

Deployment ​

CommandDescription
tose upSmart deploy: auto-init, git connect, and deploy
tose deployTrigger a new deployment
tose redeployRedeploy with current config (no rebuild)
tose downStop current deployment
tose restartRestart pods without redeploying
tose deployment rollbackRoll back to an earlier deployment (needs --yes)

Monitoring ​

CommandDescription
tose statusShow project status and pod health
tose logsView build or live logs
tose openOpen project URL in browser

Environment Variables ​

CommandDescription
tose env listList environment variables
tose env setSet one or more variables
tose env rmRemove variables
tose env pushPush .env file to project
tose env pullPull variables to local .env file

Domains ​

CommandDescription
tose domain listList custom domains
tose domain addAdd a custom domain
tose domain rmRemove a custom domain

Databases ​

CommandDescription
tose db listList databases in workspace
tose db createCreate a new database
tose db infoShow database connection info

Cloud Desktops (Coming soon) ​

Status: Coming soon. The commands ship in CLI 0.1.3, but Cloud Desktops are not switched on in production yet.

CommandDescription
tose desktop listList desktops in workspace
tose desktop createCreate a persistent desktop
tose desktop statusShow desktop details
tose desktop wake / sleepStart or stop compute, keep the disk
tose desktop deleteDelete a desktop and its disk
tose desktop eventsShow the desktop audit log
tose desktop screenshotSave a screenshot
tose desktop execRun a shell command on the desktop

Disks and Pricing ​

CommandDescription
tose disk getShow the project's persistent disk
tose disk setAdd, grow, or move a project disk
tose disk deleteDelete a project disk and its data
tose volumes listList all disks in the workspace
tose volumes resizeGrow any disk by volume ID
tose pricingShow compute and storage rates

Agent Skills ​

CommandDescription
tose skills listList skills in the public catalogue
tose skills installInstall a skill after verifying every file's digest

Utilities ​

CommandDescription
tose generateGenerate Dockerfile using AI

Quick Start ​

bash
# 1. Login
tose login

# 2. Navigate to your project and deploy
cd my-app
tose up

# 3. Monitor
tose status
tose logs --build -f

# 4. Manage env vars
tose env set NODE_ENV=production PORT=3000
tose env list

Common Workflows ​

First Deployment ​

bash
cd /path/to/your-app
tose up

tose up handles everything automatically:

No project linked. Setting up...

Using workspace: my-workspace
Fetching projects...
? Select project: Create new project
? Project name: my-app
✓ Project "my-app" created

Linked to my-workspace/my-app

Detected git repo: username/my-app (main)
✓ Git connected: username/my-app (main)
Using server: TOSE Cloud
✓ Server assigned

Found 1 .env file(s). Push environment variables? Yes
✓ Pushing 5 variables...
✓ 5 variables pushed

✓ Deploying...
✓ Deployment triggered
  Deployment ID: dep_abc123
  Status: pending
  URL: https://my-app.tose.sh

Stream build logs with: tose logs --build -f

Update and Redeploy ​

bash
git push origin main
tose deploy
✓ Deploying my-workspace/my-app...
✓ Deployment triggered
  Deployment ID: dep_xyz789
  Status: pending
  Commit: a1b2c3d

Stream build logs with: tose logs --build -f

Manage Environment ​

bash
# Set variables
tose env set DATABASE_URL=postgres://... API_SECRET=mysecret

# Push from .env file
tose env push .env.production

# Pull to local file
tose env pull .env.local

Monitor and Debug ​

bash
# Check status with pod health
tose status

# Stream build logs
tose logs --build -f

# Stream live application logs
tose logs -f

# Open in browser
tose open

Context Resolution ​

TOSE CLI resolves workspace and project context from multiple sources, in order of priority:

Workspace ​

  1. Positional argument (e.g., tose deploy ws/proj)
  2. --workspace flag
  3. TOSE_WORKSPACE environment variable
  4. .tose.json in current directory
  5. Active workspace (set via tose use)
  6. Config default workspace
  7. Interactive prompt

Project ​

  1. Positional argument (e.g., tose deploy ws/proj)
  2. --project flag
  3. TOSE_PROJECT environment variable
  4. .tose.json in current directory
  5. Active project (set via tose use)
  6. Interactive prompt

API Key ​

  1. --api-key flag
  2. TOSE_API_KEY environment variable
  3. ~/.tose/config.json
  4. Interactive prompt

JSON Output ​

All commands support --json for machine-readable output. With --json, stdout carries exactly one JSON document; progress and warnings go to stderr. --json never confirms a destructive operation.

bash
tose status --json

Success response:

json
{
  "schema_version": "1",
  "status": "ok",
  "success": true,
  "data": { ... },
  "next_actions": []
}

status is pending when the API accepted work that is still running, such as a build after tose deploy.

Error response:

json
{
  "schema_version": "1",
  "status": "error",
  "success": false,
  "error": {
    "code": "not_found",
    "message": "workspace not found",
    "request_id": "req_123",
    "retryable": false,
    "details": null,
    "doc_url": null
  },
  "next_actions": []
}

Error fields ​

FieldMeaning
codeThe code of the API error envelope when the API sent one: stable snake_case values such as not_found, forbidden or credentials_in_url. Branch on it, never on message. Without an envelope the code comes from the HTTP status (UNAUTHORIZED, NOT_FOUND, RATE_LIMITED, SERVER_ERROR, …). A 403 caused by your key is reported as INSUFFICIENT_SCOPE (with details.required_scope) or API_KEY_WORKSPACE_SCOPED instead of the API's code. The CLI raises some codes itself, for example INPUT_REQUIRED, CONFIRMATION_REQUIRED, DEPLOY_FAILED and SKILL_INTEGRITY
request_idFrom the API error body or its X-Request-Id header. Quote it when you report a problem
retryabletrue means the same command may succeed if you run it again later
detailsExtra context from the API, for example required_scope, which the CLI sets when code is INSUFFICIENT_SCOPE
doc_urlLink to documentation for this error, or null

schema_version changes only when a field is removed or changes meaning. New fields can appear at any time, so ignore the ones you do not know.

API key handling ​

The CLI sends your key only in the X-API-Key header, never in a URL. That includes the WebSocket behind tose logs -f, and the CLI refuses to open a stream whose URL carries a credential parameter such as api_key, x-api-key or access_token.

If the API answers 400 credentials_in_url, something put the key in a query string, such as an old client, a proxy or a hand-built URL. The CLI says so and tells you to rotate that key. To rotate: create a new key, run tose login with it, then revoke the old one. In --json mode the error has code credentials_in_url.

Environment Variables ​

VariableDescription
TOSE_API_KEYOverride API key
TOSE_API_URLOverride API base URL (default: https://api-v2.tose.sh)
TOSE_WORKSPACEOverride workspace slug
TOSE_PROJECTOverride project slug

Exit Codes ​

CodeNameMeaning
0SUCCESSDone, or accepted and still running (status: "pending")
1ERRORAny other failure, including API and network errors
2USAGEInvalid or missing flags, arguments or input, or the API rejected the request as invalid (400/422, including credentials_in_url)
3UNAUTHORIZEDNo API key, or the API rejected it (401/403, including a missing key scope)
4CONFIRMATION_REQUIREDA destructive command needs --yes or --confirm <name>
5CANCELLEDYou declined the prompt, a wait was interrupted, or the deployment was cancelled
6NOT_FOUNDThe workspace, project or resource does not exist
7TIMEOUTWaiting took too long; the operation may still finish
8OPERATION_FAILEDA deploy, build or desktop operation ended in a failed state
9INSUFFICIENT_BALANCEThe workspace wallet balance is zero or negative, so a deploy, redeploy or rollback was refused. next_actions carries the top-up page in url

Next Steps ​

Released under the ISC License.