CLI Reference

Complete reference for all dokkimi CLI commands.

Commands overview

CommandDescription
dokkimi initScaffold a .dokkimi/ folder with example files
dokkimi validate [path]Validate definition files without running
dokkimi run [target]Run definition(s) and stream live results
dokkimi inspect [path]Interactively inspect results from the last run
dokkimi dump [path]Output raw JSON data dump for debugging
dokkimi baselinesReview and approve pending visual baselines
dokkimi junitGenerate a JUnit XML report from a test run
dokkimi doctorRun environment pre-flight checks
dokkimi stopStop the current test run
dokkimi statusShow service and instance status
dokkimi cleanStop all instances and clean up resources
dokkimi rebootRestart all Dokkimi services
dokkimi shutdownStop all running Dokkimi services
dokkimi configView and edit Dokkimi settings
dokkimi mcpStart the MCP server (for AI tool integration)
dokkimi uninstallRemove Dokkimi data, images, and services
dokkimi versionShow installed version

dokkimi run

Resolves definitions, submits them, and streams live status. Exits with code 0 if all pass, 1 if any fail.

Target argument

The target is flexible, similar to Jest:

# Path-based targets
dokkimi run                          # .dokkimi/ in cwd (or nearest parent)
dokkimi run /path/to/project         # Finds /path/to/project/.dokkimi/
dokkimi run .dokkimi/                # Explicit .dokkimi/ directory
dokkimi run .dokkimi/auth-tests      # Only definitions in that subfolder
dokkimi run .dokkimi/auth.json       # A specific definition file

# Pattern-based targets (matches file names/paths within .dokkimi/)
dokkimi run auth                     # Substring match
dokkimi run "auth/**"                # Glob pattern
dokkimi run "auth.*service"          # Regex pattern

Watch mode

dokkimi run --watch
dokkimi run auth --watch

Watches .dokkimi/**/*.{json,yml,yaml} for changes (500ms debounce).

Keyboard controls:

Run flags

FlagDescription
--watch, -wRe-run automatically when definition files change
--ciCI-optimized output (no interactive UI, exits with code 0/1)
--failedRe-run only definitions that failed in the last run
--timeout <seconds>Fail if not complete within the timeout (default: 600 in CI mode)
--junit <path>Write a JUnit XML report to the given path after the run completes

Post-run inspect prompt

After a run completes (TTY only, non-watch), the CLI prompts: Press i to inspect results, or any other key to exit.... In CI/non-TTY environments, this is skipped.

dokkimi inspect

Full-screen interactive TUI for drilling into test results and traffic logs. Uses the terminal's alternate screen buffer.

Navigation

Per-definition drill-down

Per-step detail view

Selecting a log item opens it as a temp file in your $EDITOR (defaults to code).

dokkimi baselines

Interactive TUI for reviewing and approving pending visual baselines from the last run. Uses the alternate screen buffer.

When a test definition includes screenshot sub-steps with match: true, Dokkimi compares captures against baselines stored in .dokkimi/<project>/baselines/. New captures (no baseline yet) and failed diffs appear as pending baselines.

Navigation

Three-level drill-down: tests → baselines → detail.

Approved baselines are written to .dokkimi/<project>/baselines/. Commit the changes to git so they travel with the test definitions.

Also accessible via the b key after a run completes (when pending baselines are detected).

dokkimi dump

Outputs a complete JSON data dump of the last run — designed for piping to LLMs or scripts.

dokkimi dump                             # Output to stdout
dokkimi dump -o run-dump.json            # Write to file (streams, low memory)
dokkimi dump --failed -o failures.json   # Only failed instances
dokkimi dump .dokkimi/auth.json -o out.json  # Specific definitions only

Options

OptionDescription
-o, --output <file>Write to file instead of stdout (streams instance-by-instance)
--failedOnly include instances that failed
[path]Filter to definitions matching a file or folder

Output structure

{
  "runId": "...",
  "status": "COMPLETED|FAILED",
  "createdAt": "...",
  "completedAt": "...",
  "instances": [
    {
      "name": "definition-name",
      "status": "...",
      "testStatus": "PASSED|FAILED|null",
      "errorMessage": "...|null",
      "definition": { ... },
      "items": [ ... ],
      "testExecutionLogs": [ ... ],
      "assertionResults": [ ... ],
      "httpLogs": [ ... ],
      "databaseLogs": [ ... ],
      "consoleLogs": [ ... ]
    }
  ]
}

dokkimi junit

Generates a JUnit XML report from a test run. Useful for CI integration and test result aggregation.

dokkimi junit                              # Output XML to stdout
dokkimi junit -o results.xml               # Write to file
dokkimi junit --failed -o failures.xml     # Only failed instances
dokkimi junit --summary                    # Markdown summary instead of XML

Options

OptionDescription
-o, --output <file>Write XML to a file instead of stdout
--summaryOutput a Markdown summary instead of XML
--dir <path>Read XML files from a directory (use with --summary to combine multi-run results)
--run [runId]Target a specific run by ID (defaults to latest)
--failedOnly include instances that failed

GitHub Actions integration

Generate XML during the run with --junit, then produce a Markdown summary for the GitHub Step Summary:

- name: Run tests
  run: dokkimi run .dokkimi/ --ci --junit junit-results.xml

- name: Post summary
  if: always()
  run: dokkimi junit --summary --dir . >> $GITHUB_STEP_SUMMARY

See CI Pipeline for complete workflow examples.

dokkimi doctor

Checks your environment is ready to run tests:

Each check reports pass, warn, or fail with a fix suggestion.

dokkimi validate

dokkimi validate                  # Validate all definitions
dokkimi validate .dokkimi/auth.json  # Validate a specific file

Checks that all $ref paths resolve, schemas are valid, and naming rules are followed — without deploying anything.

Other commands

dokkimi init

Scaffolds a .dokkimi/ folder with example definitions, shared fragments, and init scripts.

dokkimi stop

Stops the current test run without cleaning up resources or history. If no run is active, reports that there is nothing to stop.

dokkimi status

Shows the current state of Dokkimi services and any running test instances.

dokkimi clean

Stops all running instances, removes their Docker networks and containers, and cleans up resources. Use --all to clean across all projects.

dokkimi reboot

Restarts all Dokkimi services (shuts down then re-starts). Use after changing configuration with dokkimi config.

dokkimi shutdown

Stops all running Dokkimi services without restarting them.

dokkimi config

Interactive settings editor. Opens a full-screen menu with categories for concurrency (max parallel environments, max booting environments) and telemetry. Settings are saved to ~/.dokkimi/config.json.

dokkimi mcp

Starts the MCP server in stdio mode for AI tool integration. This is registered automatically on install for Claude Code, Cursor, and Copilot — you typically only need this command to manually restart the server if it stops responding.

dokkimi uninstall

Fully removes Dokkimi: stops services, removes Docker containers/networks/images, deletes ~/.dokkimi/, and removes AI tool configuration entries.

dokkimi version

Prints the installed version.