CLI Agent OpenAI Adapter — AI skill for Claude Code
Convert CLI-based AI agents (Claude Code, etc.) to OpenAI ChatAPI endpoints.
How to install CLI Agent OpenAI Adapter
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open pppp606/cli-agent-openai-adapter and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What CLI Agent OpenAI Adapter does
Convert CLI-based AI agents (Claude Code, etc.) to OpenAI ChatAPI endpoints.
Alternatives in AI
- CLI 代理 API — English 中文 一个为 CLI 提供 OpenAI/Gemini/Claude/Codex 兼容 API 接口的代理服务器 19k ★
- Opencodex — Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama… 12.3k ★
- Codex — openai-codex Adversarial code review, Codex CLI integration, cross-model analysis 9.6k ★
README
cli-agent-openai-adapter
Convert CLI-based AI agents (Claude Code, etc.) to OpenAI ChatAPI endpoints.
Overview
This adapter allows you to use local CLI tools like Claude Code as drop-in replacements for OpenAI's API in your development environment, while keeping the same code structure for production.
**Use Cases:**
- Production: Use OpenAI API (pay per token)
- Development: Use local Claude Code with Haiku model (reduce costs)
- Same Code: Switch between environments using the same API interface (e.g., LangChain's
ChatOpenAI)
**Default Model:** This adapter uses Claude Haiku by default for cost efficiency during development. You can configure a different model (e.g., Sonnet, Opus) via the `MODEL` environment variable.
Features
- ✅ OpenAI-compatible API endpoints (
/v1/chat/completions) - ✅ Support for conversation history
- ✅ Stateless execution (like OpenAI API)
- ✅ Chat-only mode (tools disabled for safety)
- ✅ TypeScript with full type definitions
- 🚧 Claude Code adapter (initial implementation)
- 🔜 Codex adapter (future)
- 🔜 Gemini CLI adapter (future)
Demo
Try the adapter with the minimal, dependency-free web client:
# Start the adapter (project root)
npm ci
npm run build && npm start
# Open the client in your browser
# File path: examples/minimal-web-client/index.html
[→ Minimal Web Client README](examples/minimal-web-client/README.md)
Installation
npm install -g cli-agent-openai-adapter
Or use directly with npx:
npx cli-agent-openai-adapter
Prerequisites
- Node.js >= 20.0.0
- Claude Code CLI installed and accessible in PATH
To verify Claude Code is installed:
claude --version
Usage
Start the Server
cli-agent-openai-adapter
By default, the server starts at `http://localhost:8000`.
Configuration
Configure using environment variables:
export ADAPTER_TYPE=claude-code # Adapter to use
export MODEL=haiku # Cla
Related Skills
Amux
Bidirectional LLM API adapter with IR pattern. Seamlessly convert between OpenAI, Anthropic, DeepSeek, and mor
Byokey
Turn AI subscriptions into standard API endpoints. OpenAI & Anthropic compatible gateway — for Amp Code, Curso
Claudegate
ClaudeGate - A CLI wrapper that lets you switch between Anthropic, OpenRouter, Z.AI, Kimi K2, Novita AI, and c
AI Shadow Vault
AI Shadow Vault is a shell-first CLI that keeps AI adapter files out of Git. Use CLAUDE.md, AGENTS.md, and GEM
Expert Dispatch
new Specialist Dispatch Pattern -- let cheap AI assistants delegate complex tasks to Claude Code CLI. Bash ada
Rulesync
by dyoshikawa - A Node.js CLI tool that automatically generates configs (rules, ignore files, MCP servers, com
Related Agents
Provider Debugger
Diagnose live-provider compatibility failures for Kimi, GLM, and other OpenAI-compatible endpoints
AI Recon
Delegates to this agent when the user wants to map the AI attack surface of an authorized web application befo
Better Auth Specialist
The auth layer via Better Auth — server auth instance + config, database adapter and CLI-generated schema, plu