CLI AI Proxy for Openclaw

A local OpenAI-compatible gateway that bridges Gemini CLI and Claude Code into a unified REST API without requiring direct API keys.

ilzc
v0.1.3
Apr 22, 2026
0
798
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install cli-ai-proxy

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install cli-ai-proxy using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is CLI AI Proxy?

CLI AI Proxy is a specialized utility designed to act as a local intermediary between your development environment and powerful command-line AI tools. By leveraging Openclaw Skills, this proxy transforms the standard outputs of Gemini CLI and Claude Code into a standard OpenAI-compatible REST API. This allows developers to use familiar integration patterns while benefiting from the authentication and session management already handled by their local CLI installations.

The beauty of this tool lies in its security and simplicity. It makes no direct outbound network calls to AI vendors and stores no sensitive credentials. Instead, it creates a localhost bridge that routes requests through your existing, authenticated CLI tools, providing a seamless way to unify different AI providers under a single local endpoint.

CLI AI Proxy Use Cases

  • Starting, stopping, or monitoring a local AI gateway for development.
  • Routing standard OpenAI-compatible requests through Gemini CLI or Claude Code.
  • Configuring OpenClaw environments to use local CLI-based models for enhanced privacy or session persistence.
  • Troubleshooting connectivity between AI agents and local command-line interfaces.
  • Testing multi-model workflows using a single base URL: http://127.0.0.1:9090/v1.

How CLI AI Proxy Works

  1. The proxy initializes a local HTTP server on port 9090.
  2. It scans the system for available CLI providers like gemini or claude.
  3. Upon receiving an OpenAI-formatted POST request, the proxy parses the parameters and maps them to the corresponding CLI command.
  4. It manages a pool of subprocesses to execute the AI queries, handling concurrency and timeouts.
  5. The CLI's output is streamed back to the requester in a standard API format, while temporary files (like images) are automatically cleaned up.

CLI AI Proxy Setup

To install and initialize the proxy using the standard Openclaw Skills workflow, follow these steps:

# Install the package via npm
npm install -g cli-ai-proxy

# Navigate to the skill directory and start the proxy
./scripts/start.sh

# Configure OpenClaw to recognize the new provider
./scripts/configure-provider.sh

CLI AI Proxy Data Schema & Taxonomy

The skill manages its operational state and configuration through specific local files:

File Purpose
config.yaml Primary settings including port, timeout, and concurrency limits.
.proxy.pid Stores the Process ID of the running proxy for lifecycle management.
proxy.log Real-time logs for debugging and health monitoring.
openclaw.json Updated during configuration to register cli-ai-proxy as a provider.

CLI AI Proxy Advanced Features

  • Subprocess Concurrency Control: Limit the number of simultaneous CLI instances to prevent system resource exhaustion.
  • Multi-Modal Support: Full support for image inputs via base64 or remote URLs, automatically mapped to CLI file tools.
  • Automated OpenClaw Integration: Scripts included to backup and update your global OpenClaw configuration automatically.
  • Health Monitoring: Dedicated /health endpoint providing real-time stats on provider availability and active process counts.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Requires
Bins nodenpm
Github Stars: 0
forks: 0

Featured*