{"repo":"leeguooooo/agent-cli-to-api","free":true,"listed":false,"github":"https://github.com/leeguooooo/agent-cli-to-api","clone":"git clone https://github.com/leeguooooo/agent-cli-to-api.git","description":"Expose agent CLIs (Codex, Cursor Agent, Claude Code, Gemini) as an OpenAI-compatible /v1 API gateway.","language":"Python","stars":72,"topics":["agent","chat-completions","claude-code","cli","codex","cursor-agent","fastapi","gateway","gemini","openai-api"],"license":null,"category":"cli-tools","readme_excerpt":"agent-cli-to-api Expose popular agent CLIs as a small OpenAI-compatible HTTP API ( /v1/ ). Works great as a local gateway (localhost) or behind a reverse proxy. Think of it as LiteLLM for agent CLIs : you point existing OpenAI SDKs/tools at base url , and choose a backend by model . Supported backends: - OpenAI Codex - defaults to backend /responses for vision and image generation (DALL-E / gpt-image -class output); falls back to codex exec - Cursor Agent - via cursor-agent CLI - Claude Code - via CLI or direct API (auto-detects /.claude/settings.json config) - Gemini - via CLI or CloudCode direct (set GEMINI USE CLOUDCODE API=1 ) Why this exists: - Many tools/SDKs only speak the OpenAI API ( /v1/chat/completions ) - this lets you plug agent CLIs into that ecosystem. - One gateway, multiple CLIs: pick a backend by model (with optional prefixes like cursor: / claude: / gemini: ). - Expose your ChatGPT Plus / Pro subscription's image generation as an HTTP API. No OPENAI API KEY required — the gateway reuses the OAuth token from codex login , lets you call image generation via plain chat completions, and returns the PNG inline (data URI). See Image generation (ChatGPT subscription). Table of Contents - Requirements - Install - Run (No .env Needed) - Core Configuration - API - Image generation (ChatGPT subscription) - OpenAI SDK examples - Security notes - Logging & Performance Diagnosis - Performance notes (important) - Advanced setup (optional) - Keywords (SEO) Requirements - P","default_branch":null,"files":null,"tree":[],"storefront":"/r/leeguooooo","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/leeguooooo/agent-cli-to-api/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}