opencode

An open-source AI coding agent that runs in a terminal, a text-based command window, and can connect to many AI providers.

In plain words
What is it for?
Use it for coding tasks and debugging, or connect its headless HTTP server and Agent Client Protocol support to graphical tools and development environments.
Why use it?
It gives developers one terminal-based place to ask for coding help, debug software, and work with different AI services.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/marcinbunsch/overseer/opencode
Clone the repo
git clone --depth 1 https://github.com/marcinbunsch/overseer
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 6,113 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 3 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.06113
Opus 5 $0.00000 $0.03057
Sonnet 5 $0.00000 $0.01223
Haiku 4.5 $0.00000 $0.00611

Measured yesterday against content hash 0bb8d366c20a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade D, and why

opencode scanned grade D with 3 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl -fsSL https://opencode.ai/install | bash

Unrestricted tool accessmediumExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

permission: [{ permission: "*", pattern: "*", action: "allow" }],

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -fsSL https://opencode.ai/install | bash
docs/agents/opencode.md · 833 lines

How it starts

The opening of the file, as written. The whole thing — 833 lines — stays where its author put it; the contents beside it link to each section on GitHub.

OpenCode

OpenCode is an open-source AI coding agent built for the terminal. Written in TypeScript (Bun runtime), it provides a TUI (Terminal User Interface) for interacting with 75+ AI providers to help with coding tasks, debugging, and more. For GUI integrations, OpenCode exposes a headless HTTP server with OpenAPI 3.1 and supports ACP (Agent Client Protocol) for IDE integration.

Source: https://opencode.ai/docs/

Quick Start

Installation

# Install script (recommended)
curl -fsSL https://opencode.ai/install | bash

# npm
npm i -g opencode-ai@latest

# Homebrew (macOS/Linux)
brew install anomalyco/tap/opencode

# Windows
scoop install opencode
# or
choco install opencode

# Arch Linux
paru -S opencode-bin

Authentication

# Interactive provider setup
opencode
# Then run /connect in the TUI

# Or use environment variables
export ANTHROPIC_API_KEY=your-api-key
export OPENAI_API_KEY=your-api-key
export GEMINI_API_KEY=your-api-key

Supports 75+ providers including:

Provider Auth Method
Anthropic OAuth (Claude Pro/Max) or API key
OpenAI OAuth (ChatGPT Plus/Pro) or API key
GitHub Copilot Device auth via github.com/login/device
Google Vertex AI Service account or gcloud auth
AWS Bedrock AWS credentials/IAM roles
Groq API key
Azure OpenAI API key + resource name
Local (Ollama) No auth needed

Platform Support

  • macOS & Linux — fully supported
  • Windows — via Scoop, Chocolatey, or WSL

CLI Commands

Interactive Mode (TUI)

opencode                              # Launch TUI
opencode --continue                   # Resume last session
opencode --session <id>               # Resume specific session
opencode --model claude-sonnet-4-5    # Override model
opencode --agent plan                 # Start in plan mode

Non-Interactive (run)

opencode run "fix the bug in auth.py"           # Single prompt, exits after
opencode run "summarize changes" -f json        # JSON output
opencode run "refactor module" -f stream-json   # Streaming JSON events
opencode run "continue" --session <id>          # Resume session
opencode -p "explain this code" -q              # Quiet mode (no spinner)

Read the full file on GitHub · 833 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 833 lines · 0 tokens per session scan D 0bb8d366c20a

Subscribe to this mod's changes

opencode is an agent published in the GitHub repository marcinbunsch/overseer (11 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 6,113 tokens. A static security scan graded it D with 3 findings (downloads and executes remote code, unrestricted tool access, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens

AVM Owner Triage

Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.

github/awesome-copilot · 61 tokens

Ultimate Transparent Thinking Beast Mode

Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.

github/awesome-copilot · 11 tokens

code-reviewer

Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.

anthropics/claude-cookbooks · 52 tokens