commitdog with no arguments stages all your changes and analyzes the diff to produce four concrete commit message suggestions. The suggestions come entirely from your local code: commitdog reads function names, file types, and directory structure to infer a scope and verb, then generates messages in Conventional Commits format. Nothing leaves your machine during this step. Once you pick a message, commitdog commits and asks whether to push.
Usage
How suggestions are derived
commitdog analyzes the staged diff directly — no AI and no network call. It extracts:- Function names added or removed (e.g.
addRefreshToken,verifyToken) - File types and directories to infer a scope (e.g.
auth,api,db) - Change pattern (new file, delete, rename, test-only, config-only, etc.)
feat(auth): add refreshToken and verifyToken) to brief (feat: update auth module), capped at 72 characters each.
Commit flow
1
Stage your changes
If nothing is staged, commitdog stages everything automatically:To stage a single file instead, pass it as an argument:
2
Secret scan
commitdog silently scans the staged diff for leaked credentials. If it finds something, it shows exactly where and blocks the commit before showing suggestions:commitdog detects: AWS access and secret keys, GitHub tokens (classic and fine-grained), GitLab tokens, private keys (RSA, EC, DSA, OpenSSH), generic API keys, generic passwords and secrets, Slack tokens, Stripe keys, and Heroku API keys. Test files, mocks, fixtures, and placeholder values are skipped automatically.
3
Review suggestions
commitdog displays up to four suggestions derived from your diff:Enter a number to pick that message,
e to edit, or q to abort without committing.4
Edit before committing (optional)
Pressing Press Enter with an empty line to keep the original message, or type a replacement. The edited message is used as-is.
e at the suggestion prompt opens the first suggestion for inline editing:5
Commit and push
After you pick or edit a message, commitdog commits and confirms:It then asks whether to push:Press Enter or
y to push. Enter n to skip. If the push fails, commitdog’s auto-recovery logic handles common errors like HTTPS auth failure and non-fast-forward rejections.