DIFFSCRIBE(1)

NAME
diffscribe - LLM-assisted git commit helper

SYNOPSIS
diffscribe [prefix] [flags]

DESCRIPTION
diffscribe inspects your staged Git changes and asks an LLM to craft commit messages that match whatever style you describe via --format (Conventional Commit summaries by default). Use it directly in the terminal to print suggestions, or wire it into shell completion so git commit -m "" followed by the Tab key yields AI-generated prefixes that respect whatever you already typed.

OPTIONS

--config=file
    Config file (default searches diffscribe.{yaml,json,toml}).

--format=description
    Commit message format: "auto", a preset name (e.g. "conventional-commits"), "file:<path>", or a custom description. Default: auto

--llm-api-key=key
    LLM provider API key.

--llm-base-url=url
    LLM API base URL. Default: https://api.openai.com/v1/chat/completions

--llm-max-completion-tokens=n
    Max completion tokens to request from the LLM (0 = provider default). Default: 512

--llm-model=model
    LLM model identifier. Default: gpt-4o-mini

--llm-provider=provider
    LLM provider (openai, openrouter, etc.). Default: openai

--llm-temperature=n
    LLM sampling temperature. Default: 1

--quantity=n
    Number of suggestions to request. Default: 5

--status
    Show configuration and validate the API key.

--system-prompt=prompt
    LLM system prompt override.

--user-prompt=prompt
    LLM user prompt override.

-v, --version
    Show version information and exit.

-h, --help
    Display help and exit.

ENVIRONMENT

DIFFSCRIBE_API_KEY, OPENAI_API_KEY
    Provide the LLM provider API key.

DIFFSCRIBE_STATUS
    Set to 0 to hide the "loading..." prompt indicator used by shell integrations.

DIFFSCRIBE_STASH_COMMIT
    Inspect a temporary stash instead of staged changes (used in completions).

FILES
Configuration files are merged in the following order, with later entries overriding earlier ones for any keys they define:

$XDG_CONFIG_HOME/diffscribe/.diffscribe*
    User configuration directory (XDG standard).

$HOME/.diffscribe*
    User home directory configuration.

./.diffscribe*
    Project-local configuration.

Each file only needs to specify the settings it wants to change (for example, llm.api_key, llm.provider, llm.model, etc.).

EXIT STATUS

0   Success.

1   An error occurred.

EXAMPLES
    # print five suggestions for the staged changes
    diffscribe
    # constrain results to the provided prefix
    diffscribe "feat: add"
    # request inline candidates while typing a commit message
    git commit -m "feat: "  # then press Tab with the completion scripts installed

SEE ALSO
git(1), git-commit(1)