Command

okulo hook

Install or remove a Git pre-commit hook that runs okulo check --staged.

localdx

When to use it

You want the quality gate on every commit without remembering to run check.

Usage

okulo hook install|uninstall [repo] [options]

Options

OptionDefaultDescription
--fail-oncriticalSeverity forwarded to okulo check
--components A,BallScope the staged check
--forceoffOverwrite a non-okulo pre-commit hook

Examples

Default install

okulo hook install
okulo hook uninstall

Stricter, scoped hook

okulo hook install --fail-on warning --components backend

Sample output

Illustrative terminal output (column layout matches the real CLI):

$ okulo hook install
okulo: installed pre-commit hook → .git/hooks/pre-commit
       runs: okulo check --staged

$ git commit -m "wip"
Change check  staged vs HEAD
…
FAIL  1 critical · 0 warnings
okulo: pre-commit check failed (exit 1)

How to read it

Tips

Related