| [Basic Analysis & Filtering] |
|
directory |
Target directory to analyze (default: current directory) |
--exclude |
Directories to exclude (e.g. --exclude .git venv node_modules) |
--ext |
File extensions to include (e.g. --ext .py .js) |
--only-lang |
Only analyze specific file extensions, comma separated (e.g. py,js) |
--top N |
Show only the top N files by lines or complexity |
--failures-only |
Show only files with issues (naming, size, complexity, etc.) |
--regex |
User-defined regex rules for custom code checks (space separated, enclose in quotes) |
--file-age |
Show file creation and last modified time |
--uncommitted |
Show stats for files with uncommitted changes (git diff) |
--size |
Show each file's size in bytes as a table |
--list-extensions |
List all languages found in the project with count and percentage |
--min-lines <N> |
Only show files with total lines >= N |
--find <keyword/regex> |
Find all lines matching a keyword or regex in the codebase |
--cache |
Build and use cache for much faster repeated analysis (highly recommended for large codebases) |
--cache-delete |
Delete all cache data in .codestate (force rebuild cache on next run) |
| [Statistics & Detailed Analysis] |
|
--details |
Show detailed statistics for each file |
--dup |
Show duplicate code blocks (5+ lines) |
--maxmin |
Show file with most/least lines |
--langdist |
Show language (file extension) distribution as ASCII pie chart |
--complexitymap |
Show ASCII heatmap of file complexity |
--complexity-graph |
Show an ASCII bar chart of file complexity |
--warnsize |
Warn for large files/functions (optionally specify file and function line thresholds, default 300/50) |
--naming |
Check function/class naming conventions (PEP8, PascalCase) |
--apidoc |
Show API/function/class docstring summaries |
--deadcode |
Show unused (dead) functions/classes in Python files |
--typestats |
Show function parameter/type annotation statistics (Python) |
--trend |
Show line count trend for a specific file |
--refactor-suggest |
Show files/functions that are refactor candidates, with reasons |
--autofix-suggest |
Suggest auto-fix patches for naming, comments, and duplicate code |
--refactor-map |
Show a table of files/functions that are refactor candidates |
--complexity-threshold <value> |
Set custom complexity threshold for warnings (requires a value, e.g. --complexity-threshold 5) |
--open <file> |
Show detailed analysis for a single file |
--blame <file> |
Show git blame statistics for a file |
--compare <dir1> <dir2> |
Compare statistics between two directories |
| [Output / Reports] |
|
--sort <COLUMN> |
Sort output table by files, lines, code, comments, blanks, language |
--html |
Export result as HTML table |
--md |
Export result as Markdown table |
--json |
Export result as JSON |
--csv |
Export summary statistics as CSV |
--excel |
Export summary statistics as Excel (.xlsx) |
--details-csv |
Export per-file details as CSV |
--groupdir-csv |
Export grouped-by-directory stats as CSV |
--groupext-csv |
Export grouped-by-extension stats as CSV |
--test-coverage <coverage.xml> |
Show test coverage analysis from a coverage.xml file |
--output, -o |
Output file for HTML/Markdown/JSON/CSV/Excel export |
--report-issues |
Export all detected issues (naming, size, complexity, etc.) as a markdown or JSON report |
--check-policy |
Validate project against .codestate.yml rules (CI mode) |
--generate-dashboard |
Create a static HTML SPA dashboard (output/dashboard.html) |
--sarif |
Export SARIF format for GitHub Advanced Security integration |
--sca |
Perform Software Composition Analysis (SCA) on lockfiles |
| [Project Structure & Health] |
|
--tree |
Show ASCII tree view of project structure |
--structure-mermaid |
Generate a Mermaid diagram of the project directory structure |
--health |
Show project health score and suggestions |
--summary |
Generate a markdown project summary (print or --output) |
--badge-sustainability |
Output SVG sustainability/health badge |
--lang-card-svg |
Output SVG language stats card (like GitHub top-langs) |
| [Contributors / CI] |
|
--authors |
Show git main author and last modifier for each file |
--contributors |
Show contributor statistics (file count, line count, commit count per author) |
--contributors-detail |
Show detailed contributor statistics (including Impact %) |
--hotspot |
Show most frequently changed files (git hotspots) |
--churn |
Show most changed files in the last N days (default 30) |
--ci |
CI/CD mode: exit non-zero if major issues found |
| [Automation / README / Badges] |
|
--badges |
Auto-detect and print project language/framework/license/CI badges for README |
--readme |
Auto-generate a README template based on analysis |
| [Other] |
|
--style-check |
Check code style: indentation, line length, trailing whitespace, EOF newline |
--openapi |
Generate OpenAPI 3.0 JSON for Flask/FastAPI routes |
--multi <dir1> [dir2 ...] |
Analyze multiple root directories (monorepo support, requires at least one directory) |
--version |
Show codestate version and exit |