AI-powered git tools using Groq.
- think-commit-msg - Generate Conventional Commits format messages from staged changes
- think-review - Review code changes with AI-powered feedback
- think-git-graph - Visual git history browser GUI with colored branch graph
curl -sL https://raw.githubusercontent.com/dalpat/git-tools/main/install.sh | bashThis will:
- Download the scripts to
~/.local/bin/ - Ask which tools to install
- Ask for your Groq API key (or skip to set manually)
- Add them to your PATH
- Print usage instructions
git clone https://github.com/dalpat/git-tools.git
cd git-tools
chmod +x think-commit-msg think-reviewFor global access:
sudo cp think-commit-msg think-review /usr/local/bin/
# Or build think-git-graph from source:
cd think-git-graph && go build -o ~/.local/bin/think-git-graph .Generate commit messages from staged changes.
# Generate commit message (Conventional Commits format)
git add .
think-commit-msg
# Quick commit in one line
git add . && git commit -m "$(think-commit-msg)"
# Simple format (not Conventional Commits)
think-commit-msg --simple
# Show staged files before message
think-commit-msg --verbose
# List available models
think-commit-msg --list
# Use specific model
think-commit-msg --model llama-3.1-8b-instant| Flag | Description |
|---|---|
-s, --simple |
Simple commit message (not Conventional Commits) |
-v, --verbose |
Show staged files before output |
-l, --list |
List available Groq models |
-m, --model |
Use specific model (default: llama-3.3-70b-versatile) |
-h, --help |
Show help |
Review code changes with AI-powered feedback.
# Review staged changes
git add .
think-review
# Review unstaged changes (if nothing staged)
git diff | think-review
# Review all changes with verbose output
think-review --verbose
# Focus on specific areas
think-review --security
think-review --style
think-review --best-practices
# Adjust batch size for large diffs
think-review --batch-size 5
# Retry on failure
think-review --retry 3
# Use specific model
think-review --model llama-3.3-70b-versatile| Flag | Description |
|---|---|
-a, --all |
Review all focus areas (default) |
--security |
Focus on security vulnerabilities |
--style |
Focus on code style and formatting |
--best-practices |
Focus on best practices |
-b, --batch-size |
Files per batch (default: 3) |
-r, --retry |
Retry failed API calls (default: 2) |
-v, --verbose |
Show diff before review |
-l, --list |
List available Groq models |
-m, --model |
Use specific model |
-h, --help |
Show help |
Config files are read in this order (highest wins):
- CLI flags
.think-reviewrc(project-level, create from.think-reviewrc.example)~/.think-tools.json(global defaults)
Example .think-reviewrc:
{
"batch_size": 3,
"retry": 2,
"focus": {
"security": true,
"style": true,
"best_practices": true
}
}Example ~/.think-tools.json:
{
"api_key": "gsk_...",
"model": "llama-3.3-70b-versatile"
}Visual git history browser GUI. Shows colored branch graph, commit details, and current branch.
# Open git graph in browser (blocks terminal)
think-git-graph
# Run in background
think-git-graph --detach
# Stop detached instance
kill $(cat /tmp/think-git-graph.pid)| Flag | Description |
|---|---|
--detach |
Run server in background with PID file |
--port |
Port to listen on (default: random) |
--host |
Host to bind to (default: 127.0.0.1) |
--no-open |
Do not open browser automatically |
-h, --help |
Show help |
- Git log --graph style layout — dynamic lane assignment with curved bezier connections between lanes
- Colored branch graph — each branch gets a distinct color, rendered on HTML Canvas
- Merge visualization — double-ring commit nodes for merge commits with cross-lane bezier curves
- Click any commit — slide-in detail panel showing full message, author, date, and files changed with +/- stats
- Current branch indicator — green dot (clean) or yellow dot (uncommitted changes)
- Pagination — loads 200 commits by default, "Load More" button fetches older commits
- Refresh button — manually update the graph after making changes in another terminal
- Dark & light themes — clean, minimal UI with amber accents; respects system preference
- Auto-refresh — graph updates automatically when git changes are detected
- Zero runtime dependencies — single compiled Go binary, no npm, no node_modules
--detachmode — runs in background with PID file, parent waits for URL then exits
# Quick start — opens in your default browser
cd /path/to/any/git/repo
think-git-graph
# Background mode — returns immediately, browser opens automatically
think-git-graph --detach
# Run on a fixed port (so you can bookmark it)
think-git-graph --port 8080
# Run without auto-opening the browser (useful in SSH/headless/WSL)
think-git-graph --no-open
# Combine flags for background + fixed port
think-git-graph --detach --port 8080 --host 0.0.0.0
# View the listening URL
cat /tmp/think-git-graph.url
# Stop the background server
kill $(cat /tmp/think-git-graph.pid)
# Build from source (requires Go 1.22+)
cd think-git-graph
go build -o ~/.local/bin/think-git-graph .git clone https://github.com/dalpat/git-tools.git
cd git-tools/think-git-graph
go build -o ~/.local/bin/think-git-graph .- Git
- Go 1.22+ (only if building from source)
- A web browser (Chrome, Firefox, Safari, Edge)
- Visit https://console.groq.com
- Create an account (free)
- Create a new API key
- The installer will ask for it, or set manually in
~/.think-tools.json
| Variable | Default | Description |
|---|---|---|
GROQ_API_KEY |
(required) | Your Groq API key |
GROQ_MODEL |
llama-3.3-70b-versatile |
Model to use |
| Tool | Dependencies |
|---|---|
| think-commit-msg | Git, jq, curl, Groq API key |
| think-review | Git, jq, curl, Groq API key |
| think-git-graph | Git, Go 1.22+ (build only), web browser |
MIT