Token导航 LogoToken导航TokenDH.com
开发需要联网clawhub未标认证来源可访问clear审计通过

cli-ai-proxyCLI AI proxy 命令行

Agent Skill

cli-ai-proxy 用于补充开发相关能力,适合在 OpenClaw 中需要让 Agent 承接开发相关任务时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

3,410

周安装

145

GitHub Stars

公开资料未说明

下载量

1,195
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:cli-ai-proxy(CLI AI proxy 命令行)
来源仓库:https://github.com/ilzc/cli-ai-proxy
安装命令:
openclaw skills install cli-ai-proxy
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install cli-ai-proxy

简介

cli-ai-proxy 是一个与 OpenAI 兼容的本地代理,可路由 Gemini CLI 和 Claude Code 请求。

  • 适用于需要在本地管理多个 AI 模型接口调用的开发环境。
  • 通过 clawhub 安装并使用 openclaw skills install cli-ai-proxy 命令部署。
  • 代理本身不读取凭据,但仍需确保环境变量和配置文件的安全性。
  • 适用宿主包括 OpenClaw,接入前应确认版本、权限和运行环境要求。

SKILL.md

name
cli_ai_proxy
description
Manage 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.
user-invocable
true
metadata
{ "openclaw": { "emoji": "🔀", "skillKey": "cli-ai-proxy", "requires": { "anyBins": ["gemini", "claude"], "bins": ["node", "npm"] }, "install": [ { "id": "npm", "kind": "node", "package": "cli-ai-proxy", "bins": ["cli-ai-proxy"], "label": "Install cli-ai-proxy via npm" } ] } }

CLI AI Proxy

Local 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.

What This Installs

This skill installs the cli-ai-proxy package from the public npm registry. Specifically:

  • Source: public npm registry package cli-ai-proxy (no GitHub clone, no local build step)
  • Postinstall scripts: none — the package's package.json declares no preinstall/postinstall hooks
  • Runtime dependencies: one — yaml (config parsing)
  • Filesystem writes: only under the global npm prefix (for the binary) and, when the proxy runs, under its working directory for config.yaml, .proxy.pid, and proxy.log
  • Config mutations: only if you explicitly run configure-provider.sh / cli-ai-proxy configure-openclaw, which edits ~/.openclaw/openclaw.json and writes a .bak backup next to it first
  • Network at runtime: localhost HTTP server only; outbound calls are performed by the user's installed gemini / claude CLIs, not by the proxy itself

When to Use

✅ 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)

Quick Reference

ActionCommand
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

Proxy Lifecycle

Starting

{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)

Checking Status

{baseDir}/scripts/status.sh

Shows: running/stopped, PID, health endpoint data, available CLI providers, concurrency stats.

Stopping

{baseDir}/scripts/stop.sh

Gracefully shuts down the proxy: stops accepting connections, kills active CLI subprocesses, cleans up.

Available Models

Model IDProviderBackend Model
geminiGemini CLICLI default (auto-upgrades)
claudeClaude CodeCLI default (auto-upgrades)
claude-sonnetClaude Codesonnet
claude-opusClaude Codeopus

When OpenClaw is configured, use as cli-ai-proxy/gemini, cli-ai-proxy/claude, etc.

OpenClaw Integration

To configure OpenClaw to route through the proxy:

{baseDir}/scripts/configure-provider.sh

This automatically:

  1. Adds cli-ai-proxy as a provider in ~/.openclaw/openclaw.json
  2. Registers all proxy models in the agent defaults
  3. Creates a backup of the original config

After configuring, set the default model in openclaw.json:

{ "agents": { "defaults": { "model": { "primary": "cli-ai-proxy/gemini" } } } }

API Endpoints

The proxy exposes:

  • POST /v1/chat/completions — Chat completions (streaming + non-streaming)
  • GET /v1/models — List available models
  • GET /health — Health check with provider status and concurrency info

Default base URL: http://127.0.0.1:9090/v1

For full API details see references/api.md.

Image Support

The proxy supports images in messages. When a request contains image_url content parts:

  1. Images are saved to temporary files
  2. The prompt instructs the CLI to read the image via its built-in file tools
  3. Temp files are automatically cleaned up after each request

Supports both base64 data URLs and remote image URLs.

Configuration

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 specified

For full configuration options see references/configuration.md.

Troubleshooting

Proxy won't start

  1. Check if port 9090 is already in use: lsof -i :9090
  2. Verify Node.js is available: node --version
  3. Check logs: read the proxy.log file in the installation directory

CLI not available

  1. Verify CLI is installed and in PATH: which gemini or which claude
  2. Check CLI auth: gemini --version or claude --version
  3. The proxy health endpoint shows which CLIs are available

429 Too Many Requests

The concurrency limit has been reached. Either:

  • Wait for current requests to complete
  • Increase concurrency.max in config.yaml

Timeout errors (504)

The CLI process took too long. Either:

  • Increase timeout in config.yaml
  • Check if the CLI is hanging (auth issues, network)

For more troubleshooting see references/troubleshooting.md.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

71.52%
按下载量换算855

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills