{"id":30759666,"url":"https://github.com/bestK/kiro2cc","last_synced_at":"2025-09-04T12:05:04.003Z","repository":{"id":305328418,"uuid":"1021186745","full_name":"bestK/kiro2cc","owner":"bestK","description":"kiro to claude code","archived":false,"fork":false,"pushed_at":"2025-07-22T09:57:04.000Z","size":35,"stargazers_count":210,"open_issues_count":2,"forks_count":30,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-16T11:26:36.961Z","etag":null,"topics":["api","claudecode"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bestK.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2025-07-17T03:07:30.000Z","updated_at":"2025-08-16T10:50:59.000Z","dependencies_parsed_at":"2025-07-19T16:53:24.423Z","dependency_job_id":"e8e3e94e-5dab-4ace-9ad9-511ed2aca57b","html_url":"https://github.com/bestK/kiro2cc","commit_stats":null,"previous_names":["bestk/kiro2cc"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/bestK/kiro2cc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bestK%2Fkiro2cc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bestK%2Fkiro2cc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bestK%2Fkiro2cc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bestK%2Fkiro2cc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bestK","download_url":"https://codeload.github.com/bestK/kiro2cc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bestK%2Fkiro2cc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273605067,"owners_count":25135678,"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-09-04T02:00:08.968Z","response_time":61,"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","claudecode"],"created_at":"2025-09-04T12:02:45.303Z","updated_at":"2025-09-04T12:05:03.992Z","avatar_url":"https://github.com/bestK.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Kiro Auth Token 管理工具\n\n```\n                                                  \n                                                  \n                                                  \n     Claude Code                Cherry Studio     \n          │                           │           \n          │                           │           \n          │                           │           \n          │                           │           \n          │                           │           \n          ▼                           │           \n    kiro2cc claude                    │           \n          │                           │           \n          │                           │           \n          ▼                           │           \n    kiro2cc export                    │           \n          │                           │           \n          │                           │           \n          ▼                           │           \n    kiro2cc server                    │           \n          │                           │           \n          │                           │           \n          ▼                           ▼           \n        claude                 kiro2cc server     \n                                                  \n                                                  \n                                                  \n```\n\n\n\n这是一个Go命令行工具，用于管理Kiro认证token和提供Anthropic API代理服务。\n### Claude Code\n\u003cimg width=\"1920\" height=\"1040\" alt=\"image\" src=\"https://github.com/user-attachments/assets/25f02026-f316-4a27-831c-6bc28cb03fca\" /\u003e\n\n### Cherry Studio\n\u003cimg width=\"1920\" height=\"1040\" alt=\"image\" src=\"https://github.com/user-attachments/assets/9bb24690-1e96-4a85-a7fc-bf7cdee95c09\" /\u003e\n\n## 功能\n\n-   读取用户目录下的 `.aws/sso/cache/kiro2cc-token.json` 文件\n-   使用refresh token刷新access token\n-   导出环境变量供其他工具使用\n-   启动HTTP服务器作为Anthropic Claude API的代理\n\n## 编译\n\n```bash\ngo build -o kiro2cc main.go\n```\n\n## 自动构建\n\n本项目使用GitHub Actions进行自动构建：\n\n-   当创建新的GitHub Release时，会自动构建Windows、Linux和macOS版本的可执行文件并上传到Release页面\n-   当推送代码到main分支或创建Pull Request时，会自动运行测试\n\n## 使用方法\n\n### 1. 读取token信息\n\n```bash\n./kiro2cc read\n```\n\n### 2. 刷新token\n\n```bash\n./kiro2cc refresh\n```\n\n### 3. 导出环境变量\n\n```bash\n# Linux/macOS\neval $(./kiro2cc export)\n\n# Windows\n./kiro2cc export\n```\n\n### 4. 启动Anthropic API代理服务器\n\n```bash\n# 使用默认端口8080\n./kiro2cc server\n\n# 指定自定义端口\n./kiro2cc server 9000\n```\n\n## 代理服务器使用方法\n\n启动服务器后，可以通过以下方式使用代理：\n\n1. 将Anthropic API请求发送到本地代理服务器\n2. 代理服务器会自动添加认证信息并转发到Anthropic API\n3. 示例：\n\n```bash\ncurl -X POST http://localhost:8080 \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\": \"claude-3-opus-20240229\", \"messages\": [{\"role\": \"user\", \"content\": \"Hello\"}]}'\n```\n\n## Token文件格式\n\n工具期望的token文件格式：\n\n```json\n{\n    \"accessToken\": \"your-access-token\",\n    \"refreshToken\": \"your-refresh-token\",\n    \"expiresAt\": \"2024-01-01T00:00:00Z\"\n}\n```\n\n## 环境变量\n\n工具会设置以下环境变量：\n\n-   [] `ANTHROPIC_BASE_URL`: https://localhost:8080\n-   [] `ANTHROPIC_API_KEY`: 当前的access token\n\n## 跨平台支持\n\n-   Windows: 使用 `set` 命令格式\n-   Linux/macOS: 使用 `export` 命令格式\n-   自动检测用户目录路径\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FbestK%2Fkiro2cc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FbestK%2Fkiro2cc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FbestK%2Fkiro2cc/lists"}