Logs Git commit messages to a markdown file.
npm install @3roland59/gawk!Gawk Logo

@3roland59/gawk is a lightweight NPM package that logs every Git commit into a .commit-log.md file automatically.
It uses a Git post-commit hook that is installed automatically during installation.
---
In any Git-initialized Node.js project:
``bash`
npm install @3roland59/gawk
Thatβs it! The hook will install itself and start logging your commits.
---
If for any reason the auto-install fails (e.g., Git isnβt initialized during install), you can manually install the hook:
#### Run via npx:
`bash`
npx commit-md-install
#### Or if installed globally:
`bash`
npm install -g @3roland59/gawk
commit-md-install
---
Each time you commit, a new entry is appended to .commit-log.md in this format:
`mdsrc/components/Login.js$3
- Author: Jane Doe
- Date: Sat Jun 22 13:45:01 2025
- Message: Fix login bug
- Files Changed:
- README.md
- `
---
`bashCreate or change a file
echo "Test Gawk" > test.txt
---
π¦ What Happens on Install
1. The
postinstall script runs.
2. It checks if Git is initialized (.git exists).
3. If yes, it installs a post-commit hook to .git/hooks/.
4. On every commit, the hook logs:
- Commit hash
- Author name
- Date & time
- Commit message
- List of changed files---
π Files Created
-
.commit-log.md: Markdown file containing your project's commit history.---
β
Requirements
- Git must be initialized (
git init already run).
- Node.js installed (v12+ is fine).
- Works in macOS, Linux, and Git Bash on Windows.---
π Future Features (Planned)
- Custom output file name
- Optional diff or stats
- Config via
.gawkrc` or package.json---
Made with π» by @3roland59
---
MIT License