CPA-Helper  by walkingddd

Local multi-user management panel for CLIProxyAPI

Created 1 month ago
279 stars

Top 93.1% on SourcePulse

GitHubView on GitHub
Project Summary

CPA-Helper is a self-hosted, multi-user management panel for CLIProxyAPI (CPA) users. It addresses the need for centralized control over API keys, usage statistics, request tracing, and cost management, benefiting individuals, small teams, or internal networks sharing CPA services by providing isolated user accounts and transparent resource monitoring.

How It Works

Built with Go, SQLite, and Vue 3/Vite, CPA-Helper functions as a management interface, not a request proxy. It interacts with CPA's management APIs for usage tracking, API key management, and credential inspection. The system enables user-level isolation for API keys and usage data, allowing individual users to manage their keys and view statistics, while administrators gain global oversight and control.

Quick Start & Requirements

  • Prerequisites: Go 1.25+, Node.js 20+, npm, and an accessible CLIProxyAPI/CPA service (default http://127.0.0.1:8317).
  • Installation:
    • Docker Compose (Recommended): docker compose pull && docker compose up -d. Access via http://127.0.0.1:18317.
    • Source: Clone the repository, then run backend (go run ./cmd/cpa-helper) and frontend (npm run dev) separately.
  • Initial Setup: The first access guides the creation of an administrator account.

Highlighted Details

  • Usage & Cost Tracking: Detailed statistics (requests, tokens, latency, cost) per user and globally, with trend charts.
  • Request Tracing: Admins filter all requests; users see their own details.
  • User & Key Management: Admins manage user accounts; users manage their own API keys.
  • Balance & Auto-Pause: Optional monthly/unlimited USD balance limits; API keys auto-pause when balance depletes.
  • Model Price Management: Maintain USD prices per million tokens or per call, syncing with CPA's available models.
  • Codex Auth File Inspection: Automated credential health checks with configurable scheduling and thresholds.
  • Modern UI: Vue 3, Naive UI, ECharts for an interactive dashboard with theme support.

Maintenance & Community

Contributions via Issues and Pull Requests are welcomed. The project draws inspiration and support from the Linux.do community.

Licensing & Compatibility

Licensed under the permissive MIT License, allowing for broad compatibility with commercial and closed-source applications.

Limitations & Caveats

CPA-Helper does not proxy agent requests; it only interfaces with CPA's management APIs. Balance deductions are not retroactive, and usage without defined prices is flagged but not deducted. API keys are paused upon balance depletion, but user login remains active.

Health Check
Last Commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
8
Issues (30d)
11
Star History
281 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.