pi-claude-bridge weekly downloads statistics
By elidickinson (2 listings) · npm · Claude Code
Pi extension that uses Claude Code (via Agent SDK) as a model provider.
pi-claude-bridge has 70,403 recorded weekly downloads on npm, an increase of 251% over the past 30 days, ranking #702 of 3,247 tracked listings.
About pi-claude-bridge
pi-claude-bridge
Use Claude models in pi with your Claude subscription.
Is this allowed? Yes, as far as I can tell. Anthropic at one point announced and then unannounced a billing change for Agent SDK tools like this one. Things could change again, but right now the bridge uses your regular subscription quota just like Claude Code.
<p> <a href="assets/claude-bridge1.png"><img src="assets/claude-bridge1.png" width="49%" alt="Claude Opus running in pi with access to pi's tools"></a> <a href="assets/claude-bridge2.png"><img src="assets/claude-bridge2.png" width="49%" alt="Another pi model delegating a question to Claude with AskClaude"></a> </p>[!NOTE] There's another good option: the pi maintainers have another Claude Code provider:pi-claude-code.
- pi-claude-bridge (this extension) runs Claude Code through the official Agent SDK and spends a lot of effort keeping pi's message history in sync with CC's session on disk.
- Tradeoff: More complex and doesn't always play nicely with extensions that change pi's system prompt mid-session or alter message history.
- pi-claude-code runs
claude -pfor each turn and puts a local proxy in front of CC to rewrite requests before they get to Anthropic. Simpler and more compatible design.
- Tradeoff: manipulating API requests on the wire is less clearly within Anthropic's TOS. CC updates may also introduce breaking changes without warning.
Install
The bridge needs pi 1.5.1 or newer.
- Install the extension:
pi install npm:pi-claude-bridge - Log in to Claude Code with your Claude subscription: run
claude auth login. The bridge uses Claude Code's login, not pi's/login. - In pi, pick a
claude-bridge/...model with/model, e.g.claude-bridge/claude-opus-5-5. Don't pick theanthropic/...models: those are pi's own Anthropic provider and don't go through Claude Code or your subscription.
Optional: AskClaude
To let other providers delegate tasks or questions to Claude Code, install the AskClaude tool: pi install npm:pi-claude-bridge-askclaude (askclaude/).
Usage
The model list comes from pi-ai's Anthropic catalog automatically. When pi-ai adds a new Claude model, it appears in /model after you update the package; no bridge update is needed. Dated snapshot ids (e.g. claude-opus-4-5-20251101) are not shown.
Claude Mythos 5.2 and 5.1 are listed too (at the bottom), though pi-ai leaves them out. Anthropic serves Mythos only to approved programs, so on accounts without access requests fail with a 404 "There's an issue with the selected model".
All current models run with 1M context. Opus 4.6 and Sonnet 4.6 need extra settings for 1M (see Configuration).
pi's tools are bridged to Claude Code, but you continue to use pi as usual:
- Bash commands get Claude Code's 120-second default timeout since Claude expects it but pi's bash has no default limit.
- Skills are forwarded to Claude Code's system prompt.
- Steering mid-turn works and reaches Claude at the next tool boundary.
Configuration
Create ~/.pi/agent/claude-bridge.json
{
"provider": {
"strictMcpConfig": true,
"pathToClaudeCodeExecutable": "/home/you/.nix-profile/bin/claude"
}
}
Provider options
strictMcpConfig- block MCP servers from~/.claude.json/.mcp.json(defaulttrue). Cloud MCP (Gmail/Drive via claude.ai OAuth) is always blocked.autoMemoryEnabled- enable Claude Code's auto-memory system (defaultfalse).systemPromptPreset- Claude Code's own system prompt goes in front, with pi's whole prompt appended (default"claude_code"). Set tofalseto make pi's prompt the whole system prompt.pathToClaudeCodeExecutable- path to theclaudebinary. Useful if your OS/filesystem has the SDK's bundled musl/glibc binaries in a place where they can't run. For example, with Nix you can set the binary to"/home/you/.nix-profile/bin/claude".forceTwoHundredK- array of model ids to pin to 200K context (bare id, no[1m]suffix). Use if pi-ai declares a model at 1M but Claude Code won't serve it on your plan.plan- set to"max"on a Max (or Team Premium/Enterprise) plan to run Opus 4.6 with 1M context (default"pro").longContextExtraUsage- set totrueto run Opus 4.6 (on Pro) and Sonnet 4.6 with 1M context, billed through Extra Usage.
Model overrides
pi's modelOverrides in ~/.pi/agent/models.json do not work correctly with pi-claude-bridge; they only apply to pi-side settings like compaction threshold. Overriding contextWindow or other fields requires editing src/models.ts directly. To pin a model to 200K, use provider.forceTwoHundredK instead.
Environment variables
Claude Code inherits pi's environment. To set variables only for bridge requests (a proxy, a gateway, Bedrock settings), add an env object to a claude-bridge credential in ~/.pi/agent/auth.json:
- Values override pi's environment.
- An empty value removes the variable.
- Extensions calling a bridge model can pass
envper request the same way.
CLAUDE_CONFIG_DIR, HOME and USERPROFILE can't be set there (the turn fails), since the bridge reads Claude Code's session files through pi's own values.
This example sends bridge requests through a proxy and keeps an exported gateway (issue #107) away from Claude Code, so it uses your Claude login:…
Description from the npm listing.
- pi-package
- pi
- extension
- claude-code
- claude-agent-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 Claude Code plugins
All 20 pi-claude-bridge 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/pi-claude-bridge. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.