Skip to main content
Installs a pre-push Git hook that runs bazable inspect before every git push. If contract violations are found, the push is blocked and the developer must fix them before pushing.

Usage

Options

This command takes no options.

What it does

1

Create the hook

Creates (or overwrites) the file .git/hooks/pre-push in your repository.
2

Run inspect on push

The hook script runs bazable inspect automatically before every git push.
3

Block or allow

If bazable inspect exits with a non-zero code (violations found), the push is aborted with a clear message. Otherwise the push proceeds normally.

Skipping the hook

To temporarily bypass the check, set the environment variable BAZABLE_SKIP=1 before pushing:
Useful in emergencies or when you need to push a known-broken contract quickly.

Prerequisites

  • Your project must be a Git repository (run git init if needed).
  • Your project must contain a valid bazable.config.json.

Example

Pre-push hooks live in .git/hooks/ and are not committed. Every teammate must run bazable hook in their own clone.