Claude Code CLI

Use the Claude Code CLI as a Pi model provider, backed by your Claude Pro or Max subscription.

What it does

Pi-claude-cli registers a custom Pi provider named pi-claude-cli. When you select one of its Claude models in /model, Pi sends model requests through the local claude command instead of a direct Anthropic API key.

Each turn runs Claude Code CLI in stream-json mode, streams text and thinking back into Pi, and lets Pi execute tool calls natively. The extension also resumes Claude Code CLI sessions between turns and exposes custom Pi tools to Claude through a schema-only MCP bridge.

Why it's included

Many Pi users already have Claude Code authenticated through a Claude Pro or Max subscription. Claude Code CLI makes that subscription usable as a Pi backend without setting up separate Anthropic API billing, while still keeping Pi's native tools, UI, and package ecosystem in charge.

It fits LazyPi as a practical bridge: install the package, make sure Claude Code CLI is available and authenticated, then pick the Claude model provider from Pi's normal model selector.

Usage notes

StepWhat to do
Install Claude Code CLI npm install -g @anthropic-ai/claude-code
Authenticate Claude claude auth login
Select in Pi Open /model and choose a Claude model under the pi-claude-cli provider

The provider depends on claude being on your PATH. If Claude Code CLI is missing or not authenticated, the extension logs setup instructions and Pi can continue using your other configured providers.