Getting started
Requirements
- OpenCode V2 (2.1.4 is the verified target; newer versions are in use — see Compatibility)
- The Muse Code CLI installed and signed in:sh
muse login - A Muse subscription, or a configured pay-as-you-go key (see below)
Install
Add the published package to your project-level opencode.jsonc (or opencode.json):
{
"$schema": "https://opencode.ai/config.json",
"plugins": ["opencode-muse@1.1.0"]
}Restart OpenCode (or OpenChamber) if it was already running, then pick a Muse model from the model picker. If your OpenCode version ignores the package entry, use the local-shim fallback instead — never both, or OpenCode reports a duplicate plugin ID:
npm install opencode-muse
mkdir -p .opencode/plugins
cat > .opencode/plugins/opencode-muse.js <<'EOF'
export { default } from "opencode-muse";
EOFFirst prompt
Ask anything ordinary. Title generation and session summaries are answered locally at zero model cost; your first real question runs a Muse turn. If the model list is empty, the provider shows a disabled "Muse setup required — run muse login, then refresh providers" placeholder instead of a model that would fail on use.
Billing: subscription or PAYG
- Subscription (default). Sign in with
muse loginand leave it alone. The plugin never inspects or changes your Contributor mode. - Pay-as-you-go. Set
META_API_KEYfor the OpenCode process (the officialmuse auth set --provider meta --api-key-stdinpath also works). Note the precedence: Muse prefers the key over the account login, so an exported key silently bills PAYG instead of the subscription. To keep children on the subscription lane, every Muse child the plugin spawns gets a sanitized environment (META_API_KEYandMUSE_CONTRIBUTOR_MODEstripped,MUSE_NO_AUTO_UPDATE=1set).
OpenChamber
Provider and model rows appear through generic OpenCode plugin loading — no OpenChamber source changes are needed. Its provider UI does not expose plugin sign-in methods, so authentication stays a manual muse login step.