microsoft/amplifier-app-opencode
Python
Captured source
source ↗microsoft/amplifier-app-opencode
Description: Amplifier Agent adapter for opencode
Language: Python
License: MIT
Stars: 0
Forks: 0
Open issues: 2
Created: 2026-06-20T22:24:01Z
Pushed: 2026-06-23T03:31:52Z
Default branch: main
Fork: no
Archived: no
README:
amplifier-app-opencode
Launch the opencode TUI on top of amplifier-agent with one command:
amplifier-opencode
This binary discovers what models your local amplifier-agent serves, writes a working opencode config from that discovery, and launches opencode — every time, no manual config to maintain.
---
What this gives you
opencode is a fast terminal coding assistant. amplifier-agent is Microsoft's modular agent framework with a multi-provider OpenAI-compatible HTTP face.
Without this adapter, integrating them requires you to manually mirror amplifier-agent's /v1/models output into your opencode config and re-edit it whenever your provider mix changes.
With this adapter:
- One command (
amplifier-opencode) handles the whole flow - The model list in opencode's picker is always live — re-discovered on every launch
- amplifier-agent's server is auto-started in the background if it isn't running
- Drop-in opencode TUI:
/models,/connect, slash commands all work normally - Includes a
doctorsubcommand that diagnoses any setup issue before you ask
---
Prerequisites
You need three things installed. The first two are owned by other projects; this README walks through the official install for each so a brand-new machine can get set up start-to-finish.
1. amplifier-agent — the backend server (>= 0.8.0 required)
amplifier-agent is the OpenAI-compatible HTTP server this adapter talks to. Install it via `uv` (Astral's Python package manager):
# Install uv if you don't have it curl -LsSf https://astral.sh/uv/install.sh | sh # Install amplifier-agent as a global tool uv tool install amplifier-agent # Verify — output MUST report 0.8.0 or higher amplifier-agent --version
> Version requirement: `amplifier-agent >= 0.8.0` is mandatory. Versions > below 0.8.0 do not ship the serve chat-completions HTTP face, multi-provider > routing, or the auth subcommand — amplifier-opencode will fail to spawn > the server, populate /v1/models, or read persisted credentials. > > If amplifier-agent --version reports an older version, upgrade with > uv tool upgrade amplifier-agent and re-run amplifier-opencode doctor > to confirm.
For full install options (source builds, pinned versions, etc.) see the amplifier-agent README.
2. opencode — the TUI
The official one-line installer downloads the platform-native opencode binary:
curl -fsSL https://opencode.ai/install | bash
It places opencode in ~/.opencode/bin/ and adds that to your shell PATH. Open a new terminal (or source ~/.zshrc) and verify:
opencode --version
For other install methods (Homebrew, manual download, package managers) see opencode.ai/docs/intro.
3. amplifier-app-opencode — this adapter
Same uv-tool pattern as amplifier-agent:
uv tool install --from git+https://github.com/microsoft/amplifier-app-opencode amplifier-app-opencode # Verify amplifier-opencode --help
(Once published to PyPI, this becomes uv tool install amplifier-app-opencode.)
4. At least one provider credential
amplifier-agent talks to upstream model APIs (Anthropic, OpenAI, etc.) and needs credentials for at least one of them. Easiest: set an environment variable that amplifier-agent already knows about:
# Pick at least ONE that you have access to: export ANTHROPIC_API_KEY="sk-ant-..." export OPENAI_API_KEY="sk-..." export AZURE_OPENAI_API_KEY="..." export OLLAMA_HOST="http://localhost:11434" # if running ollama locally # To persist across all terminals, add the line to ~/.zshrc (or your shell's rc)
Alternative: use amplifier-agent's persistent credential file. Run once and your key is stored under ~/.amplifier-agent/credentials.json (mode 0600), available to every future invocation from any directory:
amplifier-agent auth set anthropic sk-ant-... amplifier-agent auth list # confirm it's stored
The amplifier-agent server uses env-first resolution: shell env vars win over the credentials file, so existing shell-rc workflows continue working unchanged.
---
Provider Credentials
amplifier-opencode auto-detects which AI provider you have credentials for and configures amplifier-agent to serve those providers. Set one or more of the following environment variables before running amplifier-opencode launch:
| Provider | Env var | |---|---| | Anthropic (Claude) | ANTHROPIC_API_KEY | | OpenAI (GPT) | OPENAI_API_KEY | | Azure OpenAI | AZURE_OPENAI_API_KEY or AZURE_OPENAI_KEY | | Ollama (local models) | OLLAMA_HOST |
Run amplifier-opencode doctor to see which providers will be available.
Advanced: custom host_config.json
If you want fine-grained control (custom MCP servers, approval policies, per-provider config overrides), write your own host_config.json and pass it with --host-config:
amplifier-opencode launch --host-config /path/to/host_config.json
See amplifier-agent's host_config documentation for the full schema.
---
First run
amplifier-opencode
You'll see something like:
[1/4] Starting amplifier-agent (port 9099, workspace='opencode') amplifier-agent ready at http://127.0.0.1:9099/v1 [2/4] Discovering models via GET http://127.0.0.1:9099/v1/models - anthropic claude-haiku-4-5-20251001 Claude Haiku 4.5 - anthropic claude-opus-4-8 Claude Opus 4.8 - anthropic claude-sonnet-4-6 Claude Sonnet 4.6 [3/4] Wrote /Users/you/.config/opencode/opencode.jsonc (global config) [4/4] Launching opencode in /Users/you/...
The opencode TUI then opens. Type /models and pick a Claude model under the Amplifier section. Send a prompt. Done.
---
Daily usage
Just run it
amplifier-opencode
The default action does the full check → discover → write → launch flow. From any directory.
Pass arguments through to opencode
Anything after -- is forwarded to opencode:
amplifier-opencode launch -- run "summarise this...
Excerpt shown — open the source for the full document.
Notability
notability 3.0/10Routine new repository from Microsoft, no major traction.