repoScanner is a lightweight repository analysis tool for developers.
- Quickly understand your codebase structure, dependencies, and metrics with a single command.
- Built for developers with the intent of saving time and peace-of-mind
- File Analysis: Scan total files, lines of code, and average file size
- Dependency Detection: Extract and map dependencies (Python imports, C/C++ includes)
- Language Breakdown: See what languages dominate your repo
- Smart Reporting: Choose between quick stats or detailed developer mode
- JSON Export: Machine-readable reports for automation
Dual Reporting Modes
- Stats Mode (default): High-level summary—perfect for a quick glance
- Raw Mode: File-by-file dependency details for developers who need everything
Key Metrics
- Total files and lines of code
- Per-file dependency counts
- Language distribution
- Largest files and most-dependent files
- File mapping with dependencies(for --dev/raw mode)
- Python 3.12+ (tested on Ubuntu 24.04 LTS)
The code uses only Python standard libraries and should be compatible with Python 3.10+, but has been officially tested on Python 3.12.
git clone https://github.com/tecnolgd/repoScanner.gitcd repoScannerThe easiest way to use repoScanner is with the provided shell script wrapper:
./reposcan <path> [--stats|--raw|--dev]Examples:
- Quick Summary (Recommended)
./reposcan . # Scan current directory (stats mode)
./reposcan /path/to/repo # Scan a specific path (default: stats mode)
./reposcan /path/to/repo --stats # Explicitly use stats mode- Detailed Analysis (Developer Mode - Tree with File Mapping)
./reposcan /path/to/repo --raw # File-by-file with dependency tree
./reposcan /path/to/repo --dev # Same as --raw (alias)The --raw / --dev mode displays all files in a tree structure with their dependencies mapped, perfect for detailed codebase analysis.
- Get Help
./reposcan --help # Show all available options
./reposcan -h #Same as --help(alias)- You can also run the scanner directly:
python3 -m repoScan.cli /path/to/repo # Stats mode (default)
python3 -m repoScan.cli /path/to/repo --raw # Detailed analysis with dependency tree
python3 -m repoScan.cli /path/to/repo --dev # Same as --raw (alias)- Help command
python3 -m repoScan.cli /path/to/repo --help # Same as -hReports are automatically saved to output/report.json
Detects and maps 40+ extensions to human-readable names, including:
- Systems: C, C++, Rust, Go, Zig, Swift
- Web: HTML, CSS, JavaScript, TypeScript, PHP
- Data: JSON, YAML, TOML, SQL, XML
- Scripting: Python, Ruby, Lua, Shell, PowerShell
- ...and many more. (Unrecognized extensions fall back to their raw string format).
A huge thanks to the developers contributing to repoScanner.
- Author: tecnolgd
- Version: v0.2.0
- License: MIT
