[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-116925":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":13,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":15,"stars7d":16,"stars30d":16,"stars90d":13,"forks30d":13,"starsTrendScore":17,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":20,"hasPages":20,"topics":22,"createdAt":10,"pushedAt":25,"updatedAt":26,"readmeContent":27,"aiSummary":10,"trendingCount":13,"starSnapshotCount":13,"syncStatus":28,"lastSyncTime":29,"discoverSource":30},116925,"pansy","pansy-ai\u002Fpansy","pansy-ai","A local gateway that lets every coding agent use every provider's models, with a desktop window","https:\u002F\u002Fpansyai.dev",null,"Rust",117,0,60,6,41,49,76.1,"MIT License",false,"main",[23,24],"ai-gateway","nsh","2026-11-24 12:50:53","2026-11-24 16:39:31","\u003Cdiv align=\"center\">\n\n\u003Cimg src=\"assets\u002Fbrand\u002Fpansy-icon-256.png\" width=\"112\" alt=\"pansy\">\n\n# pansy\n\n### Every agent's model. One place.\n\n**Claude Code on Kimi. Codex on DeepSeek. Gemini CLI on GLM.**\u003Cbr>\nPick any model for any agent; one local gateway serves them all,\u003Cbr>\nand when a key runs out of quota, the next one quietly takes over.\n\n**English** · [简体中文](README.zh-CN.md)\n\n\u003C\u002Fdiv>\n\npansy is a local gateway and a desktop app for Linux, macOS and Windows,\nwritten in Rust, its window built on [Native Shell](https:\u002F\u002Fnsh.dev) (NSH). As\nthe three petals of its logo meet at one point, your agents and your providers\nmeet in one gateway. Everything runs on your computer: your keys, prompts and\nreplies go only to the providers you chose.\n\n\u003Cimg src=\"assets\u002Fagents.png\" width=\"900\" alt=\"pansy's Agents page: Claude Code on DeepSeek, Codex on the Daily routing group, each picked from one list\">\n\n## What it does\n\n- **Any model, any agent.** Pick a model for Claude Code, Codex, Gemini CLI,\n  OpenCode, Qwen Code, Crush or any of some fifty agents from one list. pansy\n  edits the one setting that\n  matters in the agent's own config; comments, order and formatting stay as\n  they were, and *Disconnect* puts back exactly what pansy changed.\n- **One gateway, four protocols.** `127.0.0.1:7267` speaks Anthropic Messages,\n  OpenAI Chat Completions, OpenAI Responses and Gemini, and translates between\n  them — streaming, tool calls, reasoning and Codex's free-form tools included.\n  When an agent and a provider speak the same protocol the request passes\n  through untouched.\n- **Keys that fail over.** A provider can hold several keys, tried in order. A\n  key that is rate-limited, out of quota or refused rests for a while and the\n  next one answers, before the agent sees an error. A limit rests the key for\n  the model that hit it, not for its others; a request one model turns away\n  goes on to the next model of its group; a connection that broke is asked\n  once more first.\n- **Subscriptions.** A ChatGPT plan, as Codex uses it, GitHub Copilot's and\n  Gemini Code Assist's, as Gemini CLI uses it, serve every agent: pansy reads\n  the sign-in Codex, Copilot's editors and Gemini CLI already have, where they\n  keep it, and signs in to more accounts itself (in the browser or by a\n  code). Each is a provider (`codex\u002F…`, `copilot\u002F…`, `gemini-cli\u002F…`) whose\n  accounts fail over like keys; what each has left of its allowance is on\n  the Usage page and in `pansy limits`, and one its vendor holds is passed\n  over until its window renews.\n- **Routing groups.** `group\u002Fdaily` is several models picked as one, in order,\n  taking turns or least used first; groups can contain groups.\n- **Profiles.** Save every agent's model under one name and switch them all\n  back in one move.\n- **Sessions.** Claude Code's, Codex's and OpenCode's sessions on this\n  computer, by the folder they ran in: what each spent, the command that\n  resumes it, what was said in it, found by its words. Delete moves a\n  session's files into pansy's trash, which puts them back (OpenCode's live in\n  a database it keeps open, so they are only listed).\n- **Usage.** Requests, tokens and cache reads by day, model, agent and\n  provider, counted on this computer. Prompts and replies are never kept.\n- **Masking.** API keys, tokens, passwords, personal data and your own words\n  leave this computer as placeholders (`{{API_KEY_k3j9x2ab}}`) and come back as\n  they were in the answer, streamed or not. Each kind can instead warn or hold\n  the request back; Insights › Masking shows what each vendor saw, never\n  keeping the values.\n- **A model for one run, a model for one folder.** `pansy run claude` starts\n  an agent on a model without writing its config, so two terminals use two\n  models at once. A project's `.pansy.toml` names the model each agent uses\n  there (model names alone, no keys; one that came with a repository counts\n  only after you say yes to it), and Usage counts requests by project.\n- **Shown before it is done.** *What it changes* on an agent's row, and\n  `pansy \u003Cagent> \u003Cmodel> --show`, list every key connecting would set in the\n  agent's files, with what is there now.\n- **Tested between protocols.** [docs\u002Fcompat.md](docs\u002Fcompat.md) is written\n  by a test from hand-written requests and answers in all four protocols,\n  and fails the build when it stops being true. What a vendor's models\n  refuse is data (`pansy quirks`, your own in `quirks.toml`).\n- **Agents as files.** An agent is a TOML manifest\n  ([docs\u002Fagents.md](docs\u002Fagents.md)); one of your own in\n  `~\u002F.config\u002Fpansy\u002Fagents\u002F` needs no new pansy.\n- **Brought over from what you have.** The providers CC Switch, Claude Code,\n  Codex and OpenCode already hold are offered on the Providers page, read\n  only, their keys masked; a `pansy:\u002F\u002Fimport?…` link, a pasted curl command\n  or a vendor's environment lines fill a provider in.\n- **60 presets.** Anthropic, OpenAI, Gemini, DeepSeek,\n  xAI, Kimi and Kimi Code, Zhipu GLM, Z.ai, MiniMax, StepFun, Xiaomi MiMo,\n  LongCat, Baidu Qianfan, Tencent Cloud, Huawei Cloud, Volcengine Ark, Qwen and\n  Alibaba's Token Plans, Mistral, Groq, Amazon Bedrock, Azure OpenAI, Ollama\n  Cloud, Nous Portal, OpenRouter, Vercel AI Gateway, OpenCode Go and Zen, Kilo,\n  SiliconFlow, NVIDIA NIM, ModelScope, AiHubMix, Ollama, LM Studio, oMLX,\n  GPUStack… each with its logo, its coding plans or regions picked in its\n  editor, and any OpenAI-, Anthropic- or Gemini-compatible URL.\n\n## Install\n\nDownload pansy for your system from\n[releases.pansyai.dev](https:\u002F\u002Freleases.pansyai.dev\u002Findex.html) or the\n[GitHub releases](https:\u002F\u002Fgithub.com\u002Fpansy-ai\u002Fpansy\u002Freleases):\n\n- **macOS**: `pansy-\u003Cversion>-macos-aarch64.dmg` (`x86_64` for Intel); drag\n  Pansy to Applications. It is not notarized yet, so clear the quarantine\n  first: `xattr -dr com.apple.quarantine \u002FApplications\u002FPansy.app`.\n- **Windows**: `pansy-\u003Cversion>-windows-x86_64-setup.exe`, which installs\n  for you alone, with no administrator, and can put `pansy` on PATH.\n- **Linux**: `sudo apt install .\u002Fpansy-\u003Cversion>-linux-x86_64.deb`, or the\n  `.AppImage` (`chmod +x` and run it), or the archive:\n  `tar -xzf pansy-\u003Cversion>-linux-x86_64.tar.gz && .\u002Fpansy\u002Finstall.sh`.\n\npansy then updates itself: Settings › About has the channel and What's new.\n\n## Quick start\n\n```sh\npansy provider add deepseek sk-…            # a preset needs only the key\npansy claude deepseek\u002Fdeepseek-chat         # Claude Code on DeepSeek\npansy codex moonshot\u002Fkimi-k2-0905-preview   # Codex on Kimi\npansy group add \"Daily\" models=deepseek\u002Fdeepseek-chat,moonshot\u002Fkimi-k2-0905-preview\npansy gemini group\u002Fdaily                    # fails over between them\npansy claude opus anthropic\u002Fclaude-opus-4-5 # Claude Code's opus tier; `pansy claude effort high`\npansy codex compact_at 200k                 # an agent's own settings; `default` puts one back\npansy opencode list hide moonshot\u002Fkimi-k2   # which models an agent lists; `pansy opencode names off`\npansy agents update all                     # the agents' own CLIs, to their newest\npansy save work && pansy use work           # profiles\npansy usage                                 # what went through the gateway\npansy settings set masking '{\"secrets\": true}'   # keys go to vendors as placeholders\npansy mask \"my key is sk-proj-…\"            # what a vendor would see\npansy serve                                 # the gateway without a window\npansy doctor                                # whether the gateway, providers and agents work\npansy test deepseek\u002Fdeepseek-chat           # one short message through the gateway\npansy pause all && pansy resume all         # the agents on their own configs for now, and back\npansy project init                          # .pansy.toml: this folder's model for each agent\npansy run claude                            # Claude Code on it, for this run alone\npansy run --model group\u002Fdaily codex         # or on another, in another terminal\npansy codex deepseek\u002Fdeepseek-chat --show   # what connecting would write, and nothing written\n```\n\nOr open the window (`pansy` without arguments). The first time, it welcomes\nyou: the agents it found on this computer, the providers your other apps\n(Claude Code, Codex, OpenCode, CC Switch) have set up, ticked to bring over\nwith their keys, and the folders your agents worked in.\n\n\u003Cimg src=\"assets\u002Fwelcome.png\" width=\"720\" alt=\"pansy's welcome: the agents found on this computer, three providers from CC Switch to import, and four projects\">\n\nThen **Providers → Add provider** for any more, and pick a model for each\nagent on **Agents**. Closing the window keeps pansy in the tray, so the\ngateway goes on serving your agents.\n\nAnything that takes a base URL can use the gateway too:\n\n```sh\nexport OPENAI_BASE_URL=http:\u002F\u002F127.0.0.1:7267\u002Fv1     OPENAI_API_KEY=pansy\nexport ANTHROPIC_BASE_URL=http:\u002F\u002F127.0.0.1:7267     ANTHROPIC_API_KEY=pansy\nexport GOOGLE_GEMINI_BASE_URL=http:\u002F\u002F127.0.0.1:7267 GEMINI_API_KEY=pansy\n```\n\n## Building\n\n```sh\n# The core, the gateway and the headless `pansy` command\ncargo test --workspace && cargo build --release -p pansy-cli\n\n# The desktop app (NSH 0.6.1)\ncd desktop\nnsh check && .\u002Ftest.sh                     # Rust and headless UI tests in a scratch home\ncargo build -p pansy-desktop && nsh build App.tsx --out target\u002Fdebug\u002Fnsh\n.\u002Ftarget\u002Fdebug\u002Fpansy                       # the window, with the gateway beside it\npackaging\u002Fbuild.sh                         # dist\u002Fpansy-\u003Cversion>-\u003Cos>-\u003Carch>.tar.gz (.zip on Windows)\npackaging\u002Finstallers.sh                    # and its installers: .dmg, -setup.exe, .deb and .AppImage\n```\n\nA release is a tag: the archives and installers of every system, and the\nwindow's own updates, go to Cloudflare R2, where pansy looks for them, and\nthe installers to the tag's GitHub release too\n([docs\u002Frelease.md](docs\u002Frelease.md)).\n\n## Layout\n\n| Path | What it is |\n| :-- | :-- |\n| `crates\u002Fpansy-core` | Providers, keys, models, presets, groups, settings, usage, masking's records, the subscriptions' sign-ins (`subscription\u002F`); all files under `~\u002F.config\u002Fpansy` (`PANSY_HOME`) |\n| `crates\u002Fpansy-mask` | Masking: the rules that find secrets and personal data, placeholders, and putting the values back in streamed answers |\n| `crates\u002Fpansy-gateway` | The gateway: the four protocols read into one shape and written back out (`ir.rs`, `proto\u002F`), routing and failover (`route.rs`), what the Routing page plays (`trace.rs`), the HTTP side (`server.rs`) |\n| `crates\u002Fpansy-agents` | The agents: finding them and their versions, editing their JSON\u002FJSONC, TOML, `.env` and YAML configs in place, what was changed, profiles, their sessions (`sessions\u002F`) |\n| `crates\u002Fpansy-plugins` | Community plugins on Bun (OpenCode auth plugins, pi packages, middleware, agent plugins): installing them, the hosts they run in, sign-ins, middleware, agent plugins ([docs\u002Fplugins.md](docs\u002Fplugins.md)) |\n| `crates\u002Fpansy-cli` | The `pansy` command |\n| `desktop\u002F` | The NSH app: `App.tsx` and `ui\u002F` (TSX), `native\u002F` (`pansy\u002Fnative`, the Rust the TSX calls), `runner\u002F` (the program) |\n| `assets\u002Fbrand` | The pansy logo: the app icon (SVG, PNG, ICO) and the one-color glyph |\n\n## If you don't like something, fork it.\n\n```sh\ngh repo fork pansy-ai\u002Fpansy --clone && cd pansy\u002Fdesktop\ncargo build -p pansy-desktop && nsh build App.tsx --out target\u002Fdebug\u002Fnsh\n.\u002Ftarget\u002Fdebug\u002Fpansy                       # your window, with the gateway beside it\n```\n\n- **Change the UI.** The window is TSX: `desktop\u002FApp.tsx` and `desktop\u002Fui\u002F`,\n  every string in `ui\u002Fi18n.ts`. Restyle every page to your taste.\n- **Add an agent.** An agent is a manifest: a TOML in `~\u002F.config\u002Fpansy\u002Fagents\u002F`\n  needs no build, and one in `crates\u002Fpansy-agents\u002Fagents\u002F` is built in. A\n  provider is a preset in `crates\u002Fpansy-core\u002Fsrc\u002Fpresets.rs`. Wire in your\n  own tools, models and flows.\n- **Ship your own build.** `packaging\u002Fbuild.sh` makes the archives; put your\n  own keys in `desktop\u002Fkeys\u002F` and your own feed in `nsh.json`'s `\"updater\"`\n  ([docs\u002Frelease.md](docs\u002Frelease.md)), and distribute it as your own.\n\n## License\n\n[MIT](LICENSE). pansy began as a Rust rewrite of\n[magpie](https:\u002F\u002Fgithub.com\u002Fyetone\u002Fmagpie) by yetone; see\n[NOTICE.md](NOTICE.md) for it and the other work pansy builds on.\n",2,"2026-11-25 05:00:07","CREATED_QUERY"]