mirror of
https://github.com/katanemo/plano.git
synced 2026-06-26 15:39:40 +02:00
feat(claude-cli): add local Claude Code CLI provider bridge
Spawn the local `claude` binary as a subprocess and expose it as an
Anthropic Messages-compatible provider. Hosted in brightstaff
(`CLAUDE_CLI_LISTEN_ADDR`), with session reuse, idle TTL, and watchdog.
User-facing surface is `model_providers: [{ model: claude-cli/* }]` —
the Python CLI auto-fills name/provider_interface/base_url/access_key
and the launcher (native + supervisord) enables the bridge listener
only when at least one claude-cli provider is present.
This commit is contained in:
parent
b71a555f19
commit
9fdfeb7cbf
26 changed files with 2847 additions and 2 deletions
27
demos/integrations/claude_cli/config.yaml
Normal file
27
demos/integrations/claude_cli/config.yaml
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
version: v0.4.0
|
||||
|
||||
# Claude Code CLI as a Plano model_provider.
|
||||
#
|
||||
# The single line below is everything you need: Plano detects the
|
||||
# `claude-cli/*` namespace, auto-fills the provider_interface, base_url and
|
||||
# placeholder access_key, and starts a localhost bridge inside brightstaff
|
||||
# that shells out to the `claude` binary on your $PATH for each request.
|
||||
#
|
||||
# Requirements:
|
||||
# - `claude --version` must work in the same shell as `planoai up`.
|
||||
# - Auth happens via the CLI's own `claude auth login` (no API key needed
|
||||
# in Plano).
|
||||
#
|
||||
# Optional overrides via env (set before `planoai up`):
|
||||
# CLAUDE_CLI_BIN=/custom/path/to/claude
|
||||
# CLAUDE_CLI_PERMISSION_MODE=default
|
||||
# CLAUDE_CLI_LISTEN_ADDR=127.0.0.1:14001
|
||||
|
||||
listeners:
|
||||
- type: model
|
||||
name: model_listener
|
||||
port: 12000
|
||||
|
||||
model_providers:
|
||||
- model: claude-cli/*
|
||||
default: true
|
||||
Loading…
Add table
Add a link
Reference in a new issue