OpenCode
Maintained by Anomaly
An open source coding agent for the terminal, desktop and web that works with many model providers, including local models.
Note
Practise with OpenCode in a hosted lab
Overview
OpenCode is an open source, MIT-licensed coding agent built in the open by Anomaly. It runs as a terminal interface, a desktop app or a web app, and it works on your own machine against a project directory. It is not tied to one model vendor: you connect a provider from inside the tool, and it can use models from many hosted providers as well as local model servers. Built-in agents separate the work: the Build agent edits files and runs commands, the Plan agent explores and plans without editing project files, and subagents handle searching and multi-step research. Permission rules decide which edits and shell commands are allowed, need approval or are denied, and it can be extended with MCP servers. Several agents can run in parallel on the same project.
What it does
- Reads, edits and writes project files and runs shell commands from a natural-language request.
- Separates planning from changing code with a read-only Plan agent and an editing Build agent.
- Connects to many hosted model providers and to local model servers such as Ollama, LM Studio and vLLM.
- Controls edits and shell commands with ordered allow, ask and deny permission rules.
- Runs multiple agent sessions in parallel on the same project.
- Extends its tools with MCP servers.
Suitable use cases
- Working with an AI coding agent while choosing or switching the model provider
- Planning a change in a read-only mode before letting the agent edit code
- Implementing and testing small features in an existing repository
- Experimenting with local or self-hosted models for coding tasks
Prerequisites
- An account or API key with a supported model provider, a supported subscription sign-in, or a local model server
- macOS, Linux or Windows, installed with the install script, a package manager such as npm or Homebrew, or a desktop installer
- Working knowledge of a terminal and of git
Limitations
- OpenCode includes no model access of its own; you must connect a provider, subscription or local model before it can work.
- Code and prompts are sent to whichever model provider you connect, unless you use a local model.
- The Build agent can edit files and run commands, so its changes and commands need human review.
- Output quality, speed and cost depend on the model and provider you connect, not on OpenCode alone.
- Windows package managers are not supported for installing the command-line tool.
Authentication
You sign in inside the tool. Code Crushers never sees these credentials.
- Sign in with an account or plan at a model provider
- Use a model-provider API key
- Works with a local or self-hosted model
OpenCode itself needs no account. You connect a model provider from inside the tool with the connect command. It accepts provider API keys, sign-in with a ChatGPT Plus or Pro plan, GitHub Copilot device sign-in, cloud credentials for Amazon Bedrock, Azure and Google Vertex, and local model servers such as Ollama, LM Studio and vLLM that need no account. Code Crushers never collects or stores these credentials.
Model usage
Charged separately from Code Crushers credits
Model usage is billed by the provider you connect: your API account at that provider, your ChatGPT or GitHub Copilot plan, your cloud account, or the optional paid OpenCode Console or OpenCode Go services if you choose them. Local models have no provider charge. Code Crushers credits pay only for lab infrastructure and never pay for model usage.
