| Crates.io | mood-msg |
| lib.rs | mood-msg |
| version | 0.1.0 |
| created_at | 2025-07-01 13:01:26.801613+00 |
| updated_at | 2025-07-01 13:01:26.801613+00 |
| description | Generate witty, mood-based git commit messages |
| homepage | |
| repository | https://github.com/piyush-itis/mood-msg |
| max_upload_size | |
| id | 1733196 |
| size | 51,323 |
Generate witty, mood-based git commit messages from your terminal, powered by local LLMs (Ollama) or a local fallback database.
git commit -m "mood-msg -- tired"From crates.io (recommended):
cargo install mood-msg
Or from the repo:
cargo install --path .
bash install.sh
This will:
git commit -m "mood-msg -- tired" in any repoIf you want to set up the hook manually:
mkdir -p ~/.git-templates/hooks
cat > ~/.git-templates/hooks/commit-msg << 'EOF'
#!/bin/bash
msg=$(cat "$1")
if [[ "$msg" =~ ^mood-msg\ --\ ([a-zA-Z]+)$ ]]; then
mood="${BASH_REMATCH[1]}"
new_msg=$(mood-msg "$mood")
new_msg=$(echo "$new_msg" | sed 's/^\"//;s/\"$//')
echo "$new_msg" > "$1"
fi
EOF
chmod +x ~/.git-templates/hooks/commit-msg
git config --global core.hooksPath ~/.git-templates/hooks
mood-msg tired
git commit -m "mood-msg -- tired"
This will automatically replace the commit message with a witty, mood-based message.
moods.json fileIf you want to customize or expand the fallback messages, edit the moods.json file in your project directory.
Pull requests and issues are welcome!
MIT