>_ commitar

AI-assisted Git commits

Your history.
Your workflow.

Generate commits autonomously, bring your own message, or target exactly one file. Commitar adapts to the way you already work with Git.

$ commitar
Generating commit message... |

Commit preview 1/1
────────────────────────────────────────────────────
Source: working tree
Files (2):
  • src/moon_service.py
  • tests/test_moon_service.py
Message:
  feat: add moon phase lookup
Generated in 1.42s
Create commit? [y/N]: y

Commit completed · Created commits: 8bf32aa
AI or manualGenerate a message or validate your own.
Any scopeUse the repository, a file, or a directory.
Interactive or autonomousConfirm once — or use --yes.

Choose the mode
that fits the moment.

Commitar is not a single rigid flow. Keep an AI in the loop, automate the routine work, or write the exact message yourself.

01 / autonomous

Let AI do the routine work

Generate a Conventional Commit, skip the prompt, and keep moving in scripts or a fast local flow.

commitar --output commit --yes
02 / manual

Bring your own message

Use your wording when you have it. Commitar validates it before committing, without calling any provider.

commitar --message "fix: handle timeout"
03 / guided

Review before you decide

See the selected files, the suggested message, and generation time. Confirm once when you are ready.

commitar --output commit

Choose your
AI provider.

Use a hosted model when you want immediate access, or keep generation local with Ollama. The provider and model live in your project configuration.

OPENAI

One API, many providers

Use the familiar API format with OpenAI, DeepSeek, Groq, Together AI, or OpenRouter

provider = "openai"
GEMINI

Make the most of free quota

Gemini is a practical choice for everyday commit generation when its free quota fits your team’s volume.

provider = "gemini"
OLLAMA

Code models, local speed

Run programming-focused models locally for fast suggestions, private diffs, and economical token usage.

provider = "ollama"

One repository.
One shared workflow.

Version a .commitar.toml alongside your code and set the provider, model, language, output mode, and limits once for the whole team.

Repository configuration

Less typing.
More flow.

With project defaults in place, day-to-day work does not need long commands or repeated flags. Run commitar and use the team’s chosen workflow immediately.

[ai]
provider = "ollama"
models = ["gemma4:e4b", "qwen2.5-coder:14b"]
endpoint = "http://localhost:11434/api/generate"
max_input_tokens = 12000
context_window_tokens = 32768
max_output_tokens = 80
temperature = 0.2
timeout_seconds = 60

[commit]
language = "pt-BR"
format = "conventional"
include_added = true
output = "commit"
confirm = true

[limits]
max_files_per_request = 50
max_diff_bytes = 100000

Stage the list.
Commit exactly that.

Use git add to select files manually. When staging exists, Commitar reads only the index and writes one message for the selected list.

# Select the files that belong together
git add src/moon_service.py tests/test_moon_service.py

# Uses only git diff --cached
commitar --output commit

Use the scope
you mean.

Start broad for a quick cleanup, narrow to a single file, or group a feature directory into one deliberate commit.

01 / repository

One commit per changed file

commitar

With no path, Commitar goes through the working tree and gives each modified file its own group.

02 / file

Commit one focused change

commitar app.py

Target a single file when a small fix or a precise change deserves its own commit.

03 / directory

Group a complete feature

commitar src/moon/

Use a directory to generate one message and one commit for all of its eligible changes.

Quick start

From install
to first commit.

Keep a .commitar.toml in the repository to share the provider, model, language, and output defaults with the team. After that setup, your daily flow can be just commitar.

# Install
pip3 install commitar

# Create project defaults
commitar config init

# .commitar.toml holds the team defaults
provider = "ollama"
models = ["gemma4:e4b", "qwen2.5-coder:14b"]

# Daily workflow
commitar