Answer: In CI, pass a provider API key as a secret and use standalone mode so the private server receives it; for example, a GitHub Actions job installs @opencode/cli globally and runs opencode run --standalone with the model and API key set via env. Status: Confirmed Entry: tool/opencode/integrations/use-in-ci Revision: 1 Digest: sha256:c34031eb9cc56881 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:56:10Z Last changed: 2026-11-13T03:56:10Z Last verified: 2026-11-20T13:44:58Z Next check: 2026-11-21T13:44:58Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of CI approach | pass a provider API key as a secret and use standalone mode | [1] | 2026-11-20 install command | npm install --global @opencode/cli | [1] | 2026-11-20 run command | opencode run --standalone --model anthropic/claude-sonnet-5-5 | [1] | 2026-11-20 API key env var | ANTHROPIC_API_KEY | [1] | 2026-11-20 runner | ubuntu-latest | [1] | 2026-11-20 checkout action | actions/checkout@v4 | [1] | 2026-11-20 Sources: [1] opencode. "CLI commands | OpenCode". https://opencode.ai/docs/cli/commands/ Role: primary. Accessed: 2026-11-20T13:44:58Z Quote: "In CI, pass a provider API key as a secret and use standalone mode so the private server receives it." (Supports: CI approach) Quote: "npm install --global @opencode/cli" (Supports: install command) Quote: "opencode run --standalone --model anthropic/claude-sonnet-5-5" (Supports: run command) Quote: "ANTHROPIC_API_KEY : ${{ secrets.ANTHROPIC_API_KEY }}" (Supports: API key env var) Quote: "runs-on : ubuntu-latest" (Supports: runner) Quote: "uses : actions/checkout@v4" (Supports: checkout action) Snapshot SHA-256: 1396ac261e8d9905b9c01d47d7d7a938279d61bc7f51fa7a17c99b47c8b26447 (captured 2026-11-18T13:38:36Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-18T13:38:36Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:44:58Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:44:58Z Last attempt: 2026-11-20T13:44:58Z Notes and limitations: Extracted automatically from a single official source (section "CI"). Related: https://latestn.com/tool/opencode/integrations/websearch-providers-env-vars Which web search providers does opencode support and what environment variables do they use? https://latestn.com/tool/opencode/memory-and-context/agents-md-discovery-order How does opencode discover and order AGENTS.md instruction files? https://latestn.com/tool/opencode/memory-and-context/agents-md-file-location Where should I place AGENTS.md files so opencode applies them to the right directories? https://latestn.com/tool/opencode/integrations/subscribe-rpc-events-2 How do I subscribe to opencode RPC events? https://latestn.com/tool/opencode/integrations/supported-harnesses Which coding agent harnesses does opencode Console support? https://latestn.com/tool/opencode/integrations/tui-plugin-toast How do I show a toast notification from an opencode TUI plugin? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:56:10Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/opencode/integrations/use-in-ci/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/opencode/integrations/use-in-ci POST: https://latestn.com/dispute/tool/opencode/integrations/use-in-ci with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/opencode/integrations/use-in-ci?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I use opencode in a CI pipeline like GitHub Actions? Revision 1, last verified 2026-11-20T13:44:58Z. https://latestn.com/tool/opencode/integrations/use-in-ci (accessed 2026-11-21T09:53:14Z). @misc{LatestN_tool_opencode_integrations_use_in_ci_r1, title = {How do I use opencode in a CI pipeline like GitHub Actions?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/opencode/integrations/use-in-ci}}, note = {Revision 1; digest sha256:c34031eb9cc56881; last verified 2026-11-20T13:44:58Z; accessed 2026-11-21T09:53:14Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/opencode/integrations/use-in-ci