99</p >
1010
1111<p align =" center " >
12- <strong >Command Code inside OpenCode</strong > — CLI/API-key auth ,<br >
12+ <strong >Command Code inside OpenCode</strong > — Go-plan ($1) browser login ,<br >
1313 gateway proxy, free Laguna S 2.1, tools/MCP, attachments, compact, usage.
1414</p >
1515
@@ -52,30 +52,31 @@ opencode plugin file://$PWD
5252
5353## Authenticate
5454
55- Requires [ Command Code CLI ] ( https://commandcode.ai/docs/quickstart ) and a free account:
55+ Uses the ** Command Code Go plan ($1/mo) ** — same browser login as ` cmd login ` . No Studio API key.
5656
5757``` bash
5858npm i -g command-code@latest
59- cmd login
59+ cmd login # browser → Studio CLI auth (Go plan). Laguna S 2.1 is $0 credits.
60+
6061opencode auth login --provider command-code
61- # pick "Use Command Code CLI login " — or paste an API key
62+ # pick "Login with Command Code (Go $1) " — or "Use existing cmd login session"
6263```
6364
64- Env alternative: ` COMMAND_CODE_API_KEY ` .
65-
6665Then:
6766
6867``` bash
6968opencode run " Summarise this repository in five bullets." --model command-code/laguna-s-2.1-free
7069```
7170
71+ Laguna S 2.1 free requires an active Go (or higher) account with credits on file; requests on that model still bill ** $0** .
72+
7273## Why this plugin
7374
7475| | |
7576| ---| ---|
7677| ** Gateway proxy** | Talks to ` api.commandcode.ai/alpha/generate ` — same transport as the ` cmd ` CLI. |
7778| ** Laguna S 2.1 free** | 256k context, reasoning, $0 while the deal lasts. |
78- | ** CLI / API auth** | Syncs ` ~/.commandcode/auth.json ` or accepts ` COMMAND_CODE_API_KEY ` . |
79+ | ** Go-plan auth** | Browser OAuth like ` cmd login ` ($1/mo). Syncs ` ~/.commandcode/auth.json ` . No API key . |
7980| ** Agent-grade tools** | OpenCode tool calls park and resume; MCP-prefixed tools are tracked separately. |
8081| ** Attachments** | Images, PDFs, text/binary files from OpenCode. Text-only models get image placeholders (Command Code behavior). |
8182| ** Compact** | Context-fraction tips + tiered client compact before the 256k window overflows. |
@@ -103,7 +104,7 @@ OpenCode
103104bun install
104105bun run build
105106bun run test # mocked gateway — attachments, tools, compact, usage
106- bun run test:live # live Laguna S 2.1 (needs COMMAND_CODE_API_KEY )
107+ bun run test:live # live Laguna S 2.1 (needs `cmd login` / Go plan session )
107108```
108109
109110Debug: ` OPENCODE_COMMANDCODE_DEBUG=1 ` .
@@ -112,7 +113,6 @@ Optional knobs:
112113
113114- ` OPENCODE_COMMANDCODE_PROXY_PORT ` — fixed local proxy port (default ` 8797 ` )
114115- ` OPENCODE_COMMANDCODE_CWD ` — working directory reported to the gateway
115- - ` COMMAND_CODE_API_KEY ` — API key without CLI login
116116- ` COMMANDCODE_API_URL ` — override API base (default ` https://api.commandcode.ai ` )
117117
118118## License
0 commit comments