Skip to content

CLI Reference

mir [OPTIONS] [PATHS]...

Paths default to the current directory when omitted.

FlagDefaultDescription
--format <FORMAT>textOutput format (see below)
--show-infooffInclude info-level issues (redundancies, style)
-j, --threads <N>CPU countParallelism
--cache-dir <DIR>offEnable incremental cache in DIR
--statsoffPrint file count, error/warning totals, elapsed time
-v, --verboseoffPrint per-file issue counts
-q, --quietoffSuppress all output; use exit code only
--no-progressoffDisable the progress bar
--php-version <X.Y>Target PHP version (e.g. 8.2)
-c, --config <FILE>autoConfig file (mir.xml / psalm.xml auto-discovered)
--baseline <FILE>offSuppress issues listed in a baseline XML
--error-level <1-8>Override global error level (1 = errors only)
--set-baseline [FILE]Write all current issues to a baseline file and exit
--update-baselineoffRemove resolved issues from the baseline
--ignore-baselineoffReport all issues, ignoring the baseline
--versionPrint version
FormatUse case
textDefault terminal output with colors
jsonMachine-readable array of issue objects
githubGitHub Actions annotations (::error file=…)
junitJUnit XML — compatible with most CI systems
sarifSARIF 2.1.0 — GitHub Code Scanning / VS Code
CodeMeaning
0No errors found
1One or more errors found
Terminal window
# Basic analysis
mir src/
# CI with GitHub Actions annotations
mir --format github --no-progress src/
# JUnit XML output for CI systems
mir --format junit --no-progress src/ > results.xml
# Target a specific PHP version
mir --php-version 8.2 src/