Commands

Complete reference for all hunknote CLI commands and options.

Generate Message

hunknote [OPTIONS]

Generate a commit message from staged changes.

Options:

OptionShortDescription
--edit-eOpen message in editor
--regenerate-rForce regenerate, ignore cache
--debug-dShow debug info (cache, tokens, scope)
--json-jShow raw JSON response from LLM
--intent TEXT-iProvide context to guide message framing
--intent-file PATHLoad intent from file
--style NAMEOverride style profile
--scope TEXTForce a specific scope
--no-scopeDisable scope
--ticket TEXTForce ticket key (e.g., PROJ-123)

Examples:

# Basic generation
hunknote

# Edit before viewing
hunknote -e

# Force regeneration
hunknote -r

# Use conventional commits style
hunknote --style conventional

# Provide intent context
hunknote --intent "Fix race condition in session handling"

# Debug mode
hunknote -d

Commit

hunknote commit [OPTIONS]

Commit staged changes using the generated message.

Options:

OptionShortDescription
--yes-ySkip confirmation prompt

Workflow:

# 1. Generate message
hunknote

# 2. (Optional) Edit message
hunknote -e

# 3. Commit with confirmation
hunknote commit

# Or commit immediately (for scripts)
hunknote commit -y

Note: If no cached message exists, you'll be prompted to run hunknote first.


Init

hunknote init

Initialize hunknote with interactive setup.

What it configures:

  • LLM provider selection
  • Model selection
  • API key (securely stored)

Configuration files created:

  • ~/.hunknote/config.yaml - Settings
  • ~/.hunknote/credentials - API keys (secure permissions)

Config

Manage global configuration.

Show Configuration

hunknote config show

Displays current provider, model, and settings.

Set Provider

# Interactive model selection
hunknote config set-provider google

# Specify model directly
hunknote config set-provider anthropic --model claude-sonnet-4-20250514

Set API Key

hunknote config set-key google
hunknote config set-key anthropic

List Providers

hunknote config list-providers

List Models

# All providers
hunknote config list-models

# Specific provider
hunknote config list-models google

Style

Manage commit message style profiles.

List Styles

hunknote style list

Shows available profiles with descriptions.

Show Style Details

hunknote style show conventional

Shows format template and example output.

Set Style

# Set globally
hunknote style set conventional

# Set for current repo only
hunknote style set ticket --repo

Scope

Manage scope inference settings.

Check Scope

hunknote scope check

Preview what scope would be inferred for current staged changes.

Show Scope Tree

hunknote scope tree

Display file structure with detected scopes.

JSON Output

hunknote scope json

Output scope analysis as JSON.


Ignore

Manage ignore patterns for the current repository.

List Patterns

hunknote ignore list

Add Pattern

hunknote ignore add "*.log"
hunknote ignore add "build/*"

Remove Pattern

hunknote ignore remove "*.log"