Skip to main content

Introduction

The RunTools CLI (@runtools/cli) provides full access to the platform from your terminal. 35+ commands for managing sandboxes, agents, tools, secrets, SSH keys, and project deployment.
The CLI is not yet published to npm. Clone the repo and run via bun run src/index.ts, or build with bun run build and use the bundled dist/index.js.

Quick Start

# Login (opens browser for WorkOS device flow)
runtools login

# Create a sandbox
runtools sandbox create --name my-env --template base-ubuntu

# SSH into it
runtools sandbox ssh my-env

# Run an agent
runtools agent run code-assistant --prompt "Create a REST API"

# Deploy tools and agents
runtools deploy

Command Groups

Auth

runtools login                    # WorkOS device flow (opens browser)
runtools logout                   # Clear credentials
runtools auth whoami              # Show current user/org
runtools auth set-key <key>       # Store API key (rt_live_xxx or rt_test_xxx)
runtools auth status              # Auth status details

Sandboxes

runtools sandbox create [options] # Create sandbox
  --name <name>                   # Friendly name
  --template <template>           # base-ubuntu (default) or desktop-ubuntu
  --tag <key=value>               # Tags
  --ssh-key <id>                  # SSH key ID
  --password <pass>               # Password auth
  --vcpus <n>                     # vCPU count (default 2)
  --memory <mb>                   # Memory in MB (default 1024)
  --idle-timeout <sec>            # Auto-pause timeout (0 = disabled)
  --no-keys                       # Skip auto-injecting org SSH keys

runtools sandbox list [--status <status>] [--watch]
runtools sandbox get <id>
runtools sandbox ssh <id>
runtools sandbox exec <id> <command>
runtools sandbox destroy <id> [--force] [--json]
runtools sandbox pause <id>
runtools sandbox resume <id>
runtools sandbox logs <id> [--follow]
runtools sandbox url <id> [--port <port>]
runtools sandbox snapshot <id>
runtools sandbox rollback <id>
runtools sandbox watch <id> [--json]  # Convex live monitoring (TUI)

Agents

runtools agent run <slug> [--prompt <text>] [--json]
runtools agent list [--json]
runtools agent get <slug>
runtools agent delete <slug> [--force]

Tools

runtools tool search <query>
runtools tool install <slug>
runtools tool uninstall <slug>
runtools tool credentials <slug> [--json <json>] [--clear]
runtools tool list [--installed] [--custom] [--json]
runtools tool exec <slug> [--action <action>] [--params <json>] [--params-file <file>]
runtools tool publish <slug> [--unpublish]
runtools tool delete <slug> [--force]

Secrets

runtools secret set <name> [value] [--scope <scope>] [--category <cat>] [--description <desc>]
runtools secret list [--category <cat>]
runtools secret delete <name> [--force]

SSH Keys

runtools ssh-key list
runtools ssh-key add [name] [--file <path>] [--key <pubkey>]
runtools ssh-key remove <id>

Project

runtools init [name]              # Scaffold project (runtools.config.ts, tools/, agents/, sandboxes/)
runtools deploy                   # Deploy tools, agents, sandboxes to cloud
  --tools-only                    # Deploy only tools/
  --agents-only                   # Deploy only agents/
  --sandboxes-only                # Deploy only sandboxes/
  --prune                         # Auto-destroy orphaned managed sandboxes
  --no-prune                      # Keep orphaned sandboxes
  --dry-run                       # Show plan without executing

Environment Variables

VariableDescription
RUNTOOLS_API_KEYAPI key (skips login)
RUNTOOLS_API_URLOverride orchestrator URL (default: https://api.runtools.ai)
RUNTOOLS_TOOLS_URLOverride tools service URL (default: https://tools.runtools.ai)
RUNTOOLS_CONVEX_URLOverride Convex URL (for live watch features)

Credential Storage

Credentials are stored at ~/.runtools/credentials.json (mode 0600). Contains access token, refresh token, user info, and API key. Config at ~/.runtools/config.json.

Auto-Inject SSH Keys

When creating a sandbox without --ssh-key or --password, the CLI automatically fetches all org SSH keys and injects them. Use --no-keys to disable.

Next Steps

Installation

Install the CLI

Authentication

Login and auth configuration

Commands Reference

Full command reference