{"id":51512747,"url":"https://github.com/patlux/pi-commandcode-provider","last_synced_at":"2026-07-08T08:01:42.199Z","repository":{"id":355839723,"uuid":"1229786287","full_name":"patlux/pi-commandcode-provider","owner":"patlux","description":"pi custom provider for the Command Code API — 18 models including Claude, GPT, DeepSeek, Kimi, GLM, MiniMax, and Qwen","archived":false,"fork":false,"pushed_at":"2026-07-05T01:11:52.000Z","size":221,"stargazers_count":59,"open_issues_count":3,"forks_count":17,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-05T01:11:57.471Z","etag":null,"topics":["ai","commandcode","llm","pi","pi-extension","pi-package","provider"],"latest_commit_sha":null,"homepage":"https://pi.dev/packages/pi-commandcode-provider","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/patlux.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-05-05T11:37:11.000Z","updated_at":"2026-07-05T01:10:06.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/patlux/pi-commandcode-provider","commit_stats":null,"previous_names":["patlux/pi-commandcode-provider"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/patlux/pi-commandcode-provider","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patlux%2Fpi-commandcode-provider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patlux%2Fpi-commandcode-provider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patlux%2Fpi-commandcode-provider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patlux%2Fpi-commandcode-provider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patlux","download_url":"https://codeload.github.com/patlux/pi-commandcode-provider/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patlux%2Fpi-commandcode-provider/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35257106,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-08T02:00:06.796Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","commandcode","llm","pi","pi-extension","pi-package","provider"],"created_at":"2026-07-08T08:01:41.532Z","updated_at":"2026-07-08T08:01:42.192Z","avatar_url":"https://github.com/patlux.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pi-commandcode-provider\n\nA [pi](https://github.com/badlogic/pi-mono) custom provider that connects pi to the [Command Code](https://commandcode.ai) API.\n\n\u003e **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\u003e **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\u003e 💰 **Current offers:** Command Code offers [4× usage of DeepSeek V4 Pro](https://commandcode.ai/docs/resources/pricing-limits#deepseek-v4-pro-4x-usage) and [2× usage of Qwen 3.7 Max](https://commandcode.ai/docs/resources/pricing-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/reload\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/reload\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/login\n```\n\nThen select **Command Code** from the provider list.\n\n\u003cimg width=\"1520\" height=\"554\" alt=\"image\" src=\"https://github.com/user-attachments/assets/071e929a-6f49-4803-bfec-7a31368fb12a\" /\u003e\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\u003e Note: `/login commandcode` is not supported by pi currently; use interactive `/login` 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 `~/.commandcode/auth.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/OMP auth file at `~/.pi/agent/auth.json` or `~/.omp/agent/auth.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/model deepseek/deepseek-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 /models 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/deepseek/deepseek-v4-flash\n```\n\nOMP currently resolves `--provider commandcode --model ...` before extension providers are loaded, so prefer `--model commandcode/\u003cmodel-id\u003e`. \u003c!-- TODO: remove this note once OMP fixes provider resolution order for extension-loaded providers --\u003e\n\n## Model discovery\n\nOn startup, the provider fetches:\n\n```txt\nhttps://api.commandcode.ai/provider/v1/models\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/test-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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatlux%2Fpi-commandcode-provider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatlux%2Fpi-commandcode-provider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatlux%2Fpi-commandcode-provider/lists"}