Skip to content

c0ze/git-roast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-roast

A command-line tool that uses Google's Gemini API or local LM Studio model to roast your code diffs.

Installation

go install github.com/c0ze/git-roast@latest

Configuration

You 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

Usage

1. Gemini Mode (Default)

  1. Get a Gemini API Key: Get an API key from Google AI Studio.
  2. Set the Environment Variable:
    export GEMINI_API_KEY="your_api_key_here"
  3. Roast Your Code:
    git diff | git-roast

2. Local Mode (e.g., LM Studio)

  1. Start your Local Server (e.g., LM Studio on port 1234).
  2. 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
  3. Roast Your Code:
    git diff | git-roast

How it Works

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.

About

roast your diffs like a pro

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages