[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-94492":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":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":15,"stars30d":16,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":15,"starSnapshotCount":15,"syncStatus":26,"lastSyncTime":27,"discoverSource":28},94492,"pi-black","paoloanzn\u002Fpi-black","paoloanzn","Claude subscription wire compatibility for Pi.","",null,"TypeScript",139,9,1,0,17,44.7,"MIT License",false,"main",true,[],"2026-08-24 04:01:22","# Pi Black\n\nUse your Claude Max (or Pro) subscription with Pi.\n\nPi Black is an unofficial Pi package that routes Anthropic OAuth requests through your existing Claude subscription usage by applying Claude Code 2.1.224 request conventions. The existing source patch and standalone-binary build system remain available as a fallback.\n\n## Install\n\nPi Black is pinned to Pi 0.84.1 and fails closed on other Pi versions.\n\n```sh\npi install git:github.com\u002Fpaoloanzn\u002Fpi-black\n```\n\nPi checks unpinned Git packages for updates in the background. When a newer Pi Black commit is available, Pi displays a package-update notice; apply it with:\n\n```sh\npi update --extensions\n```\n\nFor a reproducible install, pin a release tag:\n\n```sh\npi install git:github.com\u002Fpaoloanzn\u002Fpi-black@v0.84.1-cc2.1.224.4\n```\n\nPinned packages do not move automatically. Install a newer tagged ref explicitly when you are ready to upgrade.\n\nThen use Pi's normal Anthropic login:\n\n```text\n\u002Flogin anthropic\n```\n\nThe package replaces only the built-in Anthropic provider implementation and only transforms OAuth-token requests. It preserves Pi's credential storage, OAuth refresh, model behavior, tools, retries, streaming, and usage accounting. API-key requests and non-Anthropic providers pass through unchanged.\n\n## Identity discovery\n\nNo identity environment variables are required. When Claude Code state exists, Pi Black reads the installation ID and account UUID from `~\u002F.claude.json` (or the location selected by `CLAUDE_CONFIG_DIR`) in memory and adds matching request metadata. It does not copy, print, or persist those values.\n\nCurrent subscription routing also works when that optional metadata is unavailable, as demonstrated by the standalone Pi Black binary with no identity variables in its environment.\n\n## What it changes\n\nFor Anthropic OAuth requests, Pi Black reproduces the version-specific SDK-CLI request shape:\n\n- exact billing and Agent SDK system-block ordering;\n- the prompt-dependent `cc_version` suffix;\n- structure-aware `cch` calculation using seeded XXH64;\n- per-request `x-client-request-id` values;\n- Claude Code session headers;\n- automatically discovered identity metadata when available.\n\nThe checksum implementation validates and updates only the first billing system block. User content, tool results, descriptions, and nested `model` or `max_tokens` fields cannot redirect the placeholder patch.\n\n## Verify the package\n\n```sh\nnpm ci --ignore-scripts\nnpm run check\n```\n\nPublic CI uses fake transports only. It never makes provider requests and requires no credentials.\n\n## Standalone installer and binaries\n\nThe Pi package is the recommended installation. macOS and Linux users who prefer the standalone patched build can install the latest native release as `pi-black`:\n\n```sh\ncurl -fsSL https:\u002F\u002Fgithub.com\u002Fpaoloanzn\u002Fpi-black\u002Freleases\u002Flatest\u002Fdownload\u002Finstall.sh | sh\n```\n\nThe installed launcher checks the latest release checksum at interactive startup. If the installed build differs, it offers to update before starting Pi Black. Downloads are checksum-verified; network-check failures are silent, while a rejected or failed update continues with the installed build. Set `PI_BLACK_NO_UPDATE_CHECK=1` to disable this check; Pi's `PI_OFFLINE=1` also disables it.\n\nInstall a specific standalone release with `PI_BLACK_RELEASE`:\n\n```sh\ncurl -fsSL https:\u002F\u002Fgithub.com\u002Fpaoloanzn\u002Fpi-black\u002Freleases\u002Flatest\u002Fdownload\u002Finstall.sh | PI_BLACK_RELEASE=v0.84.1-cc2.1.224.4 sh\n```\n\nThe repository pins an immutable commit from [`paoloanzn\u002Fpi`](https:\u002F\u002Fgithub.com\u002Fpaoloanzn\u002Fpi), applies the patch under `patches\u002F`, and delegates standalone compilation to Pi's release builder.\n\n```sh\n.\u002Fscripts\u002Fverify.sh\n.\u002Fscripts\u002Fbuild-all.sh \"$PWD\u002Fout\"\n```\n\nManual patch application:\n\n```sh\ngit clone https:\u002F\u002Fgithub.com\u002Fpaoloanzn\u002Fpi.git pi\ncd pi\ngit checkout --detach 7aca0d7b3e041a9e2b635e8370b2549f032932d6\ngit am ..\u002Fpi-black\u002Fpatches\u002F*.patch\n```\n\nBuild requirements and repeatability limits are in [`BUILD.md`](BUILD.md).\n\n## Status and terms\n\nThis project is unofficial and is not affiliated with or endorsed by Anthropic or the upstream Pi project. Users must provide their own valid account credentials and determine whether use complies with applicable service terms. The compatibility mechanism is version-specific and must be revalidated when Claude Code or Pi changes.\n\nNo OAuth tokens, identifiers, captures, or private Claude state are included in the package or release artifacts. Pi and the derived patch are distributed under the MIT license; see [`LICENSE`](LICENSE).\n","Pi Black 是一个为 Pi 客户端提供 Claude 订阅兼容能力的非官方扩展包。它通过复现 Claude Code 2.1.224 的 OAuth 请求规范（包括请求头结构、cc_version 后缀、XXH64 校验和、会话元数据等），使用户能复用已有的 Claude Max\u002FPro 订阅登录 Pi，无需额外 API 密钥。项目采用 TypeScript 实现，仅替换 Anthropic 提供商的 OAuth 请求逻辑，完整保留 Pi 原有的凭证管理、刷新机制、流式响应、用量统计等功能，且不读取或持久化用户敏感信息。适用于希望在 Pi 环境中无缝使用 Claude 订阅服务的技术用户与开发者。",2,"2026-08-10 02:30:07","CREATED_QUERY"]