Search for a command to run...
Install the open-source OpenCode terminal agent with the install script, npm or Homebrew, connect a model provider and bootstrap the project with an AGENTS.md file.
OpenCode is an open-source AI coding agent that runs in your terminal, as a desktop app or as an IDE extension. It works with any model provider and keeps the project context in a file you commit to Git.
OpenCode 1 and OpenCode 2 both use the opencode command and cannot be installed side
by side under their default name. Follow the OpenCode 2 migration
guide if you are moving from v1.
git for the project workflowsRun the /connect command in the TUI and pick a provider:
/connectOpenCode Zen is a curated list of models that the OpenCode team has tested, and it is the easiest option if you do not already have a provider key.
You can also configure a provider directly — OpenCode reads the same environment variables the provider SDKs use:
export ANTHROPIC_API_KEY=sk-ant-...
export OPENAI_API_KEY=sk-...cd /path/to/project
opencode/init/init makes OpenCode analyse the project and write an AGENTS.md file in the project
root. Commit that file — it is what makes the agent consistent across the team and
across machines.
# Ask about the codebase
How is authentication handled in @packages/functions/src/api/index.ts| Mode | What it does |
|---|---|
| Build | Reads, edits files and runs commands |
| Plan | Suggests how to implement something, without changing anything (Tab to switch) |
The Plan mode is worth using for anything that spans more than one file: write the request, read the plan, give feedback, then switch to Build.
| Command | What it does |
|---|---|
/init | Create the AGENTS.md for the project |
/undo | Revert the last change and show the original message |
/redo | Re-apply an undone change |
@ | Fuzzy search for a file to add to the context |
AGENTS.md — it is the single highest-value file in the repository.@ instead of hoping the agent finds the right one./undo stays meaningful.opencode in CI with a scoped provider key and a read-only checkout.Install Block's open-source Goose agent as a desktop app or CLI, connect it to Anthropic, OpenAI, Google or a local model, and extend it with 70+ MCP extensions.
Add AI to Visual Studio Code with GitHub Copilot, Cline, Roo Code and Continue, install them from the command line and configure them for a team.