vulkro install-hook
Install or update git hooks that run Vulkro before a commit or push.
install-hook manages a marked block inside the hook file, so
re-running it is idempotent and it composes with an existing husky or
hand-written hook instead of refusing. With no selector, it installs
both hooks.
The generated hook keeps your code on the machine: your source, file paths, and findings are never sent anywhere.
- pre-commit runs the new-findings gate against
HEAD.vulkro gatemakes no outbound request at all. - pre-push runs a fast high-confidence quick scan of
src. The scan path can send the usage heartbeat (at most once every 24 hours, on a background thread, and it never blocks or delays the push).
If the hook must be network-silent, set VULKRO_OFFLINE=1 (or
VULKRO_NO_HEARTBEAT=1) in the environment the hook runs in.
Bypass once with VULKRO_SKIP_HOOKS=1.
Usage
vulkro install-hook [FLAGS]
Flags
| Flag | Description |
|---|---|
--pre-commit | Manage the pre-commit hook. |
--pre-push | Manage the pre-push hook (the last gate before code leaves the machine). |
--uninstall | Remove the Vulkro-managed block instead of installing it. |
--force | Replace the whole hook file with just the Vulkro block. The default composes with any existing content. |
Exit codes
0hook(s) installed, updated, or removed.2not in a git repo, or a write failure.
The generated hook itself returns 1 on findings at commit or push time.
Examples
# Install both hooks, composing with anything already there.
vulkro install-hook
# Only the pre-push gate.
vulkro install-hook --pre-push
# Remove the Vulkro block from both hooks.
vulkro install-hook --uninstall
# Skip the hook for one commit.
VULKRO_SKIP_HOOKS=1 git commit -m "wip"
Related
vulkro gate- the new-findings gate the pre-commit hook runs.vulkro scan- the full pipeline.vulkro guard- the in-loop gate for AI-assisted editing.
Command reference
Generated from vulkro help install-hook on vulkro 0.26.0. This block is the
authoritative flag, usage, and exit-code reference for this command; the
prose above is the friendly explanation. Do not edit this block by hand;
run npm run docs:cli after a release.
Install or update git hooks that run Vulkro before a commit or push.
Install or update git hooks that run vulkro before a commit or push. Manages a marked block inside the hook file, so re-running is idempotent and it composes with an existing husky / hand-written hook instead of refusing (the whole-file scaffolder is `vulkro init`). With no selector, installs both. Your source, file paths, and findings never leave the machine: pre-commit runs the new-findings gate against HEAD (no outbound request at all); pre-push runs a fast high-confidence quick scan of `src`, whose path can send the usage heartbeat (at most once per 24h, on a background thread). Set `VULKRO_OFFLINE=1` for a network-silent hook. Bypass once with `VULKRO_SKIP_HOOKS=1`.
Exit code: 0 = hook(s) installed / updated / removed, 2 = not in a git repo or a write failure. (The generated hook itself returns 1 on findings at commit / push time.)
Usage: vulkro install-hook [OPTIONS]
Options:
--offline
Hard-disable every outbound network call for this run (sets VULKRO_OFFLINE=1). Blocks the CVE feed, the license heartbeat, the update check, webhooks, and any cloud AI endpoint; a loopback model (http://127.0.0.1, http://localhost) is still allowed. Equivalent to exporting VULKRO_OFFLINE=1, and the flag wins when both are set
--pre-commit
Manage the pre-commit hook
--pre-push
Manage the pre-push hook (the last gate before code leaves the machine)
--uninstall
Remove the vulkro-managed block instead of installing it
--force
Replace the whole hook file with just the vulkro block (the default composes with any existing content)
-h, --help
Print help (see a summary with '-h')