AI-assisted Git commit message generator for staged changes.
aicm reads git diff --cached, asks opencode to write a Conventional Commit message, then lets you approve the commit and optional push.
This is a small pet project. Crates like clap are intentionally avoided for now in favor of keeping the implementation limited to Rust's standard library.
- Rust and Cargo
- Git
opencodeinstalled and available onPATH
Install from crates.io:
cargo install aicmInstall from a local checkout:
cargo install --path .You can also run it directly from the repository:
cargo runStage the changes you want to commit:
git add <files>Generate a commit message:
aicmAfter generating the message, aicm prompts before running:
git commit -m "<generated-message>"If you accept the second prompt, it pushes the current branch:
git push origin <current-branch>Print help:
aicm helpGenerated messages are prompted to follow Conventional Commits, use imperative mood, omit markdown/commentary, and keep the subject at 72 characters or less.
cargo check
cargo fmt
cargo testThis is a single Rust binary crate. The entrypoint is src/main.rs.