LFG Documentation
Complete guide to using LFG - the AI-powered Git workflow tool that handles add, commit, push, and PR creation in one command.
CLI Commands
Complete reference for all command line options and flags
Configuration
Detailed guide to .lfg/config.yml settings and options
AI Providers
Setup and configuration for Claude, OpenAI, Gemini, and system AI
GitHub Integration
PR automation, reviewers, labels, and GitHub CLI setup
Hooks & Automation
Pre-run and post-run hooks for custom workflow automation
Troubleshooting
Common issues, debugging tips, and solutions
Quick Start
1. Installation
2. Initialize in Your Repository
3. Basic Usage
4. Create Pull Request
Key Features
One Command Workflow
lfg handles git add, commit with AI-generated message, push, and optional PR creation
AI-Powered Messages
Supports Claude, OpenAI, Gemini, and system AI for intelligent commit messages
Safety First
Protected branch confirmation, signed commits, DCO support, and large file detection
GitHub Integration
Automatic PR creation with reviewers, labels, team assignments, and draft support
Highly Configurable
Extensive YAML configuration for AI, GitHub, hooks, guards, and behavior
Offline Mode
Template-based commits when AI is unavailable or disabled
Common Workflows
Standard Development
Make changes, commit, and push in one command
lfg
Feature Branch with PR
Complete feature development workflow with pull request
lfg --pr --review 'team-lead' --labels 'feature'
Hotfix to Production
Quick fix with confirmation for protected branch
lfg --force --base main
Draft PR for Review
Create draft PR for early feedback
lfg --pr --draft --review 'senior-dev'
Offline Development
Work without AI when internet is unavailable
lfg --offline
Amend Last Commit
Fix the last commit with additional changes
lfg --amend --no-push
Troubleshooting
Problem: AI provider not working
Solution: Check your API keys in .lfg/.env or re-authenticate CLI tools. Use --offline as fallback.
Problem: Large file warnings
Solution: Use Git LFS for large files or adjust guards.large_file_bytes in config.yml
Problem: GitHub CLI not authenticated
Solution: Run 'gh auth login' to authenticate with GitHub CLI for PR features
Problem: Protected branch push blocked
Solution: Use --force flag or adjust protected_branches in config.yml
Problem: Commit signing issues
Solution: Set up GPG key with 'git config commit.gpgsign true' or disable with behavior.require_signed_commits: false
Problem: Hook script failures
Solution: Check .lfg/pre-run.sh and .lfg/post-run.sh permissions and syntax