{"id":37190566,"url":"https://github.com/ArnoChenFx/autocommit","last_synced_at":"2026-01-22T02:01:15.678Z","repository":{"id":255671821,"uuid":"853398578","full_name":"ArnoChenFx/autocommit","owner":"ArnoChenFx","description":"AutoCommit 是一个自动生成 Git 提交信息的命令行工具。它使用 AI 模型分析您的 Git diff，并生成符合约定的提交信息。","archived":false,"fork":false,"pushed_at":"2025-12-23T12:30:29.000Z","size":42,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-17T10:05:53.756Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ArnoChenFx.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}},"created_at":"2024-09-06T15:19:56.000Z","updated_at":"2026-01-12T03:04:30.000Z","dependencies_parsed_at":"2024-09-09T08:21:52.009Z","dependency_job_id":null,"html_url":"https://github.com/ArnoChenFx/autocommit","commit_stats":null,"previous_names":["arnochenfx/autocommit"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ArnoChenFx/autocommit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArnoChenFx%2Fautocommit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArnoChenFx%2Fautocommit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArnoChenFx%2Fautocommit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArnoChenFx%2Fautocommit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArnoChenFx","download_url":"https://codeload.github.com/ArnoChenFx/autocommit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArnoChenFx%2Fautocommit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28650557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"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":[],"created_at":"2026-01-14T22:00:30.237Z","updated_at":"2026-01-22T02:01:15.672Z","avatar_url":"https://github.com/ArnoChenFx.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# AutoCommit\n\nAutoCommit 是一个自动生成 Git 提交信息的命令行工具。它使用 AI 模型分析您的 Git diff，并生成符合约定的提交信息。\n\n## 功能\n\n- 自动分析 Git diff\n- 使用 AI 模型生成提交信息\n- 支持自定义提示词配置\n- 支持从文件导入 diff\n- 支持流式输出生成的提交信息\n\n## 命令行参数\n\nAutoCommit 支持以下命令行参数：\n\n```\nUsage: autocommit [OPTIONS]\n\nOptions:\n  -c, --config    配置文件路径（可选）, 缺省时会从当前目录和autocommit程序所在的目录中寻找\"config.json\"\n  -p, --prompt    选择预设提示词（可选）, 缺省时为\"default\"\n  -f, --file      从文件导入 diff（可选）, 缺省时使用当前目录的`git diff --cached`结果\n  -h, --help      显示帮助信息\n```\n\n## 配置文件结构\n\n配置文件使用 JSON 格式，包含以下字段：\n\n```json\n{\n  \"api_url\": \"API 端点 URL\",\n  \"api_key\": \"API 密钥\",\n  \"model\": \"使用的 AI 模型名称\",\n  \"prompts\": [\n    {\n      \"name\": \"预设名称\",\n      \"prompt\": [\n        {\n          \"role\": \"角色（system/user）\",\n          \"content\": [\n            \"提示词内容，可以是多行\"\n          ]\n        }\n      ]\n    }\n  ]\n}\n```\n\n### 字段说明\n\n- `api_url`: AI API 的端点 URL\n- `api_key`: 用于认证的 API 密钥\n- `model`: 要使用的 AI 模型名称\n- `prompts`: 预设提示词数组\n  - `name`: 预设名称，用于命令行参数中选择\n  - `prompt`: 提示词数组\n    - `role`: 消息角色，可以是 \"system\" 或 \"user\"\n    - `content`: 提示词内容，可以是多行字符串数组\n\n您可以在配置文件中定义多个预设提示词，并通过命令行参数 `-p` 或 `--prompt` 来选择使用哪个预设。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FArnoChenFx%2Fautocommit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FArnoChenFx%2Fautocommit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FArnoChenFx%2Fautocommit/lists"}