noto makes generating commit messages effortless. Here's everything you need to know.
Generating Commits
Basic Usage
Stage your changes and run noto:
git add .
notonoto analyzes your staged changes and generates a commit message in an interactive editor.
Apply Commit
Apply the generated message and commit:
git add .
noto -a # or --applyCopy to Clipboard
Copy the message without committing:
git add .
noto -c # or --copyWorking with Previous Messages
Reuse Previous Message
Retrieve the last generated commit message:
noto prevUse with flags:
noto prev -a # Apply previous message
noto prev -c # Copy previous messageAmend Previous Commit
Modify your last commit message:
noto prev --amend -e # or --editNote: When using
--amend, the--edit(-e) flag is required.
Project Setup
Initialize Custom Prompts
Create a custom commit prompt for your project:
noto initnoto will interactively ask where to create the file and whether to generate guidelines from your commit history.
Available flags:
--root- Create the prompt file in the git root--generate- Generate prompt from existing commits (requires 5+ commits)
Examples:
noto init --root # Create in git root
noto init --generate # Generate from commits
noto init --root --generate # Both optionsNote: Learn more about custom prompts in Configuration.
Branch Management
Switch Branches
noto checkoutCreate New Branch
noto checkout -b feat/new-featureAll Available Flags
Commit generation:
-a, --apply- Apply the commit message and commit-c, --copy- Copy the message to clipboard-m, --message- Provide context for the commit message-f, --force- Bypass cache and force regeneration of commit message-p, --push- Commit and push the changes-e, --edit- Required with--amend--amend- Amend the previous commit--manual- Write a custom commit message manually
Initialization:
--root- Create prompt file in git root--generate- Generate prompt from existing commits
Quick Examples
# Quick commit
git add .
noto -a
# Commit and push
noto -a -p
# Provide context for the commit
noto -m "fixing authentication bug"
# Force regenerate (bypass cache)
noto -f
# Write manual commit message
noto --manual
# Copy for manual use
noto -c
# Reuse previous
noto prev -a
# Amend last commit
noto prev --amend -e
# Set up custom prompts
noto init --root --generateTip: Need to configure API keys or models? Check out Configuration for setup instructions. Using custom commit prompts? noto automatically uses your
.noto/commit-prompt.mdfile.
Note: noto caches generated commit messages based on your git diff. If you run
notomultiple times with the same staged changes, it will reuse the cached response to save time and API costs. Use the-for--forceflag to bypass the cache and force regeneration.