CLI Commands
verikt guide
Section titled “verikt guide”Generate architecture context for AI coding agents. Reads your verikt.yaml and outputs rules, dependency constraints, and anti-patterns that AI agents consume before writing code.
verikt guide [flags]| Flag | Description | Default |
|---|---|---|
--target | AI tool target (all, claude, cursor, copilot, windsurf) | all |
--path | Path to project | . |
--output | Output format (terminal, file) | terminal |
Examples
Section titled “Examples”# Generate context for any AI agentverikt guide
# Target Claude Code specificallyverikt guide --target claude
# Target Cursorverikt guide --target cursorverikt new
Section titled “verikt new”Scaffold a new project.
verikt new [name] [flags]| Flag | Description | Default |
|---|---|---|
--name | Project/service name | positional arg |
--arch | Architecture pattern (hexagonal, flat) | hexagonal |
--cap | Capabilities (comma-separated) | none |
--module | Go module path | example.com/<name> |
--output-dir | Output directory | . |
--no-wizard | Disable interactive wizard | false |
--set | Template variable (key=value), repeatable | none |
--language | Project language | go |
Version Detection and Features
Section titled “Version Detection and Features”By default, verikt runs go env GOVERSION to detect the installed Go version. The detected version is used to resolve feature flags from the provider’s feature matrix — enabling modern stdlib APIs and language features in the generated code.
You can override the detected version with --set GoVersion=X.XX. This is useful in CI environments or when targeting a specific Go version different from the one installed locally.
# Use detected Go version (default)verikt new my-service --language go --no-wizard
# Target a specific Go versionverikt new my-service --language go --set GoVersion=1.24 --no-wizardSee the Feature Matrix for the full list of version-gated features.
Examples
Section titled “Examples”# Interactive wizard — guides you through every choiceverikt new my-service --language go
# Non-interactive with all optionsverikt new my-service \ --language go \ --arch hexagonal \ --cap platform,bootstrap,http-api,mysql,docker \ --module github.com/myorg/my-service \ --no-wizard
# Target Go 1.24 features explicitlyverikt new my-service --language go --set GoVersion=1.24 --no-wizardverikt check
Section titled “verikt check”Validate a project against its verikt.yaml rules.
verikt check [flags]| Flag | Description | Default |
|---|---|---|
--path | Path to project | . |
--output | Output format (terminal, json) | terminal |
What It Checks
Section titled “What It Checks”verikt runs 11 AST-based detectors:
- Dependency violations — imports that cross component boundaries
- Required directories — components with missing directories
- Forbidden directories — directories that shouldn’t exist
- Function complexity — functions exceeding line/param/return limits
- Component coverage — percentage of components with source files
- Anti-patterns — common architectural violations
Exit Codes
Section titled “Exit Codes”| Code | Meaning |
|---|---|
| 0 | All checks pass |
| 1 | One or more violations found |
Example Output
Section titled “Example Output”verikt check
Architecture: hexagonalComponents: 4 defined
Dependency Violations: 0Structure Issues: 0Function Issues: 0
Component Coverage: 100% (4/4)Compliance: 100%
✓ All checks passedverikt analyze
Section titled “verikt analyze”Analyze an existing project’s architecture.
verikt analyze [flags]| Flag | Description | Default |
|---|---|---|
--path | Path to project | . |
--output | Output format (terminal, json) | terminal |
verikt add
Section titled “verikt add”Add one or more capabilities to an existing project.
verikt add <capability> [capability...] [flags]Capabilities are validated against the provider’s templates, conflicts are checked, and transitive dependencies are auto-resolved. Existing files are never overwritten — only new files are created.
What It Does
Section titled “What It Does”- Finds
verikt.yamlin the current directory - Validates that each capability exists and doesn’t conflict
- Auto-resolves transitive dependencies (e.g.,
bffpulls inhttp-api) - Renders only new capability files, skipping any that already exist on disk
- Updates
verikt.yamlwith the new capabilities - Regenerates
verikt guideoutput
Examples
Section titled “Examples”# Add a single capabilityverikt add redis
# Add multiple capabilities at onceverikt add kafka-consumer observability
# Add a capability with transitive depsverikt add bff # auto-adds http-api if not presentExample Output
Section titled “Example Output”Adding capabilities: + http-api (auto-dependency) + bff Created: adapter/httphandler/handler.go Created: adapter/httphandler/router.go Skipped (exists): config/config.go
Done: 5 files created, 1 files skipped, 2 capabilities addedAuto-resolved dependencies: http-apiverikt diff
Section titled “verikt diff”Show structural drift between verikt.yaml and files on disk. Like terraform plan for code architecture.
verikt diff [flags]| Flag | Description | Default |
|---|---|---|
--path | Project path to diff | . |
-o, --output | Output format (terminal, json, markdown) | terminal |
What It Reports
Section titled “What It Reports”For each capability declared in verikt.yaml, diff checks whether the expected files exist:
| Status | Meaning |
|---|---|
ok | All expected files are present |
partial | Some files present, some missing |
missing | All expected files are missing |
The drift score (0.00 = perfect, 1.00 = completely drifted) tells you how far reality has diverged from the declared architecture.
Examples
Section titled “Examples”# Check drift in current projectverikt diff
# Check a specific projectverikt diff --path ./my-service
# Get JSON output for CIverikt diff -o jsonExample Output
Section titled “Example Output”verikt Diff — hexagonal + 4 capabilities═══════════════════════════════════════════════════════ ✓ architecture all files present ✓ http-api all files present ✗ redis 2 missing files - adapter/redisrepo/connection.go - adapter/redisrepo/repository.go ✓ docker all files present
═══════════════════════════════════════════════════════
Summary: 3/4 capabilities fully present | drift score: 0.12verikt init
Section titled “verikt init”Initialize an verikt.yaml for an existing project.
verikt init [flags]| Flag | Description | Default |
|---|---|---|
--path | Path to project | . |
--no-wizard | Skip interactive wizard | false |
--force | Overwrite existing verikt.yaml | false |
verikt version
Section titled “verikt version”Print version, commit hash, and build date.
verikt versionExample Output
Section titled “Example Output”verikt version 1.0.0commit: 6d22600built: 2026-03-11T12:00:00ZGlobal Flags
Section titled “Global Flags”These flags are available on all commands:
| Flag | Description | Default |
|---|---|---|
--no-color | Disable colored output | false |
-o, --output | Output format (terminal, json, markdown) | terminal |