Skip to main content

CLI Reference

Complete reference for the vyb command-line interface.

vyb check

Run constraint checks against the current diff.

vyb check [options]

Options

FlagTypeDefaultDescription
--base <ref>stringmerge-baseGit ref to diff against. Default is the merge base of the current branch vs. the default branch.
--stagedbooleanfalseCheck only staged changes (for pre-commit hooks).
--files <glob>stringLimit scan to files matching the glob pattern.
--dry-runbooleanfalseReport violations without failing. Exit code always 0.
--fail-on-warnbooleanfalseTreat warn-severity violations as block (exit 1).
--cibooleanfalseCI-optimized output: no color, structured lines, no progress animations.
--output-format <fmt>stringterminalOutput format: terminal, json, sarif, gitlab-sast.
--output <path>stringstdoutWrite output to file instead of stdout.
--evidence-dir <path>string.vyb/evidenceDirectory for Evidence Pack output.
--no-evidencebooleanfalseSkip Evidence Pack generation even on passing check.
--coverage-reportbooleanfalsePrint a framework coverage gap report after the check.
--quietbooleanfalseSuppress all output. Use exit code only.
--spec <path>string.vyb/spec.yamlPath to spec file.

Exit codes

CodeMeaning
0All block rules passed
1One or more block violations
2Spec file not found or invalid
3Git repository not found
4Internal 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

FlagTypeDescription
--pack <name>stringPack to apply: eu-fintech, us-healthtech-phi, us-fintech, eu-saas-general, us-saas-general, custom, or a path/npm package.
--name <name>stringName for a custom pack (used with --pack custom).
--with-hooksbooleanWrite a pre-commit hook to .git/hooks/pre-commit.
--forcebooleanOverwrite existing spec. Default: merge.
--dry-runbooleanShow 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

FlagDescription
--listList all applied packs and their rule counts.
--emitGenerate 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-downgradeAllow 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

FlagDefaultDescription
--port <number>7777Port for the web server.
--no-openStart server without opening browser.
--host <host>localhostHost 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

FlagDescription
--stdioUse stdio transport (required for Claude Desktop config).
--port <number>TCP port (alternative to stdio). Default: auto-assigned.

MCP tools exposed

ToolDescription
proposeRuleGenerate a rule definition from a natural language description.
dryRunRuleTest a proposed rule against the codebase without committing.
commitRuleCommit a rule to the spec (subject to ratchet).
readSpecRead and describe the current spec.
suggestPackRecommend a pack based on project context.

vyb evidence

Manage and verify Evidence Packs.

vyb evidence [options]

Options

FlagDescription
--verifyVerify chain integrity and signatures for all packs.
--verify --pack <path>Verify a specific pack.
--listList all Evidence Packs with metadata.
--export <path>Export all Evidence Packs to a zip archive.

Environment variables

VariableDescription
VYB_SPECOverride spec file path. Equivalent to --spec.
VYB_EVIDENCE_DIROverride evidence output directory.
VYB_NO_COLORDisable color output (1 to disable).
VYB_CIForce CI mode (1 to enable). Equivalent to --ci.
VYB_PRIVATE_KEYEd25519 private key for signing (PEM, base64). Overrides the auto-generated key.
VYB_LOG_LEVELLog verbosity: error, warn, info, debug. Default: warn.

Global flags

All commands accept:

FlagDescription
--versionPrint version and exit.
--helpShow command help.
--spec <path>Override spec file path.