Keyboard shortcuts

Press ← or β†’ to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

batuta analyze

Analyze source codebase for languages, dependencies, and technical debt (Phase 1: Analysis).

Synopsis

batuta analyze [OPTIONS] [PATH]

Description

The analyze command performs deep codebase analysis including language detection, dependency mapping, and Technical Debt Grade (TDG) scoring. This is Phase 1 of the transpilation pipeline.

Arguments

ArgumentDescription
[PATH]Project path to analyze (default: .)

Options

OptionDescription
--tdgGenerate Technical Debt Grade score
--languagesDetect and report programming languages
--dependenciesAnalyze project dependencies
-v, --verboseEnable verbose output
-h, --helpPrint help

Examples

Full Analysis

$ batuta analyze --languages --tdg .

πŸ“Š Analyzing project...

Languages:
  Python: 42 files (8,521 lines)
  Shell:  12 files (1,234 lines)
  C:       3 files (567 lines)

Technical Debt Grade: B (78.5/100)
  Complexity: 12.3 avg cyclomatic
  SATD: 8 comments
  Dead code: 3.2%

TDG Score Only

$ batuta analyze --tdg .

πŸ“Š Analysis Results
  Files: 508 total, 184,673 lines
  Languages: Rust (95%), TOML (3%), Markdown (2%)
  TDG Score: 98.4 (Grade: A+)

Note: --tdg automatically detects languages and counts files. You don’t need to pass --languages separately.

Language Detection Only

$ batuta analyze --languages

Dependency Analysis

$ batuta analyze --dependencies

See Also


Previous: batuta init Next: batuta transpile