{"id":32786807,"url":"https://github.com/sachnun/gemini-cli-go","last_synced_at":"2025-11-05T05:03:19.151Z","repository":{"id":321664484,"uuid":"1086715782","full_name":"sachnun/gemini-cli-go","owner":"sachnun","description":"Go-based proxy server that converts Google's Gemini CLI tool into OpenAI-compatible API endpoints","archived":false,"fork":false,"pushed_at":"2025-10-30T20:24:51.000Z","size":113,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-30T22:08:50.017Z","etag":null,"topics":["api-proxy","gemini","go","google-cloud","openai"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/sachnun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-30T19:55:19.000Z","updated_at":"2025-10-30T20:24:56.000Z","dependencies_parsed_at":"2025-10-30T22:08:55.522Z","dependency_job_id":"699899d4-604d-435c-bd91-c3fa5f72ebc8","html_url":"https://github.com/sachnun/gemini-cli-go","commit_stats":null,"previous_names":["sachnun/gemini-cli-go"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sachnun/gemini-cli-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sachnun%2Fgemini-cli-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sachnun%2Fgemini-cli-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sachnun%2Fgemini-cli-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sachnun%2Fgemini-cli-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sachnun","download_url":"https://codeload.github.com/sachnun/gemini-cli-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sachnun%2Fgemini-cli-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":282762578,"owners_count":26723111,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-05T02:00:05.946Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["api-proxy","gemini","go","google-cloud","openai"],"created_at":"2025-11-05T05:01:39.178Z","updated_at":"2025-11-05T05:03:19.144Z","avatar_url":"https://github.com/sachnun.png","language":"Go","readme":"# Gemini CLI to API Proxy\n\nA Go-based proxy server that converts Google's Gemini CLI tool into OpenAI-compatible API endpoints with streaming support, multiple authentication methods, and Docker deployment ready.\n\nBased on [geminicli2api](https://github.com/gzzhongqi/geminicli2api)\n\n## Quick Start\n\n### Docker\n\nRun the pre-built Docker image - recommended for production deployment.\n\n```bash\n# Run\ndocker run -p 8888:8888 \\\n  -e GEMINI_AUTH_PASSWORD=your_password \\\n  -e GEMINI_CREDENTIALS='{\"client_id\":\"...\",\"token\":\"...\"}' \\\n  ghcr.io/sachnun/gemini-cli-go:latest\n\n```\n\n### Local Development\n\nRun directly from source code for development and testing.\n\n```bash\n# Install dependencies\ngo mod tidy\n\n# Run server\ngo run cmd/server/main.go\n\n# Build binary\ngo build -o geminicli2api cmd/server/main.go\n```\n\n## Environment Variables\n\nConfigure authentication and Google Cloud credentials.\n\n### Required\n- `GEMINI_AUTH_PASSWORD`: API authentication password\n\n### Optional (choose one)\n- `GEMINI_CREDENTIALS`: Google OAuth credentials JSON string\n- `GOOGLE_APPLICATION_CREDENTIALS`: Path to credentials file\n- `GOOGLE_CLOUD_PROJECT`: Google Cloud project ID\n\n## API Endpoints\n\nAvailable endpoints for both OpenAI-compatible and native Gemini APIs.\n\n### OpenAI Compatible\n- `POST /v1/chat/completions` - Chat completions (streaming \u0026 non-streaming)\n- `GET /v1/models` - List available models\n\n### Native Gemini\n- `POST /v1beta/models/{model}:generateContent` - Generate content\n- `POST /v1beta/models/{model}:streamGenerateContent` - Stream content\n- `GET /v1beta/models` - List models\n\n## Usage Example\n\nBasic chat completion using curl with OpenAI-compatible endpoint.\n\n```bash\ncurl -X POST http://localhost:8888/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer your_password\" \\\n  -d '{\n    \"model\": \"gemini-2.5-pro\",\n    \"messages\": [{\"role\": \"user\", \"content\": \"Hello!\"}]\n  }'\n```\n\n## Authentication\n\nMultiple authentication methods supported for API access.\n\n- Bearer Token: `Authorization: Bearer YOUR_PASSWORD`\n- Basic Auth: `Authorization: Basic base64(username:YOUR_PASSWORD)`\n- Query Parameter: `?key=YOUR_PASSWORD`\n\n## License\n\nMIT License - see [LICENSE](LICENSE) file.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsachnun%2Fgemini-cli-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsachnun%2Fgemini-cli-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsachnun%2Fgemini-cli-go/lists"}