Skip to content

Latest commit

 

History

21 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@jerryshell/aicommits

AI-powered git commit message generator. Fork of nutlope/aicommits.

Features and changes

  • Structured output: Uses Zod schemas + Output.object() to enforce JSON responses, eliminating parsing fragility from free-text LLM output.
  • No reasoning tokens: All LLM calls disable reasoning (reasoning: "none", sent as reasoning_effort: "none" on OpenAI-compatible endpoints), skipping thinking tokens on models that support it.
  • Large-diff summarization: Diffs over 30 KB are condensed locally into a per-file skeleton (stat + key declarations) instead of sending truncated raw diff text, cutting tokens ~10× on big commits. Small diffs are sent verbatim.
  • Interactive editing: After generation, use the arrow keys to choose Yes, Edit, or No; Edit lets you revise the message before committing.
  • Bun for dev, Node for prod: Dev tooling uses Bun (faster builds, oxfmt, oxlint). Production binary targets Node.

Install

npm add -g @jerryshell/aicommits

Quick start

aicommits setup   # configure your API endpoint and key, pick a model
aicommits         # generate a commit message from staged changes
# tip: `aic` works too (same thing, shorter)

Development

git clone https://github.com/jerryshell/aicommits.git
cd aicommits
bun install
bun run build
bun link

Commands

Command Description
aicommits Generate commit message from staged changes
aicommits setup Configure API endpoint and key
aicommits model Select or change AI model
aicommits pr Generate PR from branch diff
aicommits config View/edit config
aicommits hook Install git hooks

Flags

Flag Description
-g, --generate <n> Number of messages to generate
-t, --type <format> Format: plain, conventional, conventional+body, gitmoji, subject+body
-a, --all Auto-stage all tracked changes
-y, --yes Skip confirmation
-c, --clipboard Copy message to clipboard instead of committing
-n, --no-verify Bypass pre-commit hooks
-p, --prompt <text> Custom prompt for the LLM
-x, --exclude <files> Files to exclude from AI analysis

Providers

Any OpenAI-compatible endpoint works: OpenAI, Groq, xAI, Together, Ollama, LM Studio, vLLM, or a custom server. aicommits setup asks for the base URL and API key; no per-provider presets or hardcoded defaults. Local endpoints (e.g. Ollama) can use an empty API key.

About

AI-powered git commit message generator

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages