Skip to main content

A command-line tool to calculate statistics for a code repository, ignoring files from .gitignore and .howmuchignore.

Project description

How Much

how-much is a command-line tool to get statistics from your code repositories or directories. It's built to be fast, simple, and easily extensible.

Features

  • Calculates statistics like total lines (including and excluding empty lines), characters, and file counts.
  • Correctly ignores files specified in .gitignore files at any directory level.
  • Supports a custom .howmuchignore file for project-specific ignores.
  • Can display a tree view of all processed (non-ignored) files.
  • Extensible plugin system for adding new statistics.
  • Beautiful and clear output powered by the rich library.

Installation

Assuming you have Poetry installed:

# Clone the repository (or navigate to your project directory)
git clone <your-repo-url>
cd how-much

# Install dependencies
poetry install

# Run the tool
poetry run how-much .

To install it as a global command via pip from source:

pip install .

Usage

Run it against the current directory to see statistics:

how-much .

Or specify a path to a directory or a single file:

how-much path/to/your/project

Listing Files

To see a tree view of all the files that will be included in the calculations (i.e., not ignored), use the --list-files or -l flag:

how-much . --list-files

Project details


Download files

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

Source Distribution

how_much_repo_analyzer-0.1.0.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

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

how_much_repo_analyzer-0.1.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file how_much_repo_analyzer-0.1.0.tar.gz.

File metadata

  • Download URL: how_much_repo_analyzer-0.1.0.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.2 Windows/11

File hashes

Hashes for how_much_repo_analyzer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d60d70376a426412240d1b1863d41328ee5ab35e3ac2a7933b097deebc2663bc
MD5 c0c5711b9d2c26efaadd2202ebd581ae
BLAKE2b-256 1527fae6d69779f74187d75ec592c0c8a143aedfa0a3099bf34c871d233fe8cb

See more details on using hashes here.

File details

Details for the file how_much_repo_analyzer-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for how_much_repo_analyzer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bbf9bdfed4b7da38a1f5149652414c11d466391c0cae98d0a5d8e86c4486d6e2
MD5 b41ea9d9cb17862b2cebfbf4f72a7308
BLAKE2b-256 d24e49a657f585a02532e7bac32a91a0863674fc1d9b2449e66b55a73f31d0ff

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 Pingdom Monitoring Sentry Error logging StatusPage Status page