selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

GitHub
CLIProxyAPI logo

Self-host CLIProxyAPI

v8.0.61

OpenAI/Gemini/Claude-compatible API proxy for CLI models

BetaOpen SourceMIT
docker run --rm -p 8317:8317 -v /path/to/your/config.yaml:/CLIProxyAPI/config.yaml -v /path/to/your/auth-dir:/root/.cli-proxy-api -v /path/to/your/plugins-dir:/CLIProxyAPI/plugins eceasy/cli-proxy-api:latest
Updated52 minutes ago
LanguageGo
Setup difficultyEasy
Stars
57 953
Port
8317 (main server endpoint)
Docker
eceasy/cli-proxy-api

What is CLIProxyAPI?

CLIProxyAPI is a proxy server that wraps Kimi Code, OpenAI Codex, Claude Code, Grok Build, Anthropic Claude, Google Gemini/Antigravity, Meta Muse, and Devin behind OpenAI/Gemini/Claude-compatible API interfaces. Users can connect local coding agents through any of these SDKs while accessing their own multi-account pools via OAuth flows built into the proxy. The software handles token management, quota tracking, round-robin load balancing across accounts, session affinity, and model routing. It runs as a lightweight binary or in a Docker container, requires only a YAML configuration file, and optionally persists request history to SQLite. The project uses an MIT license and ships with Go SDK documentation for embedding the proxy in custom applications.

CLIProxyAPI alternatives

Should you self-host CLIProxyAPI?

CLIProxyAPI scores 50/100 on selfhost.directory (how scoring works) and ranks #81 of 167 in Developer Tools. It has 57 953 GitHub stars, +2 129 in the last 30 days.

It shipped 35 stable releases in the past year. The latest, v8.0.61, came out on 8 November 2026. New versions land roughly every 1 days.

An official Docker image is available. It is MIT-licensed and written mostly in Go.

Its closest alternative on selfhost.directory is openhands (87/100, 92 941 stars). It scores higher overall, so compare the two before you pick. See CLIProxyAPI vs openhands side by side.

Features

  • Claude-compatible API
  • Function Calling
  • Gemini-compatible API
  • Multi-account load balancing
  • Multimodal input
  • OAuth LoginCodex, Claude Code, Grok Build, Kimi, Antigravity, Meta Muse
  • OpenAI Compatible API
  • Session affinity
  • Streaming Responses

CLIProxyAPI README

CLI Proxy API

English | 中文 | 日本語

If you want to use CLIProxyAPI on your desktop, we recommend our EasyCLIProxyAPI desktop client. It provides a graphical configuration UI, automatic updates, system tray integration, and one-click start/stop for the CLIProxyAPI service.

CLIProxyAPI is a proxy server that provides OpenAI/Gemini/Claude/Codex/Grok compatible API interfaces for CLI.

You can access the following providers locally and with multiple CLI accounts through any OpenAI (including Responses), Gemini (including Interactions), or Claude-compatible client or SDK.

How to install CLIProxyAPI

Install CLIProxyAPI with Docker

docker run --rm -p 8317:8317 -v /path/to/your/config.yaml:/CLIProxyAPI/config.yaml -v /path/to/your/auth-dir:/root/.cli-proxy-api -v /path/to/your/plugins-dir:/CLIProxyAPI/plugins eceasy/cli-proxy-api:latest

How to configure CLIProxyAPI

  • server.hostBind address. Empty listens on all IPv4 and IPv6 interfaces.
  • server.port8317Server port.
  • routing.strategyround-robinCredential selection strategy (round-robin, weighted-round-robin, fill-first).

    values: round-robin, weighted-round-robin, fill-first

  • management.secret-keyManagement key. Plaintext is hashed on startup.
  • access.api-keysClient keys accepted by this proxy.

CLIProxyAPI releases & version history

@ Every self-hosted release, weekly

One Monday email with the week's stable releases across the directory.

More in Developer Tools

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…