Appendix B: Quick Command Reference

Essential Commands

CommandDescriptionExample
pmat --versionDisplay versionpmat --version
pmat helpShow helppmat help analyze
pmat initInitialize projectpmat init --template=enterprise
pmat statusCheck project statuspmat status --detailed

Analysis Commands

CommandDescriptionExample
pmat analyzeRun standard analysispmat analyze .
pmat scanQuick scanpmat scan --focus=security
pmat watchContinuous monitoringpmat watch --on-change
pmat analyze tdgTechnical debt gradingpmat analyze tdg --detailed
pmat complexityComplexity analysispmat complexity --by-function
pmat similarityCode similaritypmat similarity --threshold=0.8
pmat dead-codeDead code detectionpmat dead-code --export-list
pmat satdSATD detectionpmat satd --priority=high

Configuration

CommandDescriptionExample
pmat config listList configurationpmat config list
pmat config getGet config valuepmat config get quality.min_grade
pmat config setSet config valuepmat config set analysis.parallel true
pmat config resetReset to defaultspmat config reset --all
pmat config profilesManage profilespmat config profiles switch prod
pmat config exportExport configpmat config export > config.toml
pmat config importImport configpmat config import config.toml

Memory Management

CommandDescriptionExample
pmat memory statsMemory statisticspmat memory stats --verbose
pmat memory cleanupClean up memorypmat memory cleanup --force-gc
pmat memory configureConfigure limitspmat memory configure --max-heap 500
pmat memory poolsPool statisticspmat memory pools
pmat memory pressureMemory pressurepmat memory pressure

Cache Management

CommandDescriptionExample
pmat cache statsCache statisticspmat cache stats --verbose
pmat cache clearClear cachepmat cache clear --all
pmat cache optimizeOptimize cachepmat cache optimize
pmat cache warmupWarmup cachepmat cache warmup
pmat cache configureConfigure cachepmat cache configure --eviction lru

Security

CommandDescriptionExample
pmat security scanSecurity scanpmat security scan --severity=critical
pmat dependenciesDependency checkpmat dependencies --check-vulnerabilities

API Server & Roadmap

CommandDescriptionExample
pmat serveStart API serverpmat serve --port 8080
pmat serve --metricsServer with metricspmat serve --metrics --verbose
pmat roadmap initInitialize sprintpmat roadmap init --sprint v1.0
pmat roadmap todosGenerate todospmat roadmap todos --format markdown
pmat roadmap startStart taskpmat roadmap start PMAT-001
pmat roadmap completeComplete taskpmat roadmap complete PMAT-001 --quality-check
pmat roadmap statusSprint statuspmat roadmap status --format json
pmat roadmap validateValidate releasepmat roadmap validate
pmat roadmap quality-checkQuality validationpmat roadmap quality-check PMAT-001

Agent Management

CommandDescriptionExample
pmat agent startStart background agentpmat agent start --project-path .
pmat agent stopStop agent daemonpmat agent stop
pmat agent statusShow agent statuspmat agent status --verbose
pmat agent healthHealth checkpmat agent health
pmat agent monitorMonitor projectpmat agent monitor --project-id main
pmat agent unmonitorStop monitoringpmat agent unmonitor --project-id main
pmat agent reloadReload configurationpmat agent reload
pmat agent quality-gateQuality gate via agentpmat agent quality-gate --strict
pmat agent mcp-serverStart MCP serverpmat agent mcp-server --debug

AI-Powered Refactoring

CommandDescriptionExample
pmat refactor autoAutomated refactoringpmat refactor auto --quality-profile extreme
pmat refactor interactiveInteractive refactoringpmat refactor interactive --target-complexity 8
pmat refactor serveBatch processing serverpmat refactor serve --port 8080
pmat refactor statusRefactoring statuspmat refactor status
pmat refactor resumeResume from checkpointpmat refactor resume --checkpoint state.json
pmat refactor docsDocumentation cleanuppmat refactor docs --dry-run

Template Generation & Scaffolding

CommandDescriptionExample
pmat listList available templatespmat list --format json
pmat searchSearch templatespmat search "web" --limit 10
pmat generateGenerate single templatepmat generate rust cli -p name=app
pmat validateValidate template paramspmat validate rust web
pmat scaffold projectScaffold complete projectpmat scaffold project rust-api --name api
pmat scaffold agentScaffold MCP agentpmat scaffold agent deterministic --name agent
pmat scaffold list-templatesList agent templatespmat scaffold list-templates
pmat scaffold validate-templateValidate agent templatepmat scaffold validate-template agent.yaml

System Diagnostics

CommandDescriptionExample
pmat diagnoseRun system diagnosticspmat diagnose --verbose
pmat diagnose --format jsonJSON diagnostic outputpmat diagnose --format json > report.json
pmat diagnose --onlyTest specific featurespmat diagnose --only cache --only analysis
pmat diagnose --skipSkip featurespmat diagnose --skip telemetry
pmat diagnose --timeoutSet timeoutpmat diagnose --timeout 30
pmat diagnose --troubleshootTroubleshooting modepmat diagnose --troubleshoot
pmat diagnose --repair-cacheRepair cachepmat diagnose --repair-cache
pmat diagnose --serveStart diagnostic serverpmat diagnose --serve --port 8090

Performance Testing

CommandDescriptionExample
pmat test performanceRun performance testspmat test performance --verbose
pmat test propertyProperty-based testingpmat test property --cases 10000
pmat test memoryMemory usage testingpmat test memory --detect-leaks
pmat test throughputThroughput testingpmat test throughput --rps 1000
pmat test regressionRegression detectionpmat test regression --threshold 5
pmat test integrationIntegration testspmat test integration --full-stack
pmat test allRun all test suitespmat test all --timeout 300
pmat test --baselineCreate baselinepmat test performance --baseline
pmat secretsSecret detectionpmat secrets scan --all-history
pmat complianceCompliance checkpmat compliance --standard=SOC2
pmat auditSecurity auditpmat audit --comprehensive

Reporting

CommandDescriptionExample
pmat reportGenerate reportpmat report --format=html
pmat report executiveExecutive summarypmat report executive --period=monthly
pmat exportExport datapmat export --format=json
pmat importImport datapmat import results.json
pmat compareCompare analysespmat compare baseline.json current.json
pmat diffShow differencespmat diff --from=main --to=feature
pmat mergeMerge reportspmat merge *.json --output=combined.json

Performance

CommandDescriptionExample
pmat performance analyzePerformance analysispmat performance analyze
pmat performance hotspotsFind hotspotspmat performance hotspots --top=10
pmat performance memoryMemory analysispmat performance memory --leak-detection
pmat performance compareCompare performancepmat performance compare --baseline=main

Architecture

CommandDescriptionExample
pmat architecture analyzeArchitecture analysispmat architecture analyze
pmat architecture depsDependency analysispmat architecture deps --circular
pmat architecture patternsPattern detectionpmat architecture patterns --detect=all
pmat architecture validate-layersLayer validationpmat architecture validate-layers
pmat architecture graphGenerate graphpmat architecture graph --output=deps.svg

Quality Gates

CommandDescriptionExample
pmat quality-gateCheck quality gatespmat quality-gate --min-grade=B+
pmat validateValidate projectpmat validate --strict
pmat checkRun all checkspmat check --all

Team Collaboration

CommandDescriptionExample
pmat team setupSetup teampmat team setup
pmat review preparePrepare reviewpmat review prepare --pr-number=123
pmat dashboard serveStart dashboardpmat dashboard serve --port=8080
pmat retrospectiveGenerate retrospectivepmat retrospective generate

Integration

CommandDescriptionExample
pmat serveStart HTTP API serverpmat serve --port=8080 --cors
pmat webhookManage webhookspmat webhook create
pmat notifySend notificationspmat notify slack --channel=#alerts
pmat pipelinePipeline integrationpmat pipeline validate

Plugins

CommandDescriptionExample
pmat plugin listList pluginspmat plugin list
pmat plugin installInstall pluginpmat plugin install swift-analyzer
pmat plugin updateUpdate pluginspmat plugin update --all

AI Features

CommandDescriptionExample
pmat ai analyzeAI analysispmat ai analyze --explain-violations
pmat ai suggestGet suggestionspmat ai suggest-improvements
pmat ai refactorAI refactoringpmat ai refactor --preview
pmat ai reviewAI code reviewpmat ai review-pr --number=123

Utilities

CommandDescriptionExample
pmat doctorDiagnosticspmat doctor --fix
pmat debugDebug modepmat debug --trace
pmat benchmarkBenchmarkingpmat benchmark --iterations=100
pmat infoSystem infopmat info --environment

Custom Rules

CommandDescriptionExample
pmat rules initInitialize rulespmat rules init
pmat rules createCreate rulepmat rules create --name=no-console-log
pmat rules testTest rulespmat rules test --all
pmat rules validateValidate rulespmat rules validate

Auto-clippy

CommandDescriptionExample
pmat clippy enableEnable clippypmat clippy enable
pmat clippy runRun clippypmat clippy run --format=json
pmat clippy fixAuto-fix issuespmat clippy fix --safe

Hooks

CommandDescriptionExample
pmat hooks installInstall hookspmat hooks install --pre-commit
pmat hooks runRun hookspmat hooks run pre-commit
pmat hooks configureConfigure hookspmat hooks configure

Global Options

OptionDescriptionExample
--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

Common Workflows

Quick Quality Check

pmat analyze . --quick && pmat quality-gate --min-grade=B+

Full Analysis with Report

pmat analyze . --comprehensive && pmat report --format=html

Security Scan

pmat security scan --severity=high && pmat notify slack

Incremental CI/CD Analysis

pmat analyze --incremental --since=main | pmat quality-gate

Team Dashboard

pmat dashboard generate --team=backend && pmat dashboard serve

Environment Variables

VariableDescriptionExample
PMAT_CONFIG_PATHConfig file path/opt/pmat/config.toml
PMAT_PROFILEActive profileproduction
PMAT_MAX_THREADSThread limit16
PMAT_MEMORY_LIMITMemory limit8G
PMAT_CACHE_DIRCache directory/tmp/pmat-cache
PMAT_API_TOKENAPI tokenyour-token
PMAT_DEBUGDebug mode1
PMAT_LOG_LEVELLog leveldebug

Exit Codes

CodeMeaning
0Success
1General error
2Configuration error
3Analysis failure
4Quality gate failure
5Security violation
10Invalid arguments
11Missing dependencies
12Network error
20License error

Tips and Tricks

Create Aliases

alias pa='pmat analyze'
alias pq='pmat quality-gate'
alias ps='pmat status'

Batch Analysis

find . -type d -name "src" | xargs -I {} pmat analyze {}

JSON Processing

pmat analyze . --format=json | jq '.violations[] | select(.severity=="error")'

Continuous Monitoring

watch -n 60 'pmat status --detailed'

Pipeline Integration

pmat analyze . || exit $?

Getting Help

  • pmat help - General help
  • pmat help <command> - Command-specific help
  • pmat <command> --help - Alternative help syntax
  • pmat doctor - Diagnose issues
  • pmat info - System information

See Also