autocommit-rs 0.1.2

Tool that generates conventional commits from staged changes and executes the commit in one go.
autocommit-rs-0.1.2 is not a library.

autocommit-rs

crates.io CI

Generates and publishes conventional commits from staged changes in one go. Rust port of @wthrajat/autocommit.

Demo

Quick start

Install

cargo install autocommit-rs

Update

cargo install autocommit-rs --force

Use — stage changes, then run autocommit and choose: Accept and commit, Edit message, Regenerate, or Quit.

Prerequisites

CLI reference

Flag Description
-v, --version Show version
-h, --help Show help
--openai-key <key> Set OpenAI API key
--gemini-key <key> Set Gemini API key
--model <model> Default model (openai or gemini)
--short / --long Message style
--sign / --no-sign GPG signing
--no-verify Skip git hooks
Env variable Description
OPENAI_API_KEY Overrides config file
GEMINI_API_KEY Overrides config file
AUTOCOMMIT_MODEL openai or gemini
AUTOCOMMIT_MESSAGE_STYLE short or long

Configuration

Stored in ~/.autocommitrc (JSON). On first run, autocommit walks you through an interactive setup.

Building from source

git clone https://github.com/wthrajat/autocommit-rs && cd autocommit-rs
cargo build --release --locked
cp ./target/release/autocommit ~/.local/bin/

Local development

cargo build
cargo test
cargo run -- --help