Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.


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

What It Does

  • Directory Analysis: Scan total files, lines of code, average file size, etc.
  • 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
  • Native File Utilities: Optional vendor/libcvault support adds faster CLI directory scanning, file sorting, search, and byte/line metrics when available.
  • Transparent Fallback: If the native helper is missing or unavailable, repoScanner falls back to Python's os.walk and standard-library utilities so the same commands still work.

Features

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)

No Third-Party Python Packages Required

  • The core tool uses only the Python Standard Library for normal operation.
  • An optional native helper (vendor/libcvault) provides optimized filesystem routines and requires a C++ toolchain and Python development headers to build.
  • When the helper is available, repoScanner uses a shared wrapper(repoScan/scanner/libcvault_wrapper.py) to load it once per scanned root and reuse the results; when it is not available, the tool automatically falls back to Python scanning logic.

Benchmarks

These numbers are obtained by testing the commands using hyperfine.

os.path vs std::recursive dir

Mode os.walk (ms) std::recursive dir (ms) Difference
Shell wrapper --stats 234.6 204.8 std::directory is 29.8 ms faster
Shell wrapper --dev 242.9 206.8 std::directory is 36.1 ms faster
Direct Python --stats 162.1 116.3 std::directory is 45.8 ms faster
Direct Python --dev 174.2 116.9 std::directory is 57.3 ms faster

Modes using libcvault

Operation Command Mean (ms) Std Dev (ms) Range (ms) Runs
search python3 -m repoScan.cli --search main.cpp 157.4 14.0 138.8–194.4 15
total bytes python3 -m repoScan.cli --tbytes 166.0 19.2 144.7–219.9 13
sort(size-based) python3 -m repoScan.cli --sort 162.2 14.0 140.4–193.3 15
max file size python3 -m repoScan.cli --max 121.0 13.9 104.3–151.8 19
file line count python3 -m repoScan.cli --lc README.md 124.5 15.2 106.5–153.6 20

[!TIP]
For reproducing benchmarks, check benchmarking using hyperfine.

Requirements

  • 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.

Quick Install

Install directly from PyPI for end users:

pip install repoScanner

Run:

reposcan <path> [--stats|--dev|--help| --bench]

More commnads:

reposcan <path> --sort #sorted list based on byte size
reposcan <path> --search <filename> #search for a file
reposcan <path> --lc <filename> #return line count of a file
reposcan <path> --max #return largest file by size
reposcan <path> --tbytes # return total bytes

Build Instructions

1. Setup

  • Clone the repository

    git clone https://github.com/tecnolgd/repoScanner.git
    
  • Navigate to the directory

    cd repoScanner
    
  • Optional: Fetch bundled native helper(libcvault)

    git submodule update --init --recursive vendor/libcvault
    
    • git submodule init registers the submodule in your local repo configuration.
    • git submodule update --init also clones and checks out the correct commit for the submodule.

[!TIP]
If you later want to refresh libcvault from its remote repository, run:

 git submodule update --remote vendor/libcvault
  • This updates the submodule to the latest commit from its configured branch. You should then review and commit the updated submodule pointer in the main repo.

Build the native extension from bridge.cpp and vendor/libcvault/main.cpp.

  • Before building, make sure system dev packages and pybind11 are available. Debian/Ubuntu example:

    sudo apt-get update
    sudo apt-get install -y build-essential g++ python3-dev
    python3 -m pip install --user pybind11
    
  • Compile using pybind11 includes for portability:

    g++ -O3 -shared -std=c++17 -fPIC $(python3 -m pybind11 --includes) -I vendor/libcvault vendor/bridge.cpp vendor/libcvault/main.cpp -o repoScan/libcvault$(python3-config --extension-suffix)
    

[!IMPORTANT]

  1. The vendor/libcvault native helper uses Python's C/C++ bindings (pybind11 bridge) for optimized file system operations.
  2. Building the helper requires a C++ compiler (e.g., g++) and Python development headers.
  3. The native helper is optional. If you prefer zero native dependencies, you can safely add .gitmodules and vendor/ to your .gitignore.

The repository may include a prebuilt binary (e.g. libcvault.cpython-312-x86_64-linux-gnu.so) for convenience; if you plan to distribute, prefer providing prebuilt wheels rather than committing .so artifacts in the repo.

2. Tool Execution/Run

The easiest way to use repoScanner is with the provided shell script wrapper:

./reposcan <path> [--stats|--raw|--dev|--bench]

Quick start:

./reposcan .                       # stats mode
./reposcan /path/to/repo --raw     # detailed developer output
./reposcan /path/to/repo --bench   # benchmark harness

3. Output

Reports are automatically saved to output/report.json

Supported Languages

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).

Documentation

Contributing

Contributors

A huge thanks to the developers contributing to repoScanner.

Author & License

  • Author: tecnolgd
  • License: MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

reposcanner-0.3.0b5-cp312-cp312-musllinux_1_2_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

reposcanner-0.3.0b5-cp312-cp312-musllinux_1_2_i686.whl (1.2 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ i686

reposcanner-0.3.0b5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (278.8 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

reposcanner-0.3.0b5-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl (298.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ i686

File details

Details for the file reposcanner-0.3.0b5-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for reposcanner-0.3.0b5-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d18ac390b9934b2dce028cfbb9c21f0b9622971e12c4ab3f32d768cc4dd0fc33
MD5 7f4dd548553eb8723b1e31618a4c6504
BLAKE2b-256 fb5f3bfb1dcea69e4011108fca6e6d63960c0d181ec8641159095267b777d315

See more details on using hashes here.

File details

Details for the file reposcanner-0.3.0b5-cp312-cp312-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for reposcanner-0.3.0b5-cp312-cp312-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 23fe03c9b1b17bbc05a53ac5897050b863111f6cdd7d849a5f0b620de07317f5
MD5 48cbfac321e1ba040484f08b0a79e7d3
BLAKE2b-256 56efaf219e8001cae59ac6961ded3f469499c61c8edf3e82444f126b31749183

See more details on using hashes here.

File details

Details for the file reposcanner-0.3.0b5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for reposcanner-0.3.0b5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b8c5da188843c9573d45257d60249c34749f5138655c351bd2fed5ea8ff11a44
MD5 ba79653793326785a5726872df03df31
BLAKE2b-256 23803df18b468837edd92f407b2caaf153580f096b9d5bbaec54c1b685e5cf48

See more details on using hashes here.

File details

Details for the file reposcanner-0.3.0b5-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for reposcanner-0.3.0b5-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 6301e2edd3be88d410009182d0742cd2c023577c9bfc8d2b43244897cb7ef5fe
MD5 29964223be95a34e60e29913d4e4392f
BLAKE2b-256 0082097e3916b3943e86d3688815afa7fcfdb78a994aaaa288c83cedc1468e93

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page