A command-line tool that uses Google's Gemini API or local LM Studio model to roast your code diffs.
go install github.com/c0ze/git-roast@latestYou can configure the tool using environment variables or a .env file in the current directory.
| Variable | Description | Default |
|---|---|---|
ROAST_MODE |
GEMINI or LOCAL |
GEMINI |
GEMINI_API_KEY |
Your Google Gemini API Key | Required for Gemini |
ROAST_LOCAL_URL |
URL for local model (e.g., LM Studio) | http://localhost:1234/v1 |
ROAST_LOCAL_MODEL |
Model name for local inference | deepseek-r1-distill-qwen-7b |
SHOW_THINKING |
Show "Chain of Thought" for reasoning models | false |
- Get a Gemini API Key: Get an API key from Google AI Studio.
- Set the Environment Variable:
export GEMINI_API_KEY="your_api_key_here"
- Roast Your Code:
git diff | git-roast
- Start your Local Server (e.g., LM Studio on port 1234).
- Configure
.env:ROAST_MODE=LOCAL ROAST_LOCAL_URL=http://localhost:1234/v1 ROAST_LOCAL_MODEL=deepseek-r1-distill-qwen-7b SHOW_THINKING=false # Set to true to see the reasoning process
- Roast Your Code:
git diff | git-roast
It reads the diff from stdin, sends it to the configured LLM (Gemini or Local) with a "cynical senior engineer" persona, and prints the critique to stdout.