Skip to content

CLI Commands

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.

Terminal window
verikt guide [flags]
FlagDescriptionDefault
--targetAI tool target (all, claude, cursor, copilot, windsurf)all
--pathPath to project.
--outputOutput format (terminal, file)terminal
Terminal window
# Generate context for any AI agent
verikt guide
# Target Claude Code specifically
verikt guide --target claude
# Target Cursor
verikt guide --target cursor

Scaffold a new project.

Terminal window
verikt new [name] [flags]
FlagDescriptionDefault
--nameProject/service namepositional arg
--archArchitecture pattern (hexagonal, flat)hexagonal
--capCapabilities (comma-separated)none
--moduleGo module pathexample.com/<name>
--output-dirOutput directory.
--no-wizardDisable interactive wizardfalse
--setTemplate variable (key=value), repeatablenone
--languageProject languagego

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.

Terminal window
# Use detected Go version (default)
verikt new my-service --language go --no-wizard
# Target a specific Go version
verikt new my-service --language go --set GoVersion=1.24 --no-wizard

See the Feature Matrix for the full list of version-gated features.

Terminal window
# Interactive wizard — guides you through every choice
verikt new my-service --language go
# Non-interactive with all options
verikt 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 explicitly
verikt new my-service --language go --set GoVersion=1.24 --no-wizard

Validate a project against its verikt.yaml rules.

Terminal window
verikt check [flags]
FlagDescriptionDefault
--pathPath to project.
--outputOutput format (terminal, json)terminal

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
CodeMeaning
0All checks pass
1One or more violations found
verikt check
Architecture: hexagonal
Components: 4 defined
Dependency Violations: 0
Structure Issues: 0
Function Issues: 0
Component Coverage: 100% (4/4)
Compliance: 100%
✓ All checks passed

Analyze an existing project’s architecture.

Terminal window
verikt analyze [flags]
FlagDescriptionDefault
--pathPath to project.
--outputOutput format (terminal, json)terminal

Add one or more capabilities to an existing project.

Terminal window
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.

  1. Finds verikt.yaml in the current directory
  2. Validates that each capability exists and doesn’t conflict
  3. Auto-resolves transitive dependencies (e.g., bff pulls in http-api)
  4. Renders only new capability files, skipping any that already exist on disk
  5. Updates verikt.yaml with the new capabilities
  6. Regenerates verikt guide output
Terminal window
# Add a single capability
verikt add redis
# Add multiple capabilities at once
verikt add kafka-consumer observability
# Add a capability with transitive deps
verikt add bff # auto-adds http-api if not present
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 added
Auto-resolved dependencies: http-api

Show structural drift between verikt.yaml and files on disk. Like terraform plan for code architecture.

Terminal window
verikt diff [flags]
FlagDescriptionDefault
--pathProject path to diff.
-o, --outputOutput format (terminal, json, markdown)terminal

For each capability declared in verikt.yaml, diff checks whether the expected files exist:

StatusMeaning
okAll expected files are present
partialSome files present, some missing
missingAll 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.

Terminal window
# Check drift in current project
verikt diff
# Check a specific project
verikt diff --path ./my-service
# Get JSON output for CI
verikt diff -o json
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.12

Initialize an verikt.yaml for an existing project.

Terminal window
verikt init [flags]
FlagDescriptionDefault
--pathPath to project.
--no-wizardSkip interactive wizardfalse
--forceOverwrite existing verikt.yamlfalse

Print version, commit hash, and build date.

Terminal window
verikt version
verikt version 1.0.0
commit: 6d22600
built: 2026-03-11T12:00:00Z

These flags are available on all commands:

FlagDescriptionDefault
--no-colorDisable colored outputfalse
-o, --outputOutput format (terminal, json, markdown)terminal