tapes start
Start tapes and optionally launch an agent. Automatically picks available ports and manages the daemon lifecycle.
Usage
# Start tapes in foreground
tapes start
# Launch an agent through the proxy
tapes start claude
tapes start opencode
tapes start codex
# Launch opencode with a specific provider and model
tapes start opencode --provider anthropic --model claude-sonnet-4-5
tapes start opencode --provider ollama --model qwen3-coder:30b
# Stream logs from the running daemon
tapes start --logs Supported Agents
| Agent | Description |
|---|---|
claude | Launch Claude Code with Anthropic routing |
opencode | Launch OpenCode with multi-provider routing |
codex | Launch Codex with OpenAI routing (requires tapes auth openai) |
Flags
| Flag | Description |
|---|---|
--logs | Stream logs from the running tapes daemon |
-d, --debug | Enable debug logging |
--config-dir | Path to tapes config directory |
--provider | LLM provider for opencode (anthropic, openai, ollama) |
--model | Model for opencode (e.g. claude-sonnet-4-5, gpt-5.2-codex) |
--postgres | PostgreSQL connection string (DSN) for persistent storage |
All flags can also be set via TAPES_* environment variables — see environment variables. The project name is configurable via TAPES_PROXY_PROJECT or proxy.project in config.toml.
OpenCode Provider Selection
When launching OpenCode, you can specify a provider and model via CLI flags. If no flags are provided:
- tapes checks for saved preferences in
config.toml - If no saved preference and running in a terminal, prompts interactively
- Otherwise, defaults to Anthropic with claude-sonnet-4-5
Your selection is saved to ~/.tapes/config.toml for future sessions.
# First run: interactive prompt
tapes start opencode
# Select a provider for opencode:
# 1) anthropic
# 2) openai
# 3) ollama
# Enter choice [1]: 1
# Enter model [claude-sonnet-4-5]:
# Subsequent runs use saved preference
tapes start opencode
# Override saved preference with flags
tapes start opencode --provider ollama --model codellama:7b Switching models inside OpenCode won't be captured by tapes. Use separate sessions for different models.
Credential Injection
When launching an agent, tapes automatically injects API credentials stored via tapes auth as environment variables. Shell environment variables take precedence over stored credentials.
# Store your API key once
tapes auth openai
# Keys are auto-injected on every launch
tapes start codex How It Works
When you run tapes start <agent>:
- tapes spawns a background daemon if one isn't already running
- The daemon starts proxy and API servers on automatically selected ports
- Stored credentials are injected as environment variables
- The agent is launched with environment configured to route through the proxy
- Conversations are tagged with the agent name for filtering
- The daemon shuts down automatically when all agents exit
Use tapes start for the simplest setup. Use tapes serve when you need explicit control over ports and configuration.