Mikk
Reference

CLI Reference

All 15+ commands for the Mikk CLI — with options, flags, and examples.

Installation

npm install -g @getmikk/cli
bun add -g @getmikk/cli

Core Commands

mikk init

Full codebase scan. Builds the dependency graph, detects modules, writes all artifacts.

cd my-project
mikk init

Prop

Type


mikk analyze

Re-analyze and update all generated files. Uses incremental analysis — only re-parses files whose Merkle hash changed.

mikk analyze
mikk analyze --full    # force full re-parse (ignore hashes)

mikk watch

Start the live file watcher daemon. Keeps the lock file in sync as you edit code.

mikk watch
mikk watch --debounce 500    # debounce delay in ms (default: 300)

Enforces a single-instance PID daemon — starting mikk watch twice will reuse the existing process, not start a duplicate.


mikk diff

Show what changed since the last analysis.

mikk diff
Added:    src/auth/two-factor.ts
Modified: src/auth/login.ts
Deleted:  src/auth/legacy-auth.ts

3 files changed (1 added, 1 modified, 1 deleted)

Context Commands

mikk context build

Build an AI context payload for a task description.

mikk context build "How does authentication work?"
mikk context build "Refactor the payments module" --tokens 8000
mikk context build "Fix the session bug" --format xml --hops 3

Prop

Type


mikk context impact

Show the full blast radius of changing a file.

mikk context impact src/auth/login.ts
mikk context impact src/auth/login.ts --depth 5

mikk context query

Answer an architecture question using the dependency graph.

mikk context query "Who calls parseToken?"
mikk context query "What does src/api/routes.ts depend on?"

Contract Commands

mikk contract generate

Auto-detect modules and generate an initial mikk.json.

mikk contract generate
mikk contract generate --force    # overwrite existing contract

mikk contract validate

Validate the current codebase against all constraints in mikk.json.

mikk contract validate
mikk contract validate --strict              # exit code 1 on any violation
mikk contract validate --boundaries-only     # check only no-import / layer

Use --strict in CI to fail the build on any constraint violation. Without --strict, validate prints violations but exits with code 0.


mikk contract status

Print a summary of all modules, constraint counts, and current violation state.

mikk contract status

Intent Commands

mikk intent

Validate a plain-English plan against your architecture before writing code. Checks all 6 constraint types.

mikk intent "Add a caching layer to the auth module"
mikk intent "Extract shared validation into utils" --verbose

MCP Commands

Start the MCP server.

mikk mcp
mikk mcp --port 3333     # custom port (default: 3000)
mikk mcp --watch         # auto-restart on file changes

Auto-install Mikk into your AI tool of choice.

mikk mcp install                     # auto-detect installed tools
mikk mcp install --tool claude       # Claude Desktop
mikk mcp install --tool cursor       # Cursor
mikk mcp install --tool vscode       # VS Code Copilot

Visualization Commands

mikk visualize all                        # regenerate all 8 diagram types
mikk visualize module auth                # specific module
mikk visualize impact src/auth/login.ts   # blast radius diagram

Utility Commands

Prop

Type

Was this page helpful?

On this page