How uaoa/claude-commit works
AI Commit Generator turns staged Git changes into a Conventional Commit message, lets the user confirm or refine it, then creates the commit. The CLI entry point orchestrates staged-change collection, API/CLI generation with API-to-CLI fallback, interactive editing, and commit execution. The README documents English/Ukrainian support and both generation methods; source excerpts show the main orchestration and module calls. External services and the Git repository are modeled separately from repository code.
Main entry points: generate-commit.mjs Commit orchestrator · git-utils.mjs Staged changes and commit · ai-generator.mjs API generation and refinement · ui.mjs Prompts and console UI
Components 10
Commit workflow
- Commit orchestrator
generate-commit.mjs
Git access
- Staged changes and commit
git-utils.mjs
AI generation
- API generation and refinement
ai-generator.mjs - CLI generation and refinement
ai-generator.mjs
User interaction
- Prompts and console UI
ui.mjs - English and Ukrainian messages
i18n.mjs
Other components
- User
- Git repository
- Anthropic API
- Claude Code CLI
Connections 12
- User → Commit orchestrator: runs
README.md - Commit orchestrator → Staged changes and commit: reads staged changes
generate-commit.mjs - Staged changes and commit → Git repository: reads status and diff
git-utils.mjs - Commit orchestrator → API generation and refinement: generates or refines
generate-commit.mjs - API generation and refinement → Anthropic API: requests completion
ai-generator.mjs - Commit orchestrator → CLI generation and refinement: fallback or generate
generate-commit.mjs - CLI generation and refinement → Claude Code CLI: runs prompt
ai-generator.mjs - Commit orchestrator → Prompts and console UI: asks and displays
generate-commit.mjs - Prompts and console UI → User: collects response
ui.mjs - Commit orchestrator → English and Ukrainian messages: gets translations
generate-commit.mjs - Commit orchestrator → Staged changes and commit: creates commit
generate-commit.mjs - Staged changes and commit → Git repository: writes commit
git-utils.mjs