npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@tduyng/pi-commandcode

v0.0.5

Published

Command Code models in Pi through the documented Provider API, with Pi's own prompt and tools.

Downloads

1,082

Readme

@tduyng/pi-commandcode

Command Code models as a pi provider, through the documented Provider API, with pi's own prompt, tools and approvals. Unofficial: not made or endorsed by Command Code.

No tools, no prompt block, no schema, and the adapters add no round trip of their own.

No transport of its own

Streaming, tool calls and message conversion are pi's built-in adapters. The extension supplies a provider id, a base URL, a key reference, a catalog and a per-model wire choice, so there is no request code to drift from pi's own.

The wire follows the model. Claude models use Anthropic Messages, which is what they speak, and everything else uses OpenAI Chat Completions. That choice is the difference between a working model and a 400.

| Model id | Wire | Base URL | | --- | --- | --- | | claude-* | Anthropic Messages, /provider/v1/messages | https://api.commandcode.ai/provider | | everything else | OpenAI Chat Completions, /provider/v1/chat/completions | https://api.commandcode.ai/provider/v1 |

The key goes as a Bearer token for Chat Completions and as x-api-key for Messages, as the Provider API documents. typesafe/* decision models are left out because they run on a separate endpoint and never stream.

The catalog is a cache

The extension reads the model list from https://api.commandcode.ai/provider/v1/models and writes it to <agent-dir>/commandcode-models.json. A session starts from that file and fetches when it is missing or more than a day old, so a new model shows up without a manual refresh, and a cold start still does not wait on the network. When the fetch fails, the older file is used rather than an empty list, because a catalog only grows.

Use

export COMMAND_CODE_API_KEY="user_..."
pi --provider commandcode --model claude-opus-5

Inside pi, /model lists every commandcode model. The list refreshes each time the selector opens, with the cache as the offline answer.

Install

  • An API key from a plan with API access: GOAT, Pro, Max, Team or Provider. The Go and $1 plans have no API access.
  • Pi 1.4 or newer.
  • Network access to api.commandcode.ai with a 10 second fetch timeout.
pi install npm:@tduyng/pi-commandcode

Local checkout: pi install /path/to/dotfiles/pi/agent/extensions/pi-commandcode

export COMMAND_CODE_API_KEY="user_..."

| Variable | Meaning | | --- | --- | | COMMAND_CODE_API_KEY | Provider API key, required for requests | | CMD_ZDR=1 | Sends x-cmd-zdr: 1, so requests go only to zero-data-retention upstreams. A model without one fails with HTTP 422 |

Limits

  • The catalog carries no image or price metadata, so every model is text-only and shows zero cost in pi.

  • Thinking is on for every model, and pi levels map to reasoning_effort with minimal sending low.

  • off is offered only for the DeepSeek ids that accept it, because a model that cannot stop thinking rejects off with HTTP 400.

  • Claude 4.6 and newer use adaptive thinking, and the 4.5 models take a thinking budget.

  • Every model gets a 32768 output limit, the smallest in the Command Code CLI catalog, because per-model limits are not in the Provider API.

  • Chat Completions is used for every non-Claude model, as the docs say. A model that rejects that wire returns its own error.

  • Messages requests carry pi's ?beta=true query string, added by the Anthropic SDK.

  • If no models appear, check the network and the key, then open /model again.