Skip to content

daishuge/playful-proxy-api-panel

Repository files navigation

Playful Proxy API Panel (PPAP)

Note

This is a community fork of router-for-me/CLIProxyAPI, maintained as Playful Proxy API Panel (PPAP). It keeps the upstream-compatible behavior and README structure, while restoring built-in usage statistics and adding cache hit rate, first-byte latency, TPS, and related aggregate metrics to the existing management API and TUI surfaces.

Install this fork manually from this repository's Releases. Do not use the upstream package channel when you want these fork-specific statistics.

The management panel frontend source is open in this repository under web/management-panel.

English | 中文 | 日本語

A proxy server that provides OpenAI/Gemini/Claude/Codex compatible API interfaces for CLI.

It now also supports OpenAI Codex (GPT models) and Claude Code via OAuth.

So you can use local or multi-account CLI access with OpenAI(include Responses)/Gemini/Claude-compatible clients and SDKs.

Overview

  • OpenAI/Gemini/Claude compatible API endpoints for CLI models
  • OpenAI Codex support (GPT models) via OAuth login
  • Claude Code support via OAuth login
  • Amp CLI and IDE extensions support with provider routing
  • Streaming and non-streaming responses
  • Function calling/tools support
  • Multimodal input support (text and images)
  • Multiple accounts with round-robin load balancing (Gemini, OpenAI, Claude)
  • Simple CLI authentication flows (Gemini, OpenAI, Claude)
  • Generative Language API Key support
  • AI Studio Build multi-account load balancing
  • Gemini CLI multi-account load balancing
  • Claude Code multi-account load balancing
  • OpenAI Codex multi-account load balancing
  • OpenAI-compatible upstream providers via config (e.g., OpenRouter)
  • Open management panel frontend source maintained in this repository: web/management-panel
  • Reusable Go SDK for embedding the proxy (see docs/sdk-usage.md)

Getting Started

CLIProxyAPI Guides: https://help.router-for.me/

Manual Installation

This fork is distributed as release binaries from this repository. Download the asset that matches your platform from the latest Release, then run it directly.

Linux example:

chmod +x ./cli-proxy-api-linux-amd64
./cli-proxy-api-linux-amd64 --config ./config.yaml

Windows example:

.\cli-proxy-api-windows-amd64.exe --config .\config.yaml

Start from config.example.yaml, copy it to config.yaml, and fill in your own OAuth files, upstream API keys, proxy settings, and management password locally. Do not commit config.yaml, .env, auths/, logs, or generated stores; they are intentionally ignored by this repository.

Docker Installation

This fork does not publish a separate public Docker image by default. Build the image locally from this repository so the container contains the fork-specific usage statistics changes.

git clone https://github.com/daishuge/playful-proxy-api-panel.git
cd playful-proxy-api-panel
cp config.example.yaml config.yaml
mkdir -p auths logs
docker compose up -d --build

The default compose file builds cliproxyapi-fork:local from the local Dockerfile, maps port 8317, and mounts:

  • ./config.yaml to /CLIProxyAPI/config.yaml
  • ./auths to /root/.cli-proxy-api
  • ./logs to /CLIProxyAPI/logs

Put your own keys, OAuth files, proxy settings, and management password in those local files/directories. Do not commit them.

Management API

see MANAGEMENT_API.md

Usage Statistics

This fork restores the built-in /v0/management/usage, /v0/management/usage/export, and /v0/management/usage/import endpoints. The usage snapshot also records cache hit rate, first-byte latency, average latency, TPS, token breakdowns, and per-API/per-model details where the upstream provider returns enough usage data.

The existing TUI usage tab displays these metrics in the same card and table style as the original interface. External tools such as CPA Usage Keeper can still be used when you need separate persistence or a dedicated dashboard.

Management Panel Source

The management panel frontend is maintained in this same repository under web/management-panel. Releases publish the backend binaries and the single-file management.html from the same tag, so the backend auto-update setting can point at this repository directly.

The previous daishuge/CLIProxyAPI repository name is kept as a GitHub redirect after the rename. The older standalone panel repository remains available during the transition, but new work lands here.

Amp CLI Support

CLIProxyAPI includes integrated support for Amp CLI and Amp IDE extensions, enabling you to use your Google/ChatGPT/Claude OAuth subscriptions with Amp's coding tools:

  • Provider route aliases for Amp's API patterns (/api/provider/{provider}/v1...)
  • Management proxy for OAuth authentication and account features
  • Smart model fallback with automatic routing
  • Model mapping to route unavailable models to alternatives (e.g., claude-opus-4.5claude-sonnet-4)
  • Security-first design with localhost-only management endpoints

When you need the request/response shape of a specific backend family, use the provider-specific paths instead of the merged /v1/... endpoints:

  • Use /api/provider/{provider}/v1/messages for messages-style backends.
  • Use /api/provider/{provider}/v1beta/models/... for model-scoped generate endpoints.
  • Use /api/provider/{provider}/v1/chat/completions for chat-completions backends.

These routes help you select the protocol surface, but they do not by themselves guarantee a unique inference executor when the same client-visible model name is reused across multiple backends. Inference routing is still resolved from the request model/alias. For strict backend pinning, use unique aliases, prefixes, or otherwise avoid overlapping client-visible model names.

Complete Amp CLI Integration Guide

SDK Docs

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Who is with us?

Those projects are based on CLIProxyAPI:

Native macOS menu bar app to use your Claude Code & ChatGPT subscriptions with AI coding tools - no API keys needed

Browser-based tool to translate SRT subtitles using your Gemini subscription via CLIProxyAPI with automatic validation/error correction - no API keys needed

CLI wrapper for instant switching between multiple Claude accounts and alternative models (Gemini, Codex, Antigravity) via CLIProxyAPI OAuth - no API keys needed

Native macOS menu bar app that unifies Claude, Gemini, OpenAI, and Antigravity subscriptions with real-time quota tracking and smart auto-failover for AI coding tools like Claude Code, OpenCode, and Droid - no API keys needed.

Native macOS SwiftUI app for managing CLI AI sessions (Codex, Claude Code, Gemini CLI) with unified provider management, Git review, project organization, global search, and terminal integration. Integrates CLIProxyAPI to provide OAuth authentication for Codex, Claude, Gemini, and Antigravity, with built-in and third-party provider rerouting through a single proxy endpoint - no API keys needed for OAuth providers.

Windows-native CLIProxyAPI fork with TUI, system tray, and multi-provider OAuth for AI coding tools - no API keys needed.

VSCode extension for quick switching between Claude Code models, featuring integrated CLIProxyAPI as its backend with automatic background lifecycle management.

Windows desktop app built with Tauri + React for monitoring AI coding assistant quotas via CLIProxyAPI. Track usage across Gemini, Claude, OpenAI Codex, and Antigravity accounts with real-time dashboard, system tray integration, and one-click proxy control - no API keys needed.

A lightweight web admin panel for CLIProxyAPI with health checks, resource monitoring, real-time logs, auto-update, request statistics and pricing display. Supports one-click installation and systemd service.

A Windows tray application implemented using PowerShell scripts, without relying on any third-party libraries. The main features include: automatic creation of shortcuts, silent running, password management, channel switching (Main / Plus), and automatic downloading and updating.

霖君 is a cross-platform desktop application for managing AI programming assistants, supporting macOS, Windows, and Linux systems. Unified management of Claude Code, Gemini CLI, OpenAI Codex, and other AI coding tools, with local proxy for multi-account quota tracking and one-click configuration.

A modern web-based management dashboard for CLIProxyAPI built with Next.js, React, and PostgreSQL. Features real-time log streaming, structured configuration editing, API key management, OAuth provider integration for Claude/Gemini/Codex, usage analytics, container management, and config sync with OpenCode via companion plugin - no manual YAML editing needed.

Browser extension for one-stop management of New API-compatible relay site accounts, featuring balance and usage dashboards, auto check-in, one-click key export to common apps, in-page API availability testing, and channel/model sync and redirection. It integrates with CLIProxyAPI through the Management API for one-click provider import and config sync.

Shadow AI is an AI assistant tool designed specifically for restricted environments. It provides a stealthy operation mode without windows or traces, and enables cross-device AI Q&A interaction and control via the local area network ( LAN). Essentially, it is an automated collaboration layer of "screen/audio capture + AI inference + low-friction delivery", helping users to immersively use AI assistants across applications on controlled devices or in restricted environments.

Cross-platform desktop app (macOS, Windows, Linux) wrapping CLIProxyAPI with a native GUI. Connects Claude, ChatGPT, Gemini, GitHub Copilot, and custom OpenAI-compatible endpoints with usage analytics, request monitoring, and auto-configuration for popular coding tools - no API keys needed.

Ready-to-use cross-platform quota inspector for CLIProxyAPI, supporting per-account codex 5h/7d quota windows, plan-based sorting, status coloring, and multi-account summary analytics.

Windows-focused, local-first desktop management platform for Codex CLI built on CLIProxyAPI, focused on simplifying local setup, account and runtime management, and providing a more complete Codex CLI experience for local users.

Note

If you developed a project based on CLIProxyAPI, please open a PR to add it to this list.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Friendly Links

About

CLIProxyAPI-compatible fork with restored usage statistics and open-source bundled management panel frontend.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors