Only run checks in these group(s), can be repeated
Profile Options
Option
Description
-p, --profile NAME
Use a check profile (strict, relaxed, ci, release)
--list-profiles
Show available profiles and exit
Exit Behavior
Option
Description
--error-on LEVEL
Minimum severity that causes non-zero exit: error (default), warning, note
--fail-fast
Stop on first failure
Performance Options
Option
Description
--parallel/--no-parallel
Run checks in parallel (default: sequential)
--workers N
Number of worker threads for parallel execution (default: 4)
--cache/--no-cache
Enable caching of check results (default: enabled)
--incremental
Only check files modified since last run
Fix Options
Option
Description
--fix
Automatically fix issues where possible
--dry-run
Show what would be fixed without making changes
Baseline Options
Option
Description
--baseline FILE
Path to baseline JSON file for ignoring known issues
--generate-baseline FILE
Generate baseline file from current failures
Diff Options
Option
Description
--diff FILE
Compare with previous run JSON file
Watch Options
Option
Description
-w, --watch
Watch for changes and re-run checks automatically
Badge Options
Option
Description
--badge FILE
Generate SVG badge to this file
--badge-url
Print shields.io badge URL
Examples
# Check current directorypycmdcheck check# Check a specific packagepycmdcheck check ./my-package# Output as JSONpycmdcheck check --format json# Skip specific checkspycmdcheck check --skip ST001 --skip ST002# Only run structure checkspycmdcheck check --only-group structure# Use strict profilepycmdcheck check --profile strict# Auto-fix issuespycmdcheck check --fix# Preview fixespycmdcheck check --fix--dry-run# Generate baseline from failurespycmdcheck check --generate-baseline baseline.json# Check against baselinepycmdcheck check --baseline baseline.json# Compare with previous runpycmdcheck check --format json -o current.jsonpycmdcheck check --diff previous.json
list
List all available checks.
pycmdcheck list [OPTIONS]
Options
Option
Description
-g, --group GROUP
Filter by check group
--format FORMAT
Output format: table (default), json
Examples
# List all checkspycmdcheck list# Filter by grouppycmdcheck list --group structure# Output as JSONpycmdcheck list --format json
Output
The table output shows:
Column
Description
ID
Check identifier (e.g., ST001)
Name
Human-readable check name
Group
Check group (structure, metadata, etc.)
Severity
ERROR, WARNING, or NOTE
info
Show details for a specific check.
pycmdcheck info CHECK_ID [OPTIONS]
Arguments
Argument
Description
CHECK_ID
Check identifier (e.g., ST001, MT002)
Options
Option
Description
--format FORMAT
Output format: rich (default), json
Examples
# Show check detailspycmdcheck info ST001# Output as JSONpycmdcheck info ST001 --format json
Output
The info output includes:
ID: Check identifier
Name: Human-readable name
Group: Which group the check belongs to
Severity: ERROR, WARNING, or NOTE
Requires: Fixture dependencies
Description: Full documentation for the check
explain
Get a detailed explanation of a check, including what it checks, why it matters, and how to fix issues.
pycmdcheck explain CHECK_ID [OPTIONS]
Arguments
Argument
Description
CHECK_ID
Check identifier (e.g., ST001, TS002) or name
Options
Option
Description
--format FORMAT
Output format: text (default), json, yaml
Examples
# Get explanation for a checkpycmdcheck explain ST001# Output as JSONpycmdcheck explain TS002 --format json# Search by namepycmdcheck explain "HasReadme"
Output
The explain output includes:
What it checks: Description of what the check validates
Why it matters: Explanation of why this check is important
How to fix: Step-by-step instructions to resolve issues
Configuration: Available configuration options for the check
Examples: Example configurations and code
See also: Related checks and external resources
fix
Auto-fix package issues where possible.
pycmdcheck fix [PATH][OPTIONS]
Arguments
Argument
Default
Description
PATH
.
Directory to fix
Options
Option
Description
--dry-run
Show what would be fixed without making changes
--only ID
Only fix specific check IDs (can be repeated)
--skip ID
Skip specific check IDs (can be repeated)
--group GROUP
Only fix checks in specific groups (can be repeated)
-v, --verbose
Show verbose output
Examples
# Preview what would be fixedpycmdcheck fix --dry-run# Fix all fixable issuespycmdcheck fix# Fix only specific checkspycmdcheck fix --only DC002 --only CQ002# Fix checks in a specific grouppycmdcheck fix --group documentation
# Check latest version of a packagepycmdcheck remote requests# Check a specific versionpycmdcheck remote requests --version 2.28.0# Output as JSONpycmdcheck remote requests --format json
profiles
List and inspect available check profiles.
pycmdcheck profiles [OPTIONS]
Options
Option
Description
--format FORMAT
Output format: table (default), json
--show NAME
Show details of a specific profile
Examples
# List all profilespycmdcheck profiles# Output as JSONpycmdcheck profiles --format json# Show details of a specific profilepycmdcheck profiles --show strict
Built-in Profiles
Profile
Description
Error On
strict
Fail on any issue including notes
note
relaxed
Skip informational checks
error
ci
Optimized for CI pipelines
warning
release
Focus on release-critical checks
warning
Common Options
These options are available across most commands:
Version
pycmdcheck--version
Help
# General helppycmdcheck--help# Command-specific helppycmdcheck check --helppycmdcheck fix --help
Exit Codes
Code
Meaning
0
All checks passed (or only notes/skipped)
1
At least one check failed with ERROR severity
2
At least one check failed with WARNING severity (when --error-on warning)
3
Internal error or fixture resolution error
Environment Variables
pycmdcheck supports configuration via environment variables:
Variable
Description
PYCMDCHECK_SKIP
Comma-separated list of check IDs to skip
PYCMDCHECK_ONLY
Comma-separated list of check IDs to run
PYCMDCHECK_PROFILE
Profile to use
PYCMDCHECK_ERROR_ON
Minimum severity for non-zero exit
Environment variables are overridden by CLI options but take precedence over pyproject.toml settings.