Install
openclaw skills install @ilzc/cli-ai-proxyManage cli-ai-proxy: local OpenAI-compatible proxy that routes requests through Gemini CLI and Claude Code. The proxy itself reads no credentials; the underlying CLIs handle their own auth.
openclaw skills install @ilzc/cli-ai-proxyLocal OpenAI-compatible proxy that bridges Gemini CLI and Claude Code to a unified REST API. Requests go through the installed CLI tools — the proxy makes no direct AI-vendor API calls and holds no API keys. Authentication (OAuth, API keys, session tokens) is managed by the gemini / claude CLIs themselves.
This skill installs the cli-ai-proxy package from the public npm registry. Specifically:
cli-ai-proxy (no GitHub clone, no local build step)package.json declares no preinstall/postinstall hooksyaml (config parsing)config.yaml, .proxy.pid, and proxy.logconfigure-provider.sh / cli-ai-proxy configure-openclaw, which edits ~/.openclaw/openclaw.json and writes a .bak backup next to it firstgemini / claude CLIs, not by the proxy itself✅ User asks to start/stop/check the AI proxy ✅ User wants to route requests through Gemini CLI or Claude Code ✅ User asks about available models or proxy health ✅ User wants to configure OpenClaw to use the proxy ✅ Troubleshooting proxy connectivity or CLI issues
❌ Direct API calls to OpenAI/Anthropic/Google (this proxy only uses CLI tools) ❌ Managing API keys (CLIs handle their own authentication)
| Action | Command |
|---|---|
| Start proxy | {baseDir}/scripts/start.sh |
| Stop proxy | {baseDir}/scripts/stop.sh |
| Check status | {baseDir}/scripts/status.sh |
| Health check | {baseDir}/scripts/health.sh |
| Configure OpenClaw | {baseDir}/scripts/configure-provider.sh |
| Full install | {baseDir}/scripts/install.sh |
{baseDir}/scripts/start.sh
Starts the proxy on 127.0.0.1:9090 (default). The proxy listens for OpenAI-compatible requests and routes them to the appropriate CLI tool.
Before starting, verify at least one CLI is available:
gemini --version (Gemini CLI)claude --version (Claude Code){baseDir}/scripts/status.sh
Shows: running/stopped, PID, health endpoint data, available CLI providers, concurrency stats.
{baseDir}/scripts/stop.sh
Gracefully shuts down the proxy: stops accepting connections, kills active CLI subprocesses, cleans up.
| Model ID | Provider | Backend Model |
|---|---|---|
gemini | Gemini CLI | CLI default (auto-upgrades) |
claude | Claude Code | CLI default (auto-upgrades) |
claude-sonnet | Claude Code | sonnet |
claude-opus | Claude Code | opus |
When OpenClaw is configured, use as cli-ai-proxy/gemini, cli-ai-proxy/claude, etc.
To configure OpenClaw to route through the proxy:
{baseDir}/scripts/configure-provider.sh
This automatically:
cli-ai-proxy as a provider in ~/.openclaw/openclaw.jsonAfter configuring, set the default model in openclaw.json:
{ "agents": { "defaults": { "model": { "primary": "cli-ai-proxy/gemini" } } } }
The proxy exposes:
POST /v1/chat/completions — Chat completions (streaming + non-streaming)GET /v1/models — List available modelsGET /health — Health check with provider status and concurrency infoDefault base URL: http://127.0.0.1:9090/v1
For full API details see references/api.md.
The proxy supports images in messages. When a request contains image_url content parts:
Supports both base64 data URLs and remote image URLs.
Config file: config.yaml in the proxy installation directory.
Key settings:
server.port — Listen port (default: 9090)concurrency.max — Max concurrent CLI processes (default: 5)timeout — CLI process timeout in ms (default: 300000)defaultModel — Default model when none specifiedFor full configuration options see references/configuration.md.
lsof -i :9090node --versionwhich gemini or which claudegemini --version or claude --versionThe concurrency limit has been reached. Either:
concurrency.max in config.yamlThe CLI process took too long. Either:
timeout in config.yamlFor more troubleshooting see references/troubleshooting.md.