spmx
Commands

spmx hooks

Opt in to a Git post-checkout hook that hydrates worktrees as they are created.

spmx hooks enable  [--global | --repo] [--async]
spmx hooks disable [--global | --repo]
spmx hooks status  [--global | --repo]   # default subcommand

Hooks are off by default. spmx never touches core.hooksPath or .git/hooks without this command.

What the hook does

On a fresh checkout (git worktree add or a first checkout of a branch) in a Flutter or Swift project, it runs spmx hydrate --quiet. That is what makes a new worktree ready before Xcode's GUI opens it, which shims alone cannot do.

spmx writes a delimited block, # >>> spmx hook >>> to # <<< spmx hook <<<, and preserves any hook that was already there (Lefthook, Husky, hand-written). If core.hooksPath is already set it chains rather than replaces.

Options

OptionApplies toDescription
--globalenable, disable, statususe the global Git hooks configuration
--repoenable, disable, statususe the current repository. Default inside a Git repo
--asyncenablerun spmx hydrate in the background during checkout

--global and --repo cannot be combined on enable.

Examples

spmx hooks enable --global
spmx hooks enable --repo --async
spmx hooks status
spmx hooks disable --global

disable removes only spmx's block and leaves other hooks intact.

Maintained by LuisRibeirooLast updated Edit this page on GitHub