Hooks

Run the pre-commit checks you already configure, without downloading anything.

ahi run reads .pre-commit-config.yaml, filters files the way pre-commit does, and runs the checks compiled into the binary. It does not download runtimes and it does not clone or run anyone else's hook repository.

ahi run                      # staged files
ahi run --all-files
ahi run --all-files --fix    # end-of-file, trailing whitespace, mixed line endings
ahi run --format sarif
ahi list-checks              # builtin ids and aliases
ahi explain trailing-whitespace

Local hooks

A repo: local system or script hook runs only when ahi.hooks.yaml has an approve rule whose id and exact entry match. It runs with a scrubbed environment plus the toolchain variables the rule names. Other languages are refused.

Moving from pre-commit

ahi migrate reads the existing config, suggests the builtin ids that replace known hooks, copies local hooks with the policy snippet they need, and lists what was not ported with a reason. It prints the suggestion and writes only with --write, replacing the file only with --write --force.