Skip to content

R4ULtv/lazypr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

300 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

lazypr

test status version license node

Generate clean, consistent PRs from commits - powered by AI and your git history.

πŸ“– Full Documentation

Features ✨

Installation πŸ“¦

npm install -g lazypr

Requires Node.js >= 22. See installation guide β†’

Quick start ⚑

  1. Configure interactively (recommended for first-time setup):

    lazypr config

    This opens a guided menu where you can pick provider + model together and enter your API key with masked input (never echoed to terminal or shell history).

    Or use scriptable commands for CI/dotfiles:

    lazypr config set GROQ_API_KEY=<your-key>
  2. Generate a PR:

    lazypr              # compares against main
    lzp                 # short alias
    lazypr develop      # compare against different branch

Complete quick start guide β†’ | Usage examples β†’

Configuration βš™οΈ

lazypr supports two configuration flows that work alongside each other:

Interactive (recommended for setup)

lazypr config          # opens a Clack-powered interactive menu

The interactive menu lets you:

  • Pick provider + model together with a combined selector (Groq, Cerebras, Google, OpenAI, or custom/local)
  • Enter API keys with masked input β€” keys are never echoed to the terminal or shell history
  • Configure locale, default branch, context, commit filtering, custom labels, retries, and timeout
  • View the current config with secrets masked

Scriptable (CI and dotfiles)

lazypr config set KEY=VALUE    # Set configuration
lazypr config get KEY          # Get configuration
lazypr config remove KEY       # Remove configuration key
lazypr config list             # Show all settings

Examples:

# Set API keys (key is visible in shell history β€” use interactive flow to avoid this)
lazypr config set GROQ_API_KEY=<key>

# Switch provider and model
lazypr config set PROVIDER=google
lazypr config set MODEL=gemini-3.5-flash

# Use a local/custom model with OpenAI-compatible API
lazypr config set PROVIDER=openai
lazypr config set OPENAI_BASE_URL=http://localhost:11434/v1
lazypr config set MODEL=llama3.2

# View config
lazypr config list

Common settings:

  • PROVIDER - AI provider (groq, cerebras, google, or openai)
  • GROQ_API_KEY / CEREBRAS_API_KEY / GOOGLE_GENERATIVE_AI_API_KEY / OPENAI_API_KEY - API keys
  • LOCALE - Output language (en, es, pt, fr, etc.)
  • MODEL - AI model to use (any non-empty string; custom/local model IDs supported)
  • FILTER_COMMITS - Smart commit filtering (true or false)
  • CONTEXT - Custom guidance for AI generation
  • OPENAI_BASE_URL - Custom endpoint for OpenAI-compatible APIs (Ollama, LM Studio, etc.)

View all settings β†’ | Configuration examples β†’

Advanced Features

CLI Reference

lazypr [target] [options]

Options:
  -t, --template [name]      Use a PR template
  -l, --locale <language>    Output language
  -c, --context <text>       Custom AI guidance
  --gh                       Generate gh pr create command
  --no-filter                Disable smart filtering
  -u, --usage                Show token usage
  -h, --help                 Display help

View complete CLI reference β†’

Development

bun install      # Install dependencies
bun test         # Run tests
bun run build    # Build for production

Uses Bun for development, Node.js >= 22 for runtime.

Contributing 🀝

Issues and PRs are welcome. Open one on the repository’s Issues page.

License πŸ“„

MIT Β© Raul Carini. See the LICENSE file for details.

About

The lazy way to write pull requests. 😴

Topics

Resources

License

Code of conduct

Stars

0 stars

Watchers

0 watching

Forks

Contributors