Skip to content

Quick Start with CLI

  1. Scaffold your service

    Terminal window
    verikt new my-service

    You’ll pick a service name, choose your language (Go or TypeScript), select an architecture (hexagonal, layered, clean, or flat), multi-select capabilities, and accept or skip smart suggestions.

  2. Explore what you got

    my-service/
    ├── cmd/my-service/main.go # Thin entry point (15 lines)
    ├── internal/bootstrap/bootstrap.go # All dependency wiring
    ├── domain/ # Business logic (zero deps)
    │ ├── errors.go # Typed domain errors
    │ └── clock.go # Testable time abstraction
    ├── port/ # Interfaces
    │ ├── inbound.go # Use case interfaces
    │ └── outbound.go # Repository interfaces
    ├── service/ # Use case implementations
    ├── adapter/ # External integrations
    │ ├── httphandler/ # REST API (Chi router)
    │ └── mysqlrepo/ # MySQL repositories
    ├── config/ # YAML config loading
    ├── platform/ # Logging, OTel, lifecycle
    ├── docs/PROJECT.md # Full project anatomy
    ├── verikt.yaml # Architecture rules
    └── go.mod
  3. Run it

    Terminal window
    cd my-service
    go run ./cmd/my-service
  4. Validate the architecture

    Terminal window
    verikt check

    This catches dependency violations, missing directories, function complexity issues, and anti-patterns. Go uses 11 AST-based detectors; TypeScript uses tree-sitter import graph analysis.