Skip to content

Configure hooks

Add hooks when a repository needs local automation around Shipper stages. Hooks are executable files under .shipper/hooks/.

  1. Choose one supported hook filename from Reference > Hooks.

    This recipe uses pre-implement.

  2. Create the script under .shipper/hooks/pre-implement.

    Terminal window
    mkdir -p .shipper/hooks
    printf '%s\n' '#!/usr/bin/env sh' 'npm run format:check' > .shipper/hooks/pre-implement
  3. Make the hook executable.

    Terminal window
    chmod +x .shipper/hooks/pre-implement
  4. Verify that the hook exists and is executable.

    Terminal window
    test -x .shipper/hooks/pre-implement

Use Reference > Hooks for supported filenames, environment variables, exit behavior, timeout behavior, cancellation, and worktree lifecycle details.