Usage Guide

Commands and workflows for daily use.

Core Commands

Interactive / One-Shot

otto                           # start interactive TUI (default)
otto --web                     # start local server + web UI (opens browser)
otto web --api <url>           # start web UI only for an existing API server
otto ask "explain this error"  # one-shot question
otto ask "write tests" --agent build
otto ask "follow up" --last    # continue last session

Server Mode

otto serve                     # start server + web UI on random port
otto serve --no-open           # start server + web UI without opening browser
otto serve --port 3000         # start on specific port
otto serve --network           # bind to 0.0.0.0 for LAN access

TUI Client (apps/tui)

bun run --filter @ottocode/tui dev   # start interactive TUI client from source

The TUI is an interactive terminal interface that consumes @ottocode/api.

Session Management

otto sessions                  # interactive session picker
otto sessions --list           # list all sessions
otto sessions --json           # output as JSON
otto sessions --limit 10       # limit results

Provider & Model Configuration

otto models                    # interactive provider/model selection
otto switch                    # alias for models command
otto auth login                # configure provider credentials
otto auth list                 # list configured providers
otto auth logout               # remove provider credentials

Agent & Tool Management

otto agents                    # list and configure agents
otto agents --local            # edit local project agents
otto tools                     # list available tools
otto scaffold                  # generate new agents, tools, or commands

Diagnostics

otto doctor                    # check configuration and diagnose
otto --version                 # show version
otto --help                    # show help

Providers & Models

Switch providers and models on the fly:

otto ask "refactor this" --provider anthropic --model claude-sonnet-4
otto ask "explain generics" --provider openai --model gpt-4o
ProviderModelsAuth
AnthropicClaude 4.5 Sonnet, OpusAPI key
OpenAIGPT-4o, o1, Codex MiniAPI key
GoogleGemini 2.5 Pro, FlashAPI key
OpenRouter100+ modelsAPI key
OpenCodeFree Anthropic accessOAuth
SetuProxy with USDC paymentsSolana wallet

Agents

Use the --agent flag to select a purpose-built agent:

otto ask "create auth component" --agent build
otto ask "design API architecture" --agent plan
otto ask "research how this works" --agent research

Sharing Sessions

otto share <session-id>        # share a session publicly

Upgrading

otto upgrade                   # upgrade to latest version