vulkro-sf init
Set up Vulkro for Salesforce in the current project.
Command reference
Generated from vulkro-sf init --help (vulkro-sf 0.28.0). Run scripts/gen-docs.sh in the product repository to refresh it; do not edit this section by hand.
Set up Vulkro for Salesforce in the current project.
vulkro-sf init [OPTIONS]
Options
| Flag | Description |
|---|---|
--pre-commit | Install a pre-commit hook that runs vulkro-sf ctx check --staged (what the change broke) and vulkro-sf scan --gate-vs HEAD on staged Apex / metadata files. |
--force | Force overwrite if the target hook file already exists. |
--block-on-ctx-check | Make the hook's vulkro-sf ctx check step block a commit that leaves call sites on an old signature, removed names still used, or syntax errors. Default: it prints them and the commit goes on. |
-v, --verbose... | Bump stderr log verbosity. -v enables debug-level tracing for the vulkro + vulkro_sf targets; -vv enables trace. Honoured only when RUST_LOG is unset (an explicit RUST_LOG always wins) |
-q, --quiet | Print only warnings and errors on stderr: no progress, tips or next-step hints. Results on stdout and exit codes are unchanged. |
--no-color | Turn off coloured output. Colour is also off when NO_COLOR is set to a non-empty value or TERM=dumb. |
-h, --help | Print help (see a summary with '-h') |
Full vulkro-sf init --help
Set up Vulkro for Salesforce in the current project.
Scaffold a vulkro-sf integration for the current project.
Today this drives one optional installer: `--pre-commit`. The hook runs `vulkro-sf scan --gate-vs HEAD` on staged Apex / metadata files (`.cls`, `.trigger`, `.page`, `.component`, `.cmp`, `.app`, `.evt`, `.intf`, and the `*-meta.xml` shapes for objects, fields, profiles, permission sets, flows, and custom metadata records). Composes with Q1-B: the hook fails the commit ONLY on findings that are NEW vs HEAD, never on pre-existing technical debt.
`--gate-vs` is capability `sf-presubmit` (the Salesforce CI gate). On a machine without a licence the hook never blocks a commit for a licence reason: it checks nothing and says so in one line ending in `vulkro: license_required`.
Target file:
.husky/pre-commit when the project ships a `.husky/` directory (Husky-managed repo). .git/hooks/pre-commit otherwise (vanilla git).
Idempotency: if the target file already exists, the install refuses to overwrite unless `--force` is passed; this lets the command be re-run safely on a project that already wired a different pre-commit hook.
Environment:
VULKRO_SF_SKIP_PRECOMMIT=1 Bypass the hook for the current commit (the hook checks this var first and exits 0 when set). Useful for emergency commits. VULKRO_GIT_HOOK Exported by the generated hook (set to `pre-commit`) so `vulkro-sf scan` knows it runs inside a git hook. Not something you set yourself.
Exit codes: 0 = installed; 2 = error (not a git repo, hook already exists without --force, filesystem failure).
Usage: vulkro-sf init [OPTIONS]
Options:
--pre-commit
Install a pre-commit hook that runs `vulkro-sf ctx check --staged` (what the change broke) and `vulkro-sf scan --gate-vs HEAD` on staged Apex / metadata files
--force
Force overwrite if the target hook file already exists
--block-on-ctx-check
Make the hook's `vulkro-sf ctx check` step block a commit that leaves call sites on an old signature, removed names still used, or syntax errors. Default: it prints them and the commit goes on
-v, --verbose...
Bump stderr log verbosity. `-v` enables debug-level tracing for the `vulkro` + `vulkro_sf` targets; `-vv` enables trace. Honoured only when `RUST_LOG` is unset (an explicit `RUST_LOG` always wins)
-q, --quiet
Print only warnings and errors on stderr: no progress, tips or next-step hints. Results on stdout and exit codes are unchanged
--no-color
Turn off coloured output. Colour is also off when NO_COLOR is set to a non-empty value or TERM=dumb
-h, --help
Print help (see a summary with '-h')