Reference

Ignore patterns, editor integration, git integration, troubleshooting, and requirements.

Exclude files from LLM analysis to reduce tokens and focus on code.

Pattern Syntax

PatternMatches
poetry.lockExact filename
*.logFiles ending in .log
build/*Files in build directory

Default Patterns

ignore:
  # Lock files
  - poetry.lock
  - package-lock.json
  - yarn.lock
  - Cargo.lock
  - go.sum

  # Build artifacts
  - "*.min.js"
  - "*.min.css"
  - "*.map"

  # Binary/compiled
  - "*.pyc"
  - "*.so"
  - "*.dll"

  # IDE
  - ".idea/*"
  - ".vscode/*"

Managing Patterns

# List current patterns
hunknote ignore list

# Add pattern
hunknote ignore add "*.log"

# Remove pattern
hunknote ignore remove "*.log"

Editor Integration

Default Editor Selection

Hunknote looks for editors in order:

  1. editor setting in config
  2. gedit (with --wait)
  3. $EDITOR environment variable
  4. nano
  5. vi

Configuration

# In ~/.hunknote/config.yaml
editor: code --wait

Usage

# Edit generated message
hunknote -e

Git Integration

Git Subcommand

Hunknote works as a git subcommand:

git hunknote
git hunknote -e
git hunknote commit -y

Context Collected

Hunknote analyzes:

  • Branch name - Current branch
  • Staged files - Files staged for commit
  • Change types - New, modified, deleted, renamed
  • Recent commits - Last 5 commits for context
  • Staged diff - Actual code changes

Troubleshooting

No Staged Changes

# Error: No staged changes
git add <files>
hunknote

API Key Not Found

# Option 1: Set via CLI
hunknote config set-key google

# Option 2: Environment variable
export GOOGLE_API_KEY=your-key

# Option 3: Credentials file
echo "GOOGLE_API_KEY=your-key" >> ~/.hunknote/credentials

Cache Not Updating

# Force regeneration
hunknote -r

Debug Mode

hunknote -d

Shows: cache status, tokens, staged files, scope inference.

Raw JSON

hunknote -j

Shows the raw LLM response for debugging.

Help

hunknote --help
hunknote config --help
hunknote compose --help

Requirements

  • Python: 3.12+
  • Git: Any recent version
  • API Key: At least one LLM provider