Hooks

A hook is a script of yours that Pullfrog runs at a fixed point in a run.

HookWhen it runsCLI key
Repo setup scriptOnce, before the agent startshooks.setup
Post-checkout scriptAfter every branch checkout, the first one includedhooks.post-checkout
Pre-push scriptBefore a pushhooks.pre-push

Set hooks in the repository console under Agent → Hooks, or with the CLI:

pullfrog config set hooks.setup 'pnpm install --frozen-lockfile'
pullfrog config set hooks.pre-push 'pnpm lint && pnpm test'

# or read a longer script from a file
pullfrog config set hooks.setup --file setup.sh

On the default ubuntu-latest runner, git, Node.js, npm, pnpm, Python, and Docker are preinstalled.

Failed pushes

When the pre-push script fails, the agent gets its output and can fix the problem. Later pushes in the same run skip the hook.

Environment

Hooks get the same environment and the same sandbox as the agent's shell commands. You write the scripts, but the code they call is not always yours: on a pull request from a fork, a pre-push script of pnpm test runs the contributor's tests.

  • A script that needs a secret needs that variable in the environment allowlist, or shell isolation turned off. A missing variable is the usual reason a working script starts to fail.
  • On a runner that cannot provide namespace isolation, Pullfrog skips the script instead of running it unprotected. The run continues, and the agent is told the script did not run.
© 2026 Pullfrog, Inc.

On this page