[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-81660":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":34,"readmeContent":35,"aiSummary":36,"trendingCount":16,"starSnapshotCount":16,"syncStatus":37,"lastSyncTime":38,"discoverSource":39},81660,"pi-commandcode-provider","patlux\u002Fpi-commandcode-provider","patlux","pi custom provider for the Command Code API — 18 models including Claude, GPT, DeepSeek, Kimi, GLM, MiniMax, and Qwen","https:\u002F\u002Fpi.dev\u002Fpackages\u002Fpi-commandcode-provider",null,"TypeScript",37,15,21,3,0,4,11,16,12,58.71,"MIT License",false,"main",true,[27,28,29,30,31,32,33],"ai","commandcode","llm","pi","pi-extension","pi-package","provider","2026-06-12 04:01:34","# pi-commandcode-provider\n\nA [pi](https:\u002F\u002Fgithub.com\u002Fbadlogic\u002Fpi-mono) custom provider that connects pi to the [Command Code](https:\u002F\u002Fcommandcode.ai) API.\n\n> **Disclaimer:** This is an unofficial, community-maintained package. I am not affiliated with, endorsed by, or connected to Command Code in any way. This provider simply forwards requests to the public Command Code API using your own API key.\n\n> **Note:** This package only provides a model _provider_. It does **not** include an API key. You must bring your own Command Code API key or subscription.\n\n> 💰 **Current offers:** Command Code offers [4× usage of DeepSeek V4 Pro](https:\u002F\u002Fcommandcode.ai\u002Fdocs\u002Fresources\u002Fpricing-limits#deepseek-v4-pro-4x-usage) and [2× usage of Qwen 3.7 Max](https:\u002F\u002Fcommandcode.ai\u002Fdocs\u002Fresources\u002Fpricing-limits#qwen-3.7-max-2x-usage).\n\n## Models\n\nModels are fetched live from Command Code's Provider API at startup, so new models like Qwen 3.7 Max show up without a package release.\n\nYou can list the current Command Code models with:\n\n```sh\npi -e index.ts --list-models\n```\n\n## Install\n\n```sh\npi install npm:pi-commandcode-provider\n```\n\nOr shorthand:\n\n```sh\npi install pi-commandcode-provider\n```\n\nThen reload pi:\n\n```txt\n\u002Freload\n```\n\n### Oh My Pi\n\n```sh\nomp plugin install pi-commandcode-provider\n```\n\nThen restart OMP or run:\n\n```txt\n\u002Freload\n```\n\n## Setup\n\nSet your Command Code API key using one of these methods:\n\n### 1. Browser login (recommended)\n\nIn pi, run:\n\n```txt\n\u002Flogin\n```\n\nThen select **Command Code** from the provider list.\n\n\u003Cimg width=\"1520\" height=\"554\" alt=\"image\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F071e929a-6f49-4803-bfec-7a31368fb12a\" \u002F>\n\nThis opens Command Code in your browser and stores the returned API key in pi's auth file. If the browser shows \"Copy your API key\" because automatic transfer failed, copy that key and paste it into the pi terminal prompt.\n\n> Note: `\u002Flogin commandcode` is not supported by pi currently; use interactive `\u002Flogin` and select Command Code.\n\n### 2. Environment variable\n\n```sh\nexport COMMANDCODE_API_KEY=\"user_...\"\n```\n\n### 3. Auth file\n\nCreate `~\u002F.commandcode\u002Fauth.json`:\n\n```json\n{\n  \"apiKey\": \"user_...\"\n}\n```\n\nThe official Command Code CLI auth shape is also supported:\n\n```json\n{\n  \"command-code\": {\n    \"type\": \"api\",\n    \"key\": \"user_...\"\n  }\n}\n```\n\nOr use a pi\u002FOMP auth file at `~\u002F.pi\u002Fagent\u002Fauth.json` or `~\u002F.omp\u002Fagent\u002Fauth.json`:\n\n```json\n{\n  \"commandcode\": \"user_...\"\n}\n```\n\n## Usage\n\nAfter installing and setting your API key, select a Command Code model in pi:\n\n```txt\n\u002Fmodel deepseek\u002Fdeepseek-v4-flash\n```\n\nAny query will then use the Command Code API. You can list available models:\n\n```sh\npi -e index.ts --list-models   # or \u002Fmodels within pi\nomp -e index.ts --list-models\n```\n\nIn OMP, use the provider-qualified model name:\n\n```sh\nomp -p \"hello\" --model commandcode\u002Fdeepseek\u002Fdeepseek-v4-flash\n```\n\nOMP currently resolves `--provider commandcode --model ...` before extension providers are loaded, so prefer `--model commandcode\u002F\u003Cmodel-id>`. \u003C!-- TODO: remove this note once OMP fixes provider resolution order for extension-loaded providers -->\n\n## Model discovery\n\nOn startup, the provider fetches:\n\n```txt\nhttps:\u002F\u002Fapi.commandcode.ai\u002Fprovider\u002Fv1\u002Fmodels\n```\n\nFor tests or local mocks, override it with `COMMANDCODE_MODELS_URL`.\n\n## Pricing\n\nCommand Code does not yet expose model pricing through its Provider API. The provider ships a static cost table (`MODEL_COSTS` in `index.ts`) for known models so that pi can display per-model pricing.\n\n- Models present in `MODEL_COSTS` show their real per-million-token rates (including promotional deals like the DeepSeek V4 Pro 4× discount and Qwen 3.7 Max 2× discount).\n- Models **not** in the table fall back to zero cost. When the Provider API adds a `cost` field, the static table can be removed.\n\nTo add or update a price, edit the `MODEL_COSTS` record in `index.ts` and update the corresponding test in `tests\u002Ftest-pricing.ts`.\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, PR expectations, and commit message rules.\n\n## Release\n\nSee [RELEASE.md](RELEASE.md) for the prerelease, npm smoke-test, stable publish, git tag, and GitHub follow-up checklist.\n\n## License\n\nMIT\n","pi-commandcode-provider 是一个用于连接 pi 到 Command Code API 的自定义提供程序，支持包括 Claude、GPT、DeepSeek、Kimi、GLM、MiniMax 和 Qwen 在内的 18 种模型。该项目使用 TypeScript 编写，其核心功能在于能够实时从 Command Code 的 Provider API 获取最新的模型列表，并允许用户通过设置自己的 API 密钥来调用这些模型。适用于需要集成多种 AI 模型进行开发或研究的场景，尤其是当开发者希望在一个统一接口下访问多个语言模型时。此外，项目提供了多种方式配置 API 密钥，确保了使用的灵活性与安全性。",2,"2026-06-11 04:05:52","CREATED_QUERY"]