Skip to content

anakidev/aicm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aicm

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.

Requirements

  • Rust and Cargo
  • Git
  • opencode installed and available on PATH

Install

Install from crates.io:

cargo install aicm

Install from a local checkout:

cargo install --path .

You can also run it directly from the repository:

cargo run

Usage

Stage the changes you want to commit:

git add <files>

Generate a commit message:

aicm

After 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 help

Commit Message Format

Generated messages are prompted to follow Conventional Commits, use imperative mood, omit markdown/commentary, and keep the subject at 72 characters or less.

Development

cargo check
cargo fmt
cargo test

This is a single Rust binary crate. The entrypoint is src/main.rs.

About

AI-assisted Git commit message generator for staged changes

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages