Skip to content

Command Line Interface

Basic Usage

# Generate commit message automatically
gim

# Specify commit subject instead of conclude from commit description;
# The description is generated by AI anyway.
gim --title "your commit title"

# Stage unstaged changes automatically
gim --auto-add
# Basic usage - generate commit message for staged changes
gim

# Auto-stage changes and generate commit message
gim -a

# Amend the most recent commit
gim -ap

Command Options

  • -t, --title <STRING>: Specify the commit message title
  • -a, --auto-add: Automatically stage all modifications
  • -p, --update: Amend the most recent commit
  • -v, --verbose: Show detailed information (will be suppressed in quiet mode)
  • -q, --quiet: Suppress normal output (quiet mode)

You can combine these options; Use the -h option to view help information.

Dry Run (--dry)

You can use the --dry option with gim, gim -a, or gim -p to preview the content that would be sent to the AI model, without actually sending it or making a commit.

Usage examples:

gim --dry
gim -a --dry
gim -p --dry

This will print the diff and prompt content that would be sent to the AI, then exit without making any network requests or git commits.