Skip to content

wangdabaoqq/LinJun

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

霖君

LinJun Banner

Platform macOS Platform Windows Platform Linux Language TypeScript License MIT

中文文档

Cross-platform AI proxy management for Claude, Gemini, OpenAI, Qwen, and more.

LinJun is a native desktop application for managing CLIProxyAPIPlus - a local proxy server that powers your AI coding agents. It helps you manage multiple AI accounts, track quotas, and configure CLI tools in one place across macOS, Windows, and Linux.

✨ Features

  • 🔌 Multi-Provider Support: Connect accounts from Claude, Gemini, OpenAI Codex, Qwen, Antigravity, iFlow, Kiro, GitHub Copilot via OAuth or API keys
  • 📊 Real-time Quota Tracking: Monitor usage per account with automatic refresh
  • 🚀 One-Click Agent Configuration: Auto-detect and configure Claude Code, OpenCode, Gemini CLI, and more
  • 📈 Live Dashboard: Monitor request traffic, token usage, and success rates
  • 🔀 Smart Routing: Round Robin and Fill First failover strategies
  • 🔑 API Key Management: Generate and manage keys for your local proxy
  • 🖥️ System Tray Integration: Quick access to status from menu bar
  • 🌐 Multilingual: English and Simplified Chinese support

🤖 Supported Ecosystem

AI Providers

Provider Auth Method
Claude Code OAuth
Gemini CLI OAuth
OpenAI Codex OAuth
Qwen Code OAuth
Antigravity OAuth (Google)
iFlow OAuth
GitHub Copilot OAuth
Kiro OAuth
Custom Provider API Key

Compatible CLI Agents

LinJun can automatically configure these tools to use your centralized proxy:

  • Claude Code
  • Codex CLI
  • Gemini CLI
  • OpenCode

📥 Installation

Download

Download the latest release from GitHub Releases:

Platform Download
macOS (Apple Silicon) LinJun-x.x.x-arm64.dmg
macOS (Intel) LinJun-x.x.x-x64.dmg
Windows LinJun-x.x.x-x64.exe
Linux LinJun-x.x.x-x64.AppImage or .deb

Build from Source

Requirements:

  • Node.js 18+
  • Bun (recommended) or npm
  • Git
# Clone the repository
git clone https://github.com/wangdabaoqq/LinJun.git
cd L-jun

# Install dependencies
bun install

# Download CLIProxyAPIPlus binary
bun run download:binary

# Start development server
bun dev

Build for Production

bun run build:mac      # macOS (dmg, zip)
bun run build:win      # Windows (nsis, portable)
bun run build:linux    # Linux (AppImage, deb)
bun run build:all      # All platforms

📖 Usage

1. Start the Server

Launch LinJun and click Start to initialize the local proxy server.

2. Connect Accounts

Go to Providers tab → Select a provider → Authenticate via OAuth or enter API key.

3. Configure Agents

Go to Agents tab → Select detected agent → Configure to use local proxy.

4. Monitor Usage

  • Dashboard: Overall health and traffic
  • Quota: Per-account usage breakdown
  • Logs: Raw request logs for debugging

📸 Screenshots

Dashboard Providers
Dashboard Providers
Quota Monitoring Settings
Quota Settings
Agents API Key
Agents API Key
Guide Logs
Guide Logs

⚙️ Settings

  • Port: Change the proxy listening port (default: 8310)
  • Routing Strategy: Round Robin or Fill First
  • Auto-start: Launch proxy automatically on app startup
  • Notifications: Toggle alerts for quota warnings

🏗️ Architecture

LinJun/
├── src/
│   ├── main/                    # Electron main process
│   │   ├── index.ts            # App entry point
│   │   ├── tray.ts             # System tray integration
│   │   ├── proxy/              # CLIProxyAPIPlus management
│   │   │   ├── manager.ts      # Process lifecycle
│   │   │   └── api.ts          # Management API client
│   │   ├── ipc/                # IPC handlers
│   │   ├── quota/              # Provider quota services
│   │   ├── logging/            # Request logging
│   │   └── utils/              # CLI detection, storage
│   ├── preload/                # Context bridge
│   └── renderer/               # React frontend
│       ├── components/         # UI components
│       ├── stores/             # Zustand state
│       └── hooks/              # Custom hooks
├── resources/                  # Static assets
└── scripts/                    # Build scripts

🔧 Tech Stack

Component Technology
Framework Electron 33+
Frontend React 18 + TypeScript
Styling Tailwind CSS
State Zustand
Build Vite + electron-vite
Packaging electron-builder

📁 Token Storage

Authentication tokens are stored in ~/.cli-proxy-api/ directory as JSON files:

  • codex-{email}-Plus.json
  • antigravity-{email}.json
  • kiro-google-{id}.json
  • etc.

❓ FAQ

macOS: "App is damaged and can't be opened"

Due to macOS security mechanisms, apps downloaded outside the App Store may trigger this warning. Run the following command to fix it:

sudo xattr -rd com.apple.quarantine "/Applications/霖君.app"

🤝 Contributing

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

📄 License

MIT License. See LICENSE for details.

🙏 Acknowledgments


Star History Chart

About

基于CLIProxy开发的客户端应用-霖君

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages