{"id":44054252,"url":"https://github.com/skyline69/agcp","last_synced_at":"2026-02-23T00:48:42.766Z","repository":{"id":336985776,"uuid":"1150561012","full_name":"skyline69/agcp","owner":"skyline69","description":"Extremely Lightweight Antigravity-Claude-Proxy","archived":false,"fork":false,"pushed_at":"2026-02-10T01:53:21.000Z","size":1255,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-10T06:55:53.204Z","etag":null,"topics":["anthropic","api","claude","cli","gemini","google-cloud","proxy","rust","terminal-ui"],"latest_commit_sha":null,"homepage":"http://dasguney.com/agcp/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skyline69.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"skyline69","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2026-02-05T12:29:09.000Z","updated_at":"2026-02-10T01:52:33.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/skyline69/agcp","commit_stats":null,"previous_names":["skyline69/agcp"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/skyline69/agcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyline69%2Fagcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyline69%2Fagcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyline69%2Fagcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyline69%2Fagcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skyline69","download_url":"https://codeload.github.com/skyline69/agcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyline69%2Fagcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29326801,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T03:52:29.695Z","status":"ssl_error","status_checked_at":"2026-02-11T03:52:23.094Z","response_time":97,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anthropic","api","claude","cli","gemini","google-cloud","proxy","rust","terminal-ui"],"created_at":"2026-02-08T00:04:12.025Z","updated_at":"2026-02-23T00:48:42.721Z","avatar_url":"https://github.com/skyline69.png","language":"Rust","funding_links":["https://ko-fi.com/skyline69"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"images/logo.svg\" alt=\"AGCP\" width=\"380\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://crates.io/crates/agcp\"\u003e\u003cimg src=\"https://img.shields.io/crates/v/agcp.svg\" alt=\"Crates.io\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.rust-lang.org\"\u003e\u003cimg src=\"https://img.shields.io/badge/rust-1.93+-orange.svg\" alt=\"Rust\"\u003e\u003c/a\u003e\n  \u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-blue.svg\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\u003cb\u003eExtremely Lightweight Antigravity-Claude-Proxy\u003c/b\u003e\u003c/p\u003e\n\nA blazing-fast Rust proxy that translates Anthropic's Claude API to Google's Cloud Code API. Use Claude and Gemini models through a single Anthropic-compatible endpoint.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"images/demo-1.png\" alt=\"AGCP Overview — real-time request monitoring, stats, and logs\" width=\"800\"\u003e\n\u003c/p\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eMore screenshots\u003c/b\u003e\u003c/summary\u003e\n\u003cbr\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"images/demo-2.png\" alt=\"AGCP Quota — per-model usage with donut charts\" width=\"800\"\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"images/demo-3.png\" alt=\"AGCP About page\" width=\"800\"\u003e\n\u003c/p\u003e\n\u003c/details\u003e\n\n## Why AGCP?\n\n- **Lightweight** - Single binary, minimal dependencies, ~3MB compiled\n- **Fast** - Written in Rust with async I/O, handles concurrent requests efficiently\n- **Simple** - Just `agcp login` and you're ready, no config files needed\n- **Powerful** - Multi-account support, response caching, smart load balancing\n\n## Features\n\n- **Anthropic API Compatible** - Works with Claude Code, OpenCode, Cursor, Cline, and other Anthropic API clients\n- **Multiple Models** - Access Claude (Opus, Sonnet) and Gemini (Flash, Pro) through a single endpoint\n- **Multi-Account Support** - Rotate between multiple Google accounts with smart load balancing\n- **Response Caching** - Cache non-streaming responses to reduce quota usage\n- **Native Gemini Routes** - `/v1beta/models`, `:generateContent`, `:streamGenerateContent`, `:countTokens`\n- **OpenAI Media Endpoints** - `/v1/images/generations`, `/v1/images/edits`, `/v1/images/variations`, `/v1/audio/transcriptions`\n- **Warmup Interception** - Detects Claude Code warmup pings on Anthropic endpoints and answers locally (`X-Warmup-Intercepted: true`)\n- **Model Detect API** - `POST /v1/models/detect` returns mapped model and capability hints for CLI/TUI integrations\n- **Startup Warmup + Quota Refresh** - Optional warmup and periodic quota sync for smarter account selection\n- **Interactive TUI** - Beautiful terminal UI for monitoring and configuration\n- **Background Daemon** - Runs quietly in the background\n- **Client Identity Camouflage** - Spoofs the full Electron client fingerprint (User-Agent, `X-Client-Name/Version`, `X-Machine-Id`, `X-VSCode-SessionId`) to match the official Antigravity desktop app\n\n## Quick Start\n\n```bash\n# Install from source\ngit clone https://github.com/skyline69/agcp\ncd agcp\ncargo build --release\n\n# Login with Google OAuth\n./target/release/agcp login\n\n# Start the proxy (runs as background daemon)\n./target/release/agcp\n\n# Configure your AI tool to use http://127.0.0.1:8080\n```\n\n## Installation\n\n### Homebrew (macOS/Linux)\n\n```bash\nbrew tap skyline69/agcp\nbrew install agcp\n```\n\n### APT (Debian/Ubuntu)\n\n```bash\n# Add the GPG key and repository\ncurl -fsSL https://dasguney.com/apt/public.key | sudo gpg --dearmor -o /usr/share/keyrings/agcp.gpg\necho \"deb [signed-by=/usr/share/keyrings/agcp.gpg] https://dasguney.com/apt stable main\" | sudo tee /etc/apt/sources.list.d/agcp.list\n\n# Install\nsudo apt update\nsudo apt install agcp\n```\n\n### DNF (Fedora/RHEL)\n\n```bash\n# Add the repository\nsudo tee /etc/yum.repos.d/agcp.repo \u003c\u003c 'EOF'\n[agcp]\nname=AGCP\nbaseurl=https://dasguney.com/rpm/packages\nenabled=1\ngpgcheck=1\ngpgkey=https://dasguney.com/rpm/public.key\nEOF\n\n# Install\nsudo dnf install agcp\n```\n\n### AUR (Arch Linux)\n\n```bash\n# With an AUR helper (e.g. yay, paru)\nyay -S agcp-bin\n\n# Or manually\ngit clone https://aur.archlinux.org/agcp-bin.git\ncd agcp-bin\nmakepkg -si\n```\n\n### Nix\n\n```bash\n# Run directly\nnix run github:skyline69/agcp\n\n# Or install into profile\nnix profile install github:skyline69/agcp\n```\n\n### From Source\n\n```bash\ngit clone https://github.com/skyline69/agcp\ncd agcp\ncargo build --release\n\n# Optional: Install to PATH\ncp target/release/agcp ~/.local/bin/\n```\n\n### Shell Completions\n\n```bash\n# Bash\neval \"$(agcp completions bash)\"\n\n# Zsh\neval \"$(agcp completions zsh)\"\n\n# Fish\nagcp completions fish \u003e ~/.config/fish/completions/agcp.fish\n```\n\n## Usage\n\n### Commands\n\n| Command | Description |\n|---------|-------------|\n| `agcp` | Start the proxy server (daemon mode) |\n| `agcp login` | Authenticate with Google OAuth |\n| `agcp setup` | Configure AI tools to use AGCP |\n| `agcp tui` | Launch interactive terminal UI |\n| `agcp status` | Check if server is running |\n| `agcp stop` | Stop the background server |\n| `agcp restart` | Restart the background server |\n| `agcp logs` | View server logs (follows by default) |\n| `agcp config` | Show current configuration |\n| `agcp accounts` | Manage multiple accounts |\n| `agcp doctor` | Check configuration and connectivity |\n| `agcp quota` | Show model quota usage |\n| `agcp stats` | Show request statistics |\n| `agcp test` | Verify setup works end-to-end |\n\n### CLI Options\n\n```bash\nagcp [OPTIONS]\n\nOptions:\n  -p, --port \u003cPORT\u003e    Port to listen on (default: 8080)\n  --host \u003cHOST\u003e        Host to bind to (default: 127.0.0.1)\n  --network            Listen on all interfaces (LAN access)\n  -f, --foreground     Run in foreground instead of daemon mode\n  -d, --debug          Enable debug logging\n  --fallback           Enable model fallback on quota exhaustion\n  -h, --help           Show help\n  -V, --version        Show version\n```\n\n## Interactive TUI\n\nAGCP includes a terminal UI for monitoring and configuration (`agcp tui`):\n\nFeatures:\n- **Overview** - Real-time request rate, response times, account status\n- **Logs** - Syntax-highlighted log viewer with scrolling\n- **Accounts** - Manage and monitor account quota (search with `/`, sort with `s`)\n- **Config** - Edit configuration interactively\n- **Mappings** - Configure model name mappings with presets and glob rules\n- **Quota** - Visual quota usage with donut charts\n\n## Model Aliases\n\nFor convenience, you can use these short aliases:\n\n| Alias | Model |\n|-------|-------|\n| `opus` | claude-opus-4-6-thinking |\n| `sonnet` | claude-sonnet-4-6 |\n| `sonnet-thinking` | claude-sonnet-4-6 |\n| `flash` | gemini-3-flash |\n| `pro` | gemini-3-pro-high |\n| `gpt-oss` | gpt-oss-120b-medium |\n\n## Supported Models\n\n### Claude Models\n- `claude-opus-4-6-thinking`\n- `claude-sonnet-4-6`\n\n### Gemini Models\n- `gemini-3-flash`\n- `gemini-3-pro-high`\n- `gemini-3-pro-low`\n\n### Other Models\n- `gpt-oss-120b-medium`\n\n## Configuration\n\nAGCP uses a TOML configuration file at `~/.config/agcp/config.toml`:\n\n```toml\n[server]\nport = 8080\nhost = \"127.0.0.1\"\n# api_key = \"your-optional-api-key\"\nrequest_timeout_secs = 300       # Per-request timeout (default: 5 minutes)\nwarmup_intercept_enabled = true  # Intercept warmup pings on /v1/messages\nwarmup_intercept_max_text_len = 100\n\n[logging]\ndebug = false\nlog_requests = false\n\n[accounts]\nstrategy = \"hybrid\"      # \"sticky\", \"roundrobin\", or \"hybrid\"\nquota_threshold = 0.1    # Deprioritize accounts below 10% quota\nfallback = false\nwarmup_on_startup = true\nwarmup_model = \"gemini-3-flash\"\nquota_refresh_interval_secs = 900  # 0 = disabled\n\n[cache]\nenabled = true\nttl_seconds = 300\nmax_entries = 100\n\n[cloudcode]\ntimeout_secs = 120\nmax_retries = 5\nmax_concurrent_requests = 1      # Max parallel requests to Cloud Code API\nmin_request_interval_ms = 500    # Minimum delay between requests (ms)\n```\n\n### Account Selection Strategies\n\n- **`sticky`** - Use the same account until it hits quota limits\n- **`roundrobin`** - Rotate through accounts evenly\n- **`hybrid`** - Smart selection based on account health and quota (recommended)\n\n## Multi-Account Management\n\nAGCP supports multiple Google accounts for higher throughput:\n\n```bash\n# Add accounts\nagcp login                    # Add first account\nagcp login                    # Add another account\n\n# View accounts\nagcp accounts                 # List all accounts\n\n# Manage accounts\nagcp accounts disable \u003cid\u003e    # Disable an account\nagcp accounts enable \u003cid\u003e     # Re-enable an account\nagcp accounts remove \u003cid\u003e     # Remove an account\n```\n\n## API Endpoints\n\n| Endpoint | Description |\n|----------|-------------|\n| `POST /v1/messages` | Anthropic Messages API (streaming and non-streaming) |\n| `POST /v1/chat/completions` | OpenAI Chat Completions compatibility |\n| `POST /v1/responses` | OpenAI Responses compatibility |\n| `POST /v1/images/generations` | OpenAI image generation compatibility |\n| `POST /v1/images/edits` | OpenAI image edit compatibility (multipart) |\n| `POST /v1/images/variations` | OpenAI image variation compatibility (multipart) |\n| `POST /v1/audio/transcriptions` | OpenAI audio transcription compatibility |\n| `POST /v1/models/detect` | Detect mapped model and capability hints |\n| `GET /v1beta/models` | Native Gemini model listing |\n| `GET /v1beta/models/{model}` | Native Gemini model metadata |\n| `POST /v1beta/models/{model}:countTokens` | Native Gemini token counting |\n| `POST /v1beta/models/{model}:generateContent` | Native Gemini non-streaming generation |\n| `POST /v1beta/models/{model}:streamGenerateContent` | Native Gemini streaming generation (SSE) |\n| `POST /internal/warmup` | Trigger internal warmup and optional quota refresh |\n| `GET /v1/models` | List available models |\n| `GET /health` | Health check |\n| `GET /stats` | Server and cache statistics |\n\n### Gemini / Media API Examples\n\n```bash\n# Native Gemini: list models\ncurl -s http://127.0.0.1:8080/v1beta/models | jq\n\n# Native Gemini: count tokens\ncurl -s http://127.0.0.1:8080/v1beta/models/gemini-3-flash:countTokens \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"contents\":[{\"role\":\"user\",\"parts\":[{\"text\":\"Hello\"}]}]}'\n\n# OpenAI Images compatibility\ncurl -s http://127.0.0.1:8080/v1/images/generations \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"prompt\":\"a retro robot poster\",\"response_format\":\"b64_json\"}'\n\n# OpenAI image edits compatibility\ncurl -s http://127.0.0.1:8080/v1/images/edits \\\n  -F \"image=@input.png\" \\\n  -F \"prompt=add cinematic lighting\" \\\n  -F \"response_format=b64_json\"\n\n# OpenAI image variations compatibility\ncurl -s http://127.0.0.1:8080/v1/images/variations \\\n  -F \"image=@input.png\" \\\n  -F \"response_format=url\"\n\n# OpenAI Audio compatibility (multipart)\ncurl -s http://127.0.0.1:8080/v1/audio/transcriptions \\\n  -F \"file=@sample.wav\" \\\n  -F \"model=gemini-3-flash\" \\\n  -F \"response_format=json\"\n\n# Model detect helper\ncurl -s http://127.0.0.1:8080/v1/models/detect \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"flash\"}'\n```\n\n## Response Caching\n\nAGCP caches non-streaming responses to reduce API quota usage:\n\n- Identical requests return cached responses instantly\n- Streaming and thinking model responses are not cached\n- Use `X-No-Cache: true` header to bypass cache\n- Cache headers: `X-Cache: HIT`, `X-Cache: MISS`, `X-Cache: BYPASS`\n\n## Configuring AI Tools\n\n### Claude Code\n\n```bash\nagcp setup\n```\n\nSelect \"Claude Code\" from the interactive menu, or manually add to `~/.claude/settings.json`:\n\n```json\n{\n  \"apiBaseUrl\": \"http://127.0.0.1:8080\"\n}\n```\n\n### Other Tools\n\nPoint any Anthropic API-compatible tool to `http://127.0.0.1:8080/v1`.\n\n## Troubleshooting\n\n```bash\nagcp doctor    # Run diagnostic checks\nagcp status    # Quick status check\nagcp logs      # View logs\n```\n\n## Files\n\n| Path | Description |\n|------|-------------|\n| `~/.config/agcp/config.toml` | Configuration file |\n| `~/.config/agcp/accounts.json` | Account credentials |\n| `~/.config/agcp/agcp.log` | Server logs |\n| `~/.config/agcp/machineid` | Persistent machine UUID for client identity camouflage |\n\n## License\n\nMIT - See [LICENSE](LICENSE) for details.\n\n---\n\nMade with Rust\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskyline69%2Fagcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskyline69%2Fagcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskyline69%2Fagcp/lists"}