+
Skip to content

rodeyseijkens/gen-commit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

gen-commit

generate conventional commit messages using LLM

Let's be honest. We've all been there:

  • git commit -m "update"
  • git commit -m "fixed stuff"
  • git commit -m "asdfghjkl" (in a moment of pure despair)

gen-commit was born from the tears of countless mysterious merge conflicts and the desperate need for someone (or something) to make our commit history look like we actually know what we're doing. You're welcome.


🧑‍💻 Usage

gen-commit [OPTIONS]

Options

  • -h, --help: Show help message
  • -m, --model MODEL: Specify the model to use with llm command
  • -p, --print: Print the generated message only
  • -D, --debug: Special debug mode (no real committing etc.)
  • -v, --verbose: Show all output
  • -a, --all: Analyze all changes
  • -c, --commit: Automatically commit without confirmation
  • -s, --scope SCOPE: Specify scope for commit message

Examples

# Interactive mode
gen-commit

# Analyze all changes (staged, unstaged & untracked)
gen-commit -a

# Auto-commit changes
gen-commit -c

# Print only (no commit)
gen-commit -p

# Use specific scope
gen-commit -s frontend

🛠️ Prerequisites

  • Nix (with flake support)
  • llm command-line tool
  • git

⚡ Installation

Using Nix Flake

{
  inputs = {
    gen-commit = {
      url = "github:rodeyseijkens/gen-commit";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = { self, nixpkgs, gen-commit, ... }:
  {
    devShells.x86_64-linux.default = nixpkgs.legacyPackages.x86_64-linux.mkShell {
      packages = [
        gen-commit.packages.x86_64-linux.default
      ];
    };
  };
}

🧠 How it works

The tool analyzes your git changes (staged or unstaged) and uses the llm command to generate an appropriate commit message following the Conventional Commits specification with gitmoji.

Commit Message Format

<type>[scope]: <gitmoji> <description>

📜 License

MIT — see the LICENSE file for details.


Made with ❤️ by @rodeyseijkens

About

Generate conventional commit messages with LLM

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载