https://github.com/4ster-light/stats
A tool for analysing programming language statistics
https://github.com/4ster-light/stats
cli languages lua statistics
Last synced: 6 months ago
JSON representation
A tool for analysing programming language statistics
- Host: GitHub
- URL: https://github.com/4ster-light/stats
- Owner: 4ster-light
- License: gpl-3.0
- Created: 2024-11-18T20:33:53.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-11T14:57:31.000Z (9 months ago)
- Last Synced: 2025-05-11T15:33:49.604Z (9 months ago)
- Topics: cli, languages, lua, statistics
- Language: Rust
- Homepage:
- Size: 53.7 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Stats
A command-line tool written in Rust for analyzing programming language statistics in a directory.
## Features
- Analyzes directories to count files and lines of code by programming language
- Filters out common directories like `.git`, `node_modules`, etc.
- Displays results in a colorful, formatted table
- Supports any configured programming languages
## Default Languages
- Rust (.rs)
- Go (.go)
- JavaScript (.js)
- TypeScript (.ts)
- Lua (.lua)
- Haskell (.hs)
## Installation
### From Source
1. Clone the repository
2. Install the project:
```bash
cargo install --path .
```
## Usage
```bash
# Analyze the current directory
stats
# Analyze a specific directory
stats /path/to/directory
```
## Example Output
```
Language Statistics
┏━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━━┳━━━━━━━━┓
┃ Language ┃ Files ┃ Lines ┃ File % ┃ Line % ┃
┡━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━━╇━━━━━━━━┩
│ Rust │ 10 │ 1250 │ 62.5% │ 75.8% │
│ JavaScript │ 4 │ 250 │ 25.0% │ 15.2% │
│ Python │ 2 │ 150 │ 12.5% │ 9.1% │
└────────────┴───────┴───────┴────────┴────────┘
```
## License
GNU General Public License v3.0