Manage .git/hooks/* shim files.
Refuses to overwrite user-authored hooks. Pass force: true to back up
and replace. Detects own shims by # git_hoox managed marker.
Summary
Functions
Install hook shims into .git/hooks/.
Write a starter .git_hoox.exs at the repo root.
Remove managed shims. Restore latest backup if present.
Types
@type action() :: :write | :overwrite_managed | :overwrite_with_backup
Per-hook installer plan entry.
@type scaffold_error() :: {:config_exists, Path.t()}
Functions
@spec install(keyword()) :: {:ok, [plan_entry()]} | {:error, install_error()}
Install hook shims into .git/hooks/.
Options
:force— overwrite user hooks with backup. Defaultfalse.:dry_run— print plan, no writes. Defaultfalse.
@spec scaffold(keyword()) :: {:ok, Path.t()} | {:error, scaffold_error()}
Write a starter .git_hoox.exs at the repo root.
Options
:force— overwrite existing config. Defaultfalse.
Returns {:ok, path} on success or {:error, {:config_exists, path}}
if the file already exists and :force is false.
@spec uninstall(keyword()) :: {:ok, non_neg_integer()}
Remove managed shims. Restore latest backup if present.