Tutorial: hooks you can poke
Block your first command in the browser, then graduate to the real engine.
Write a hook, type a command at it, watch the verdict. Every widget on these pages runs a JavaScript port of capt-hook’s dispatch — and every preset button is a row in a parity test, so what the widget answers is what capt-hook test answers. When a command uses shell features the port doesn’t model (substitution, heredocs), the widget says so instead of guessing.
Try it — this is the hook you’ll build on the next page:
Six short stops, each one interaction and one idea:
- Your first block: one line guards a whole command family
- Precision with Runs: recall vs precision, and why you want both ends
- Conditions compose: AND, veto, and the guard that ignores reads
- Walk the command: when a regex can’t decide
- Stop gates: gate the session, not the tool call
- Test it, then ship it: the same cases, as inline tests
Fifteen minutes end to end. When you’re done, uvx capt-hook init gives you the real thing.