Skip to main content

STATS CLI

A simple command line tool to analyze programming projects and display basic statistics about languages and files they contain.

Features

  • Analyxe one or more project directories at the same time.
  • Analyze folders containing multiple projects.
  • Count the total number of files.
  • Count the total number of lines.
  • Show how many projects use each language.
  • Recursively scan project directories.

Supported languges

The following table shows which extensions are currently recognized.

Extension
.py
.js
.html
.css
.java
.ts
.tsx
.jsx
.scss
.c
.h
.cpp
.cs
.go
.rs
Others

Instalation

Option 1

pip install stats-project-analyzer==0.2.0

Option 2

Clone the repository and install the project in editable mode.

git clone https://github.com/asierpernias/Stats.git
cd Stats
python -m pip install -e .

Depending on your operating system, you may need to take extra steps to make the stats command available in every terminal

Usage

Analyze the current directory

stats / stats .

Analyze a directory containig multiple projects

stats path/to/folder

Each subdirectory is treated as a separated project.

Analyze multiple directories

stats path/to/folder1 path/to/folder2

Analyze one or more individual projects

Use the -m option;

stats -m path/to/project

Or analyze multiple projects at the same time

stats -m path/to/project1 path/to/project2

Show help

stats --help

Example output

STATS: ------------------------------------------------ Files: 5 Lines: 150

Python 2 Js 1 Html 1 CSS 1 Java 0 Others 0

Requirements

  • Python 3.11 or newer
  • pip

The project uses setuptools for packaging and exposes the stats command through pyproject.toml

Screenshots

image

License

This project is licensed under the MIT Licnese.

Metadata

Release files for stats-project-analyzer 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stats-project-analyzer 0.2.1
File Size Uploaded Provenance Actions
stats_project_analyzer-0.2.1.tar.gz 6.0 kB Without provenance Details for stats_project_analyzer-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for stats-project-analyzer 0.2.1
File Interpreter ABI Platform Actions
stats_project_analyzer-0.2.1-py3-none-any.whl Python 3 none any Details for stats_project_analyzer-0.2.1-py3-none-any.whl

Total release size: 12.3 kB

Release files / stats_project_analyzer-0.2.1.tar.gz

Download URL stats_project_analyzer-0.2.1.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
fd116703df0991e1120a0d3d346609020fbc5102cb8612ccebf7129818b12c46
BLAKE2b-256 checksum
How to use checksums
7854da42391cb0727de1a1162d8517867c48459b61adcaa26bca28fa061b98af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Release files / stats_project_analyzer-0.2.1-py3-none-any.whl

Download URL stats_project_analyzer-0.2.1-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5501febbc380b6b6fae03c54f9ddb4fd17385110496a4cf8c76654d2ab348351
BLAKE2b-256 checksum
How to use checksums
58f7ca2b7e8e889f5031dfb7024aaf7f4e47791b06fe65a14357821741457b27
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Security for stats-project-analyzer 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page