A modern React-based WebUI for managing the CLI Proxy API, completely refactored with a modern tech stack for enhanced maintainability, type safety, and user experience.
Main Project: https://github.com/router-for-me/CLIProxyAPI Example URL: https://remote.router-for.me/ Minimum Required Version: ≥ 6.3.0 (recommended ≥ 6.5.0)
Since version 6.0.19, the WebUI ships with the main program; access it via /management.html on the API port once the service is running.
- Login & Authentication: Auto-detects current address (manual override supported), encrypted auto-login with secure localStorage, session persistence
- Basic Settings: Debug mode, proxy URL, request retries with custom config, quota fallback (auto-switch project/preview models), usage statistics toggle, request logging & file logging, WebSocket
/ws/*authentication - API Keys Management: Manage proxy auth keys with add/edit/delete operations
- AI Providers: Configure Gemini/Codex/Claude settings, OpenAI-compatible providers with custom base URLs/headers/proxy/model aliases, Vertex AI credential import from service-account JSON
- Auth Files & OAuth: Upload/download/search/paginate JSON credentials; type filters (Qwen/Gemini/GeminiCLI/AIStudio/Claude/Codex/Antigravity/iFlow/Vertex/Empty); bulk delete; OAuth/Device flows for multiple providers
- Logs Viewer: Real-time log viewer with auto-refresh, download and clear capabilities (appears when logging-to-file is enabled)
- Usage Analytics: Overview cards, hourly/daily toggles, interactive charts with multiple model lines, per-API statistics table
- Config Management: In-browser YAML editor for
/config.yamlwith syntax highlighting, reload/save functionality - System Information: Connection status, config cache, server version/build date, UI version in footer
- Responsive Design: Full mobile support with collapsible sidebar
- Theme System: Light/dark mode with persistent preference
- Internationalization: English and Simplified Chinese (zh-CN) with seamless switching
- Real-time Feedback: Toast notifications for all operations
- Security: Masked secrets, encrypted local storage
- Frontend Framework: React 19 with TypeScript
- Build Tool: Vite 7 with single-file output (vite-plugin-singlefile)
- State Management: Zustand for global stores
- Routing: React Router 7 with HashRouter
- HTTP Client: Axios with interceptors for auth & error handling
- Internationalization: i18next + react-i18next
- Styling: SCSS with CSS Modules, CSS Variables for theming
- Charts: Chart.js + react-chartjs-2
- Code Editor: @uiw/react-codemirror with YAML support
- Node.js 18+ (LTS recommended)
- npm 9+
# Clone the repository
git clone https://github.com/router-for-me/Cli-Proxy-API-Management-Center.git
cd Cli-Proxy-API-Management-Center
# Install dependencies
npm installnpm run dev # Start Vite dev server (default: http://localhost:5173)npm run build # TypeScript check + Vite production buildThe build outputs a single dist/index.html file with all assets inlined.
npm run preview # Preview production build locally
npm run lint # ESLint with strict mode (--max-warnings 0)
npm run format # Prettier formatting for src/**/*.{ts,tsx,css,scss}
npm run type-check # TypeScript type checking only (tsc --noEmit)-
Integrated with CLI Proxy API (Recommended) After starting the CLI Proxy API service, visit
http://your-server:8317/management.html -
Standalone (Built file) Open the built
dist/index.htmldirectly in a browser, or host it on any static file server -
Development Server Run
npm run devand openhttp://localhost:5173
- The login page auto-detects the current address; you can modify it if needed
- Enter your management key
- Click Connect to authenticate
- Credentials are encrypted and saved locally for auto-login
Tip: The Logs navigation item appears only after enabling "Logging to file" in Basic Settings.
├── src/
│ ├── components/
│ │ ├── common/ # Shared components (NotificationContainer)
│ │ ├── layout/ # App shell (MainLayout with sidebar)
│ │ └── ui/ # Reusable UI primitives (Button, Input, Modal, etc.)
│ ├── hooks/ # Custom hooks (useApi, useDebounce, usePagination, etc.)
│ ├── i18n/
│ │ ├── locales/ # Translation files (zh-CN.json, en.json)
│ │ └── index.ts # i18next configuration
│ ├── pages/ # Route page components with co-located .module.scss
│ ├── router/ # ProtectedRoute wrapper
│ ├── services/
│ │ ├── api/ # API layer (client.ts singleton, feature modules)
│ │ └── storage/ # Secure storage utilities
│ ├── stores/ # Zustand stores (auth, config, theme, language, notification)
│ ├── styles/ # Global SCSS (variables, mixins, themes, components)
│ ├── types/ # TypeScript type definitions
│ ├── utils/ # Utility functions (constants, format, validation, etc.)
│ ├── App.tsx # Root component with routing
│ └── main.tsx # Entry point
├── dist/ # Build output (single-file bundle)
├── vite.config.ts # Vite configuration
├── tsconfig.json # TypeScript configuration
└── package.json
- Path Alias: Use
@/to import fromsrc/(configured in vite.config.ts and tsconfig.json) - API Client: Singleton
apiClientinsrc/services/api/client.tswith auth interceptors - State Management: Zustand stores with localStorage persistence for auth/theme/language
- Styling: SCSS variables auto-injected; CSS Modules for component-scoped styles
- Build Output: Single-file bundle for easy distribution (all assets inlined)
- Confirm the CLI Proxy API service is running
- Check if the API address is correct
- Verify that the management key is valid
- Ensure your firewall allows the connection
- Click the "Refresh All" button in the header
- Check your network connection
- Open browser DevTools console for error details
- Logs: Requires server-side logging-to-file enabled; 404 indicates old server version or logging disabled
- Config Editor: Requires
/config.yamlendpoint; ensure valid YAML syntax before saving
- If charts are empty, enable "Usage statistics" in settings; data resets on server restart
We welcome Issues and Pull Requests! Please follow these guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes with clear messages
- Push to your branch
- Open a Pull Request
- Run
npm run lintandnpm run type-checkbefore committing - Follow existing code patterns and naming conventions
- Use TypeScript strict mode
- Write meaningful commit messages
This project is licensed under the MIT License.