@jeffreyjyz/opencode-command-code weekly downloads statistics
By jeffreyjyz · npm · AI SDKs
Command Code provider + usage dashboard for opencode: two providers (Anthropic wire for Claude, OpenAI wire for everything else) against api.commandcode.ai, live model list, plan gating, /cmd-usage. Requires the cmduse CLI for usage rendering.
@jeffreyjyz/opencode-command-code has 769 recorded weekly downloads on npm, an increase of 116% over the past 30 days, ranking #2158 of 3,247 tracked listings.
About @jeffreyjyz/opencode-command-code
@jeffreyjyz/opencode-command-code
Command Code providers, a live gated model list and a usage sidebar for opencode, with all usage rendering delegated to the cmduse CLI.
What it is
One package, both opencode plugin APIs: v1 hosts call the default export's server() hook map, v2 hosts decode { id, setup } and call setup(context). The two halves are independent implementations sharing one CLI layer, and neither reimplements usage math — every window figure comes from the cmduse binaries.
It registers two provider lanes against api.commandcode.ai:
command-code-anthropic— Claude models on the Anthropic wire.command-code-openai— everything else on the OpenAI-compatible wire, where the reasoning text is round-tripped throughreasoning_contentso a compaction or model switch doesn't get rejected.
The model list is fetched live from Command Code's listing API, split by wire, and gated to your plan (core/gating.json in the repo is the source of truth). The picker never waits on the network: a static seed from the known-model table, then the last live list cached on disk, paint instantly and the live fetch merges over them — union by model id, so a gated or partial response can never make a model vanish. On v2 hosts the fetch then repeats on an interval, and a tick only touches the provider registry when the model ids actually changed.
Each model is registered with Command Code's published $/1M rates, so opencode's own cost display works for a subscription provider instead of showing $0. Vision support and reasoning-effort variants come from a generated catalog, because the listing API publishes no capabilities.
That catalog is refreshed at runtime: the plugin fetches Command Code's own models.md (bundled in their published CLI, served from the npm CDN), caches it for a day under ~/.cache/command-code/catalog-live.json, and overlays prices, context windows and efforts on the baked snapshot before each model refresh — so a price change reaches a running install without waiting for a plugin release. The baked table stays as the offline and first-run fallback, and vision stays baked because it only exists in the CLI bundle. catalogSource() reports which table a given lookup used.
Credentials resolve in one order everywhere: CMD_API_KEY, then opencode's credential store (the commandcode/command-code rows, active first, newest first), then opencode's legacy auth.json, then ~/.commandcode/auth.json from cmd login. The store ranks first because a re-connect leaves both files on the key it replaced — and if the API still answers 401, the request is retried with the next candidate rather than failing the turn.
Install
Add the plugin to opencode.json (v2 hosts use plugins; v1's singular plugin is auto-normalized):
{
"plugins": ["@jeffreyjyz/opencode-command-code"]
}
Usage rendering needs the cmduse CLI on PATH — it owns the plan table, the window math and the formatting:
brew install JeffreyJYZ/tap/cmduse
The sidebar's per-model catalog (tier, rates, allowance, deals) comes from mpc, which is optional: without it the section keeps the model name and the store-backed rows and simply omits the catalog rows.
bun add -g @jeffreyjyz/mpc
Usage
Run /connect, choose Command Code and paste an API key (create one at commandcode.ai/settings/keys), or use the CMD_API_KEY env method, or log in once with cmd login. With no credential at all the providers register as auto, so a later /connect lights them up without a restart.
One caveat on the v1 half: its /connect entry is bound to the Anthropic lane (opencode's plugin API allows one auth hook per provider id), so the OpenAI lane shares the key through the resolved options.apiKey — a /connect-only v1 setup needs cmd login or CMD_API_KEY for that lane.
While a session uses a Command Code, OpenCode Go/Zen, Volcengine ARK or OpenDesign model, the sidebar grows one section for that family — plain text unless you ask for colour. Write ~/.config/opencode/command-code.json:
{ "colors": true, "ocPlan": "go-plus", "odPlan": "pro" }
CMD_COLORS=1 (or 0), CMD_OC_PLAN=go|go-plus, CMD_OD=1|0 and CMD_OD_PLAN=go|plus|pro|max override it for a single run. ocPlan only matters on the Go side and odPlan only on the OpenDesign side: both plans grant different limits at the same token prices, and nothing local records which one you have. The file is re-read every few seconds, so a flip lands on the next poll.
What the section shows:…
Description from the npm listing.
- opencode
- command-code
- plugin
- provider
- ai-sdk
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (170)Similar npm AI SDKs plugins
All 20 @jeffreyjyz/opencode-command-code alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@jeffreyjyz/opencode-command-code. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.