╭───────────────────────────────────────╮
│ 🥠 COMMIT FORTUNE COOKIE 🥠 │
╰───────────────────────────────────────╯
Commit: "fix: resolve null check in auth"
Type: Bug Fix
┌───────────────────────────────────────┐
│ │
│ "The bug you fixed today was │
│ planted by yesterday's you." │
│ │
│ Lucky number: 42 │
│ Lucky language: Rust │
│ Lucky command: git reflog │
│ │
└───────────────────────────────────────┘
Fortune cookie wisdom for your git commits. Zero dependencies. Pure Node.js.
npm install -g commit-fortune-cookieOr run without installing:
npx commit-fortune-cookie# Fortune for your latest commit
commit-fortune-cookie
# Fortunes for the last 5 commits
commit-fortune-cookie --last 5
# Random fortune, no git repo needed
commit-fortune-cookie --wisdom
# Print a post-commit hook script
commit-fortune-cookie --hook
# Help
commit-fortune-cookie --helpcommit-fortune-cookie --hook > .git/hooks/post-commit
chmod +x .git/hooks/post-commitNow every git commit gives you a fortune automatically.
| Type | Detected from |
|---|---|
| Bug Fix | fix:, bug:, hotfix:, patch: |
| New Feature | feat:, feature:, add: |
| Refactor | refactor:, perf:, cleanup: |
| Documentation | docs:, doc:, readme: |
| Testing | test:, tests:, spec: |
| Merge | Commits starting with Merge |
| Revert | revert:, commits starting with Revert |
| Chore | chore:, style:, lint:, ci:, build: |
| Work in Progress | wip:, WIP, anything else |
Works with conventional commits and non-conventional commits alike.
Same commit hash = same fortune, every time. No randomness — your fortune is baked into the commit.
--wisdom mode uses Date.now() so it's always fresh.
After a bug fix:
Commit: "fix: stop the bleeding in checkout flow"
Type: Bug Fix
"A fix without a test is a wish without a plan."
After a feature:
Commit: "feat: dark mode for dashboard"
Type: New Feature
"Today's feature is tomorrow's legacy code."
After a merge:
Commit: "Merge pull request #42 from feature/auth"
Type: Merge
"Two branches become one. Peace was never an option."
- Node.js 14+
- git (for commit-based fortunes;
--wisdomworks without git)
- github.com/NickCirv — more tools built in public
MIT
PRs welcome! If you have a funny idea or improvement:
- Fork the repo
- Create your feature branch (
git checkout -b feature/amazing-idea) - Commit your changes
- Push to the branch (
git push origin feature/amazing-idea) - Open a Pull Request
Found a bug? Open an issue.
If this made you mass-exhale through your nose, mass-hit that star button.