Open
Conversation
Users with a Claude Pro/Max subscription but no API key can now use Phoenix code generation via the `claude` CLI. The provider auto-detects when the CLI is available and falls back to it when no ANTHROPIC_API_KEY or OPENAI_API_KEY is set. - New `ClaudeCliProvider` in `src/llm/claude-cli.ts` pipes prompts via stdin to `claude -p` with `--system-prompt` for system messages - Provider resolution auto-detects `claude` CLI as third-priority fallback - Also adds missing `@types/node` dev dependency needed for build Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
claude-cliLLM provider that uses theclaudeCLI (claude -p) for code generationphoenix bootstrapwithout needing a separate API key — the provider auto-detects the authenticated CLIMotivation
The quick start requires an
ANTHROPIC_API_KEYorOPENAI_API_KEY, but many Claude users have a Pro/Max subscription that doesn't include API access. This removes that friction — ifclaudeCLI is installed and authenticated, code generation just works.Changes
src/llm/claude-cli.ts(new):ClaudeCliProviderimplementing theLLMProviderinterface. Pipes prompts via stdin toclaude -pwith--system-promptfor system messages.src/llm/resolve.ts: Auto-detectsclaudeCLI as third-priority fallback after Anthropic and OpenAI API keyssrc/llm/provider.ts: Addsclaude-clitoDEFAULT_MODELSpackage.json: Adds missing@types/nodedev dependencyTest plan
claude -pworks with stdin piping and--system-promptphoenix bootstraponexamples/todo-app— all 3 IUs generated real code (not stubs)localhost:3000🤖 Generated with Claude Code