Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

git-producer-tag 🎀

Every producer has a tag. Now your git does too.

License Platform Dependencies Bash

Commit, push, or merge β€” and your Mac sings your producer tag over it:

🎡 "m m m m Mason's merging" 🎡

Sung, unironically, by the macOS text-to-speech voice that performs everything to the tune of Pomp and Circumstance. Or drop your own recorded tag like a real producer. Zero dependencies, one-command install, and it can mathematically never slow down or block a git operation.

Hear it in 30 seconds

git clone https://github.com/CainPatel/git-producer-tag.git
cd git-producer-tag
./bin/play-tag.sh merge        # πŸ”Š preview your tag right now

Liked it? Install it:

cd /path/to/your/repo && /path/to/git-producer-tag/install.sh   # one repo
./install.sh --global                                           # every repo

The installer reads your name from git config user.name and sets up your default tags automatically. Keep the clone where it is afterward β€” hooks call into it by absolute path.

Steal a famous tag

TAGS.md is a cookbook of parody tags riffing on the greats, with your name swapped in:

Inspired by Yours
Metro Boomin "If young Marco don't trust this commit, CI gon' catch it"
Jason Derulo "Maaason Ceruuulo" (sung, obviously)
DJ Khaled "Another commit!"
Pi'erre Bourne "Yo Amir, you wanna push this here?"

Plus the formula for making your own, and a GitHub Actions "Tag Studio" that renders any phrase into an .m4a on GitHub's macOS runners β€” and drops a 🎀 comment on every merged PR.

Customize everything

Edit ~/.config/producer-tag/config (global), or drop a .producer-tag file in any repo root to override per repo. Every key is optional:

Key Default What it does
TAG_NAME first word of git config user.name Name used in default phrases
PHRASE_COMMIT {TAG_NAME}'s committing Spoken on commit (stutters are literal text)
PHRASE_PUSH {TAG_NAME}'s pushing Spoken on push
PHRASE_MERGE m m m {TAG_NAME}'s merging Spoken on merge (also fires on git pull that merges)
VOICE Good News TTS voice β€” say -v '?' lists all. "Good News" sings; try "Bad News", "Cellos", "Organ"
RATE 180 Speech rate, words/min
VOLUME 0.7 Volume for custom audio files (0.0–1.0)
SOUND_COMMIT / SOUND_PUSH / SOUND_MERGE unset Path to an audio file β€” plays via afplay instead of TTS
ENABLE_COMMIT / ENABLE_PUSH / ENABLE_MERGE true Per-event toggles
MUTE false Kill switch

Use your own recorded tag

Record yourself in Voice Memos, export into sounds/, point an event at it:

SOUND_MERGE="$HOME/git-producer-tag/sounds/my-tag.m4a"

Meeting mode

export PRODUCER_TAG_MUTE=1   # silence everything until this shell closes

Why it's safe to put in your hooks

This is a joke tool built like it isn't one:

  • Never blocks git. Playback is backgrounded and the engine exits 0 on every path β€” a broken config can't abort your push.
  • Never eats your hooks. Existing hooks (husky, lint-staged, …) get a clearly marked block appended, and uninstall restores them byte-for-byte.
  • Plays fair in --global mode. Global shims run the tag, then hand off to each repo's own hooks with arguments, stdin, and exit codes intact β€” your real pre-push checks still work.
  • Worktree-aware. Hooks land where git actually runs them, even in linked git worktree checkouts.
  • Tested. 59 checks run silently against throwaway repos: ./test.sh.

Uninstall

./install.sh --uninstall            # from inside a tagged repo
./install.sh --global --uninstall   # undo a global install

How it plays with existing hooks

  • Per-repo install: if a hook already exists, the installer appends a clearly marked block instead of overwriting. Caveat: a hook that ends in exit/exec will never reach the appended block β€” move the block up manually in that case.
  • Global install: shims play the tag, then hand off to the repo's own .git/hooks hook with the original arguments and stdin, propagating its exit code β€” so repo-level pre-push checks still work and can still block a push.
  • Running both a global install and a per-repo install tags twice: the global shim plays, then chains into the repo's own hook, which plays again.
  • A repo with its own local core.hooksPath (some husky/lefthook setups use one) won't run the global shims at all β€” local config always wins over global, so that repo needs its own per-repo install to get the tag.
  • If an existing hook is a symlink, the installer edits it through the link and the symlink itself is left in place, both on install and on uninstall.

Security note

.producer-tag files β€” and the global ~/.config/producer-tag/config β€” are plain shell sourced directly by the engine, not a passive key=value format. A repo you clone can ship its own .producer-tag, so treat it like a checked-in hook: review it before committing in repos you don't fully trust, especially if you've done the global install (which runs on every repo on the machine). For the same reason, keep this clone itself somewhere only your own user account can write (e.g. under your home directory) β€” hooks execute it on every git operation, so anyone who can write to it can run code as you.

Limitations

  • macOS only for now (say/afplay). The engine no-ops elsewhere, and the platform check is one guard clause β€” Linux support is a great first PR (paplay/espeak branch wanted).
  • post-commit doesn't fire for commits replayed during a rebase β€” git doesn't run it there. Probably for the best.

Contributing

New cookbook entries (TAGS.md has the formula β€” keep them PG), Linux playback, new voices pairings, or anything that makes a commit funnier. If this made you smile, a ⭐ makes the tag louder. (Not literally. Yet.)

License

Apache-2.0, see LICENSE.

About

🎀 Your git gets a producer tag β€” your Mac sings "m m m m Mason's merging" on commit, push, and merge. Zero dependencies, never blocks git.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages