Command Description Example
pmat --versionDisplay version pmat --version
pmat helpShow help pmat help analyze
pmat initInitialize project pmat init --template=enterprise
pmat statusCheck project status pmat status --detailed
Command Description Example
pmat analyzeRun standard analysis pmat analyze .
pmat scanQuick scan pmat scan --focus=security
pmat watchContinuous monitoring pmat watch --on-change
pmat analyze tdgTechnical debt grading pmat analyze tdg --detailed
pmat complexityComplexity analysis pmat complexity --by-function
pmat similarityCode similarity pmat similarity --threshold=0.8
pmat dead-codeDead code detection pmat dead-code --export-list
pmat satdSATD detection pmat satd --priority=high
Command Description Example
pmat config listList configuration pmat config list
pmat config getGet config value pmat config get quality.min_grade
pmat config setSet config value pmat config set analysis.parallel true
pmat config resetReset to defaults pmat config reset --all
pmat config profilesManage profiles pmat config profiles switch prod
pmat config exportExport config pmat config export > config.toml
pmat config importImport config pmat config import config.toml
Command Description Example
pmat memory statsMemory statistics pmat memory stats --verbose
pmat memory cleanupClean up memory pmat memory cleanup --force-gc
pmat memory configureConfigure limits pmat memory configure --max-heap 500
pmat memory poolsPool statistics pmat memory pools
pmat memory pressureMemory pressure pmat memory pressure
Command Description Example
pmat cache statsCache statistics pmat cache stats --verbose
pmat cache clearClear cache pmat cache clear --all
pmat cache optimizeOptimize cache pmat cache optimize
pmat cache warmupWarmup cache pmat cache warmup
pmat cache configureConfigure cache pmat cache configure --eviction lru
Command Description Example
pmat security scanSecurity scan pmat security scan --severity=critical
pmat dependenciesDependency check pmat dependencies --check-vulnerabilities
Command Description Example
pmat serveStart API server pmat serve --port 8080
pmat serve --metricsServer with metrics pmat serve --metrics --verbose
pmat roadmap initInitialize sprint pmat roadmap init --sprint v1.0
pmat roadmap todosGenerate todos pmat roadmap todos --format markdown
pmat roadmap startStart task pmat roadmap start PMAT-001
pmat roadmap completeComplete task pmat roadmap complete PMAT-001 --quality-check
pmat roadmap statusSprint status pmat roadmap status --format json
pmat roadmap validateValidate release pmat roadmap validate
pmat roadmap quality-checkQuality validation pmat roadmap quality-check PMAT-001
Command Description Example
pmat agent startStart background agent pmat agent start --project-path .
pmat agent stopStop agent daemon pmat agent stop
pmat agent statusShow agent status pmat agent status --verbose
pmat agent healthHealth check pmat agent health
pmat agent monitorMonitor project pmat agent monitor --project-id main
pmat agent unmonitorStop monitoring pmat agent unmonitor --project-id main
pmat agent reloadReload configuration pmat agent reload
pmat agent quality-gateQuality gate via agent pmat agent quality-gate --strict
pmat agent mcp-serverStart MCP server pmat agent mcp-server --debug
Command Description Example
pmat refactor autoAutomated refactoring pmat refactor auto --quality-profile extreme
pmat refactor interactiveInteractive refactoring pmat refactor interactive --target-complexity 8
pmat refactor serveBatch processing server pmat refactor serve --port 8080
pmat refactor statusRefactoring status pmat refactor status
pmat refactor resumeResume from checkpoint pmat refactor resume --checkpoint state.json
pmat refactor docsDocumentation cleanup pmat refactor docs --dry-run
Command Description Example
pmat listList available templates pmat list --format json
pmat searchSearch templates pmat search "web" --limit 10
pmat generateGenerate single template pmat generate rust cli -p name=app
pmat validateValidate template params pmat validate rust web
pmat scaffold projectScaffold complete project pmat scaffold project rust-api --name api
pmat scaffold agentScaffold MCP agent pmat scaffold agent deterministic --name agent
pmat scaffold list-templatesList agent templates pmat scaffold list-templates
pmat scaffold validate-templateValidate agent template pmat scaffold validate-template agent.yaml
Command Description Example
pmat diagnoseRun system diagnostics pmat diagnose --verbose
pmat diagnose --format jsonJSON diagnostic output pmat diagnose --format json > report.json
pmat diagnose --onlyTest specific features pmat diagnose --only cache --only analysis
pmat diagnose --skipSkip features pmat diagnose --skip telemetry
pmat diagnose --timeoutSet timeout pmat diagnose --timeout 30
pmat diagnose --troubleshootTroubleshooting mode pmat diagnose --troubleshoot
pmat diagnose --repair-cacheRepair cache pmat diagnose --repair-cache
pmat diagnose --serveStart diagnostic server pmat diagnose --serve --port 8090
Command Description Example
pmat test performanceRun performance tests pmat test performance --verbose
pmat test propertyProperty-based testing pmat test property --cases 10000
pmat test memoryMemory usage testing pmat test memory --detect-leaks
pmat test throughputThroughput testing pmat test throughput --rps 1000
pmat test regressionRegression detection pmat test regression --threshold 5
pmat test integrationIntegration tests pmat test integration --full-stack
pmat test allRun all test suites pmat test all --timeout 300
pmat test --baselineCreate baseline pmat test performance --baseline
pmat secretsSecret detection pmat secrets scan --all-history
pmat complianceCompliance check pmat compliance --standard=SOC2
pmat auditSecurity audit pmat audit --comprehensive
Command Description Example
pmat reportGenerate report pmat report --format=html
pmat report executiveExecutive summary pmat report executive --period=monthly
pmat exportExport data pmat export --format=json
pmat importImport data pmat import results.json
pmat compareCompare analyses pmat compare baseline.json current.json
pmat diffShow differences pmat diff --from=main --to=feature
pmat mergeMerge reports pmat merge *.json --output=combined.json
Command Description Example
pmat performance analyzePerformance analysis pmat performance analyze
pmat performance hotspotsFind hotspots pmat performance hotspots --top=10
pmat performance memoryMemory analysis pmat performance memory --leak-detection
pmat performance compareCompare performance pmat performance compare --baseline=main
Command Description Example
pmat architecture analyzeArchitecture analysis pmat architecture analyze
pmat architecture depsDependency analysis pmat architecture deps --circular
pmat architecture patternsPattern detection pmat architecture patterns --detect=all
pmat architecture validate-layersLayer validation pmat architecture validate-layers
pmat architecture graphGenerate graph pmat architecture graph --output=deps.svg
Command Description Example
pmat quality-gateCheck quality gates pmat quality-gate --min-grade=B+
pmat repo-scoreRepository health score pmat repo-score . --format json
pmat rust-project-scoreRust-specific quality score pmat rust-project-score --full
pmat popper-scorePopper falsifiability score pmat popper-score --verbose
pmat perfection-scoreUnified 200-point quality score pmat perfection-score --fast --breakdown
pmat validateValidate project pmat validate --strict
pmat checkRun all checks pmat check --all
Command Description Example
pmat spec scorePopperian spec validation pmat spec score docs/spec.md --verbose
pmat spec complyAuto-fix spec issues pmat spec comply docs/spec.md --dry-run
pmat spec createCreate specification template pmat spec create "Feature Name" --issue "#123"
pmat spec listList all specifications pmat spec list docs/specifications/ --failing-only
Command Description Example
pmat team setupSetup team pmat team setup
pmat review preparePrepare review pmat review prepare --pr-number=123
pmat dashboard serveStart dashboard pmat dashboard serve --port=8080
pmat retrospectiveGenerate retrospective pmat retrospective generate
Command Description Example
pmat serveStart HTTP API server pmat serve --port=8080 --cors
pmat webhookManage webhooks pmat webhook create
pmat notifySend notifications pmat notify slack --channel=#alerts
pmat pipelinePipeline integration pmat pipeline validate
Command Description Example
pmat plugin listList plugins pmat plugin list
pmat plugin installInstall plugin pmat plugin install swift-analyzer
pmat plugin updateUpdate plugins pmat plugin update --all
Command Description Example
pmat ai analyzeAI analysis pmat ai analyze --explain-violations
pmat ai suggestGet suggestions pmat ai suggest-improvements
pmat ai refactorAI refactoring pmat ai refactor --preview
pmat ai reviewAI code review pmat ai review-pr --number=123
Command Description Example
pmat prompt showView workflow prompts pmat prompt show code-coverage
pmat prompt show --listList all prompts pmat prompt show --list
pmat prompt generateGenerate defect-aware prompt pmat prompt generate --task "Add auth" --summary org.yaml
pmat prompt ticketEXTREME TDD ticket workflow pmat prompt ticket ticket-123.md --summary org.yaml
pmat prompt implementSpec-based implementation pmat prompt implement docs/spec.md
pmat prompt scaffold-new-repoNew repo setup pmat prompt scaffold-new-repo docs/spec.md --include-pmat
Command Description Example
pmat org analyzeAnalyze GitHub organization pmat org analyze --org mycompany --output report.yaml
pmat org analyze --summarizeAnalyze and summarize pmat org analyze --org mycompany --summarize --strip-pii
Command Description Example
pmat doctorDiagnostics pmat doctor --fix
pmat debugDebug mode pmat debug --trace
pmat benchmarkBenchmarking pmat benchmark --iterations=100
pmat infoSystem info pmat info --environment
Command Description Example
pmat rules initInitialize rules pmat rules init
pmat rules createCreate rule pmat rules create --name=no-console-log
pmat rules testTest rules pmat rules test --all
pmat rules validateValidate rules pmat rules validate
Command Description Example
pmat clippy enableEnable clippy pmat clippy enable
pmat clippy runRun clippy pmat clippy run --format=json
pmat clippy fixAuto-fix issues pmat clippy fix --safe
Command Description Example
pmat hooks installInstall hooks pmat hooks install --pre-commit
pmat hooks runRun hooks pmat hooks run pre-commit
pmat hooks configureConfigure hooks pmat hooks configure
Option Description Example
--config <path>Use specific config --config custom.toml
--profile <name>Use profile --profile production
--format <type>Output format --format json
--output <path>Output file --output report.html
--quietSuppress output --quiet
--verboseVerbose output --verbose
--debugDebug output --debug
--dry-runPreview only --dry-run
--parallelParallel processing --parallel
--helpShow help --help
pmat analyze . --quick && pmat quality-gate --min-grade=B+
pmat analyze . --comprehensive && pmat report --format=html
pmat security scan --severity=high && pmat notify slack
pmat analyze --incremental --since=main | pmat quality-gate
pmat dashboard generate --team=backend && pmat dashboard serve
Variable Description Example
PMAT_CONFIG_PATHConfig file path /opt/pmat/config.toml
PMAT_PROFILEActive profile production
PMAT_MAX_THREADSThread limit 16
PMAT_MEMORY_LIMITMemory limit 8G
PMAT_CACHE_DIRCache directory /tmp/pmat-cache
PMAT_API_TOKENAPI token your-token
PMAT_DEBUGDebug mode 1
PMAT_LOG_LEVELLog level debug
Code Meaning
0 Success
1 General error
2 Configuration error
3 Analysis failure
4 Quality gate failure
5 Security violation
10 Invalid arguments
11 Missing dependencies
12 Network error
20 License error
alias pa='pmat analyze'
alias pq='pmat quality-gate'
alias ps='pmat status'
find . -type d -name "src" | xargs -I {} pmat analyze {}
pmat analyze . --format=json | jq '.violations[] | select(.severity=="error")'
watch -n 60 'pmat status --detailed'
pmat analyze . || exit $?
PMAT includes extensive runnable examples demonstrating various features. All examples are located in the server/examples/ directory and can be run using Cargo.
# From the paiml-mcp-agent-toolkit directory
cd server
cargo run --example <example_name>
Category Example Description
Quality Analysis quality_gateComprehensive quality gate demonstration
analyze_complexityComplexity analysis with CI/CD integration
analyze_dead_codeDead code detection with thresholds
analyze_satdSelf-Admitted Technical Debt detection
quality_proxy_demoQuality Proxy for AI-generated code
perfection_score_demoUnified 200-point perfection score
work_commands_demoWork management commands
MCP Integration mcp_server_pmcpMCP server using pmcp SDK
unified_mcp_demoUnified MCP server architecture
pmcp_analyze_workflowMCP analyze workflow
Mutation Testing rust_mutation_workflowRust mutation testing
typescript_mutation_workflowTypeScript mutation testing
python_mutation_workflowPython mutation testing
cargo_mutants_detectCargo mutants integration
CI/CD ci_integrationMulti-platform CI/CD examples
exit_codesExit code behavior reference
Agent Scaffolding scaffold_agent_basicsBasic MCP agent setup
scaffold_agent_hybridHybrid agent patterns
scaffold_agent_interactiveInteractive agents
GitHub Integration analyze_github_repoAnalyze GitHub repositories
check_github_repoGitHub repository checks
organizational_intelligence_integrationOrg-wide analysis
Semantic Search semantic_search_demoCode semantic search
similarity_demoCode similarity detection
Debugging recording_capture_demoTime-travel debugging
complexity_demoComplexity pattern testing
# Quality gate check
cargo run --example quality_gate
# Perfection score demo (200-point scale)
cargo run --example perfection_score_demo
# Analyze complexity
cargo run --example analyze_complexity
# MCP server demo
cargo run --example mcp_server_pmcp
# GitHub repo analysis
cargo run --example analyze_github_repo
# Mutation testing workflow
cargo run --example rust_mutation_workflow
Run ls server/examples/*.rs to see all 67+ available examples.
pmat help - General help
pmat help <command> - Command-specific help
pmat <command> --help - Alternative help syntax
pmat doctor - Diagnose issues
pmat info - System information