CLI Reference
All 15+ commands for the Mikk CLI — with options, flags, and examples.
Installation
npm install -g @getmikk/clibun add -g @getmikk/cliCore Commands
mikk init
Full codebase scan. Builds the dependency graph, detects modules, writes all artifacts.
cd my-project
mikk initProp
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 diffAdded: 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 3Prop
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 5mikk 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 contractmikk 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 / layerUse --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 statusIntent 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" --verboseMCP Commands
Start the MCP server.
mikk mcp
mikk mcp --port 3333 # custom port (default: 3000)
mikk mcp --watch # auto-restart on file changesAuto-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 CopilotVisualization Commands
mikk visualize all # regenerate all 8 diagram types
mikk visualize module auth # specific module
mikk visualize impact src/auth/login.ts # blast radius diagramUtility Commands
Prop
Type
Was this page helpful?
VS Code Extension
The Mikk VS Code extension brings codebase intelligence directly into your editor — module tree, impact analysis, AI context, and MCP integration.
MCP Server
Connect Mikk to Claude Desktop, Cursor, and VS Code Copilot. 18 tools, 3 resources, millisecond responses - all grounded in your real codebase graph.