CLI Reference
Complete reference for the vyb command-line interface.
vyb check
Run constraint checks against the current diff.
vyb check [options]
Options
| Flag | Type | Default | Description |
|---|---|---|---|
--base <ref> | string | merge-base | Git ref to diff against. Default is the merge base of the current branch vs. the default branch. |
--staged | boolean | false | Check only staged changes (for pre-commit hooks). |
--files <glob> | string | — | Limit scan to files matching the glob pattern. |
--dry-run | boolean | false | Report violations without failing. Exit code always 0. |
--fail-on-warn | boolean | false | Treat warn-severity violations as block (exit 1). |
--ci | boolean | false | CI-optimized output: no color, structured lines, no progress animations. |
--output-format <fmt> | string | terminal | Output format: terminal, json, sarif, gitlab-sast. |
--output <path> | string | stdout | Write output to file instead of stdout. |
--evidence-dir <path> | string | .vyb/evidence | Directory for Evidence Pack output. |
--no-evidence | boolean | false | Skip Evidence Pack generation even on passing check. |
--coverage-report | boolean | false | Print a framework coverage gap report after the check. |
--quiet | boolean | false | Suppress all output. Use exit code only. |
--spec <path> | string | .vyb/spec.yaml | Path to spec file. |
Exit codes
| Code | Meaning |
|---|---|
0 | All block rules passed |
1 | One or more block violations |
2 | Spec file not found or invalid |
3 | Git repository not found |
4 | Internal engine error |
Examples
# Standard check against PR diff
vyb check --base origin/main
# Pre-commit hook
vyb check --staged
# CI with JSON output
vyb check --ci --output-format json --output results.json
# Dry run on specific files
vyb check --dry-run --files "src/auth/**"
# Check entire history from a tag
vyb check --base v1.2.3
vyb init
Initialize or update .vyb/spec.yaml in the current project.
vyb init [options]
Options
| Flag | Type | Description |
|---|---|---|
--pack <name> | string | Pack to apply: eu-fintech, us-healthtech-phi, us-fintech, eu-saas-general, us-saas-general, custom, or a path/npm package. |
--name <name> | string | Name for a custom pack (used with --pack custom). |
--with-hooks | boolean | Write a pre-commit hook to .git/hooks/pre-commit. |
--force | boolean | Overwrite existing spec. Default: merge. |
--dry-run | boolean | Show what would be written without writing. |
Examples
# Minimal init
vyb init
# Init with EU fintech pack
vyb init --pack eu-fintech
# Init with custom pack and hook
vyb init --pack custom --name my-standards --with-hooks
# Init with npm-published pack
vyb init --pack @myorg/vyb-standards
vyb pack
Manage and emit rule packs.
vyb pack [options]
Options
| Flag | Description |
|---|---|
--list | List all applied packs and their rule counts. |
--emit | Generate a distributable pack YAML from the current spec. |
--name <name> | Name for the emitted pack. |
--version <semver> | Version for the emitted pack. |
--inspect <name> | Show all rules in a named pack. |
--allow-downgrade | Allow severity downgrades when emitting (records in audit log). |
Examples
# List applied packs
vyb pack --list
# Emit a distributable pack
vyb pack --emit --name my-org-standards --version 1.0.0
# Inspect what eu-fintech contains
vyb pack --inspect eu-fintech
vyb ui
Start the vybdocs web UI.
vyb ui [options]
Options
| Flag | Default | Description |
|---|---|---|
--port <number> | 7777 | Port for the web server. |
--no-open | — | Start server without opening browser. |
--host <host> | localhost | Host to bind to. Use 0.0.0.0 for network access. |
Examples
# Start UI on default port
vyb ui
# Start on custom port
vyb ui --port 4444
# Start without opening browser (for remote dev)
vyb ui --no-open --host 0.0.0.0
vyb mcp
Start the MCP server for Claude Desktop.
vyb mcp [options]
Options
| Flag | Description |
|---|---|
--stdio | Use stdio transport (required for Claude Desktop config). |
--port <number> | TCP port (alternative to stdio). Default: auto-assigned. |
MCP tools exposed
| Tool | Description |
|---|---|
proposeRule | Generate a rule definition from a natural language description. |
dryRunRule | Test a proposed rule against the codebase without committing. |
commitRule | Commit a rule to the spec (subject to ratchet). |
readSpec | Read and describe the current spec. |
suggestPack | Recommend a pack based on project context. |
vyb evidence
Manage and verify Evidence Packs.
vyb evidence [options]
Options
| Flag | Description |
|---|---|
--verify | Verify chain integrity and signatures for all packs. |
--verify --pack <path> | Verify a specific pack. |
--list | List all Evidence Packs with metadata. |
--export <path> | Export all Evidence Packs to a zip archive. |
Environment variables
| Variable | Description |
|---|---|
VYB_SPEC | Override spec file path. Equivalent to --spec. |
VYB_EVIDENCE_DIR | Override evidence output directory. |
VYB_NO_COLOR | Disable color output (1 to disable). |
VYB_CI | Force CI mode (1 to enable). Equivalent to --ci. |
VYB_PRIVATE_KEY | Ed25519 private key for signing (PEM, base64). Overrides the auto-generated key. |
VYB_LOG_LEVEL | Log verbosity: error, warn, info, debug. Default: warn. |
Global flags
All commands accept:
| Flag | Description |
|---|---|
--version | Print version and exit. |
--help | Show command help. |
--spec <path> | Override spec file path. |