Apply PR #284's doc updates selectively — cloudflared, SSH overlays, host-bind overlays, SANDBOX_PASSWORD, and openssh-server references removed everywhere. Postgres mentions preserved; postgres compose overlay restored. Doc edits: - AGENTS.md / CLAUDE.md (symlink): drop /cloudflared-tunnel skill row, rewrite "Exposing apps" to mention generic tunnels/proxies. - README.md, docs/installation.md: drop SANDBOX_PASSWORD, cloudflared, openssh-server, host-overlay references. - docs/quickstart.md: keep postgres link, drop cloudflare link, mention postgres overlay is opt-in. - docs/integrations/github.md: drop SSH-overlay section. - docs/integrations/cloudflare.md: deleted. - docs/agents/{deepagents,opencode}.md: drop host-overlay sections. - context/rules/git.md: drop "Advanced opt-ins" SSH section. - Makefile: drop _check-jq / _check-config gates; jq invocation is now defensive (only runs when jq + config.json both present). - apps/docs/src/pages/index.tsx: keep postgres in "composable substrate" copy, drop cloudflare tunnels / Caddy gateway mentions. - .claude/skills/{agent-browser,harness-audit,strategic-proposal}/SKILL.md and .claude/agents/command-builder.md: drop cloudflared references (strategic-proposal infra row keeps PostgreSQL 16). - CHANGELOG.md [Unreleased] § Removed: new entry for #283 listing the 10 deleted overlays + companion infrastructure; note postgres was kept. Infra: - Restored .devcontainer/docker-compose.postgres.yml. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1.4 KiB
sidebar_position, title
| sidebar_position | title |
|---|---|
| 5 | OpenCode |
OpenCode
OpenCode is a terminal coding agent that can run interactively or execute one-shot tasks. It ships preinstalled in the sandbox image alongside Claude Code, Codex, and Pi.
Install
OpenCode is installed by default during sandbox provisioning. The npm package is opencode-ai, installed globally with npm in the sandbox image:
npm install -g opencode-ai
Verify the install:
opencode --version
Authentication
Run opencode auth login once and follow the prompts:
opencode auth login
For ChatGPT Plus and Pro users, choose OpenAI at the provider prompt to authenticate via OAuth. OpenCode stores credentials at ~/.local/share/opencode/auth.json inside the sandbox. The same flow is reachable from inside an interactive opencode session via the /connect slash command.
Provider API key environment variables are secondary. Use them when you need a non-OAuth provider or a service-account style setup.
Common usage
# Start an interactive session
opencode
# Run a one-shot task
opencode run "Add input validation to the signup form"
Run inside a dedicated tmux session to keep the agent alive across disconnects:
tmux new-session -d -s agent-opencode 'opencode'
tmux attach -t agent-opencode