This document describes all the pawsome things Freddie can do β or is learning to do β to manage your git hooks. Whether it's fetching a new hook or rolling over and disabling one, Freddie's got your back (and your repo). π€
Freddie starts by sniffing around and making himself at home in your repo. You
can do it by running freddie welcome.
- Creates a .freddie directory at the root of the repository β Freddie's personal doghouse. π
- Checks if .git/hooks exists; if not, gives a friendly warning so you can initialize Git properly.
- As a welcome gift, Freddie adds a sample pre-commit hook so you can test that everything is working.
- Youβre free to replace or edit it β he wonβt take it personally!
These commands let you add, remove, and manage hooks like a true pack leader.
- Command:
freddie add <hook-name> - Adds a new hook file in .freddie/ and sets up a proxy in .git/hooks/.
- Warns if the hook already exists, and asks before overwriting.
- Command:
freddie destroy <hook-name> - Removes the hook from .freddie/ and deletes its proxy from .git/hooks/.
- Asks for confirmation before removal β safety first!
- Command:
freddie sniff - Shows all hooks Freddie is currently managing.
- Command:
freddie fetch <hook-name> - Displays the content of the specified hook script managed by Freddie.
Sometimes Freddie needs to rest. Sometimes heβs ready to go full fetch mode. These commands control his energy levels. β‘
-
Command:
freddie sleep <hook-name> -
Temporarily disables the specified hook without deleting it.
-
Command:
freddie wake <hook-name> -
Temporarily enables the specified hook.
- Command:
freddie check - Lists all hooks along with their current state: enabled or disabled.
Need to clean the yard? Freddie can pack up and leave with a simple command. π¨
- Command:
freddie bye - Removes Freddie's personal doghouse and all hooks managed by him.
Freddie may be tiny, but heβs working on some advanced tricks too. β¨
- Logs the execution of hooks and reports any errors that happen during runtime.
- Supports CI/CD pipelines by allowing hooks to be optionally skipped in CI environments.