codecount-cli
Count lines of code, comments, and blanks by language. Like cloc but simpler, with --json output for automation.
Install
pip install codecount-cli
Usage
codecount . # Count all files in current directory
codecount src/ # Specific directory
codecount file.py # Single file
codecount . --top 10 # Top 10 languages
codecount . -l python # Filter by language
codecount . --json # JSON output
codecount . --csv # CSV output
codecount . --by-file # Per-file breakdown
codecount --languages # List supported languages
Example Output
----------------------------------------------------
Language Files Code Comment Blank
----------------------------------------------------
Python 4 312 45 67
YAML 2 28 3 8
TOML 1 18 0 4
Markdown 1 42 0 12
----------------------------------------------------
Total 8 400 48 91
----------------------------------------------------
Features
- 50+ languages detected by file extension
- Comment detection for Python, JS/TS, C/C++, Java, Go, Rust, Ruby, and more
- Auto-ignores .git, node_modules, pycache, dist, build, etc.
- Respects .gitignore when inside a git repo
- JSON and CSV output for scripting and automation
- Per-file breakdown with
--by-file - Zero dependencies beyond Click
License
MIT
Release files for codecount-cli 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| codecount_cli-0.1.0.tar.gz | 6.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| codecount_cli-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.9 kB
Release files / codecount_cli-0.1.0.tar.gz
| Download URL | codecount_cli-0.1.0.tar.gz |
|---|---|
| Size | 6.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6545e6160576934435b76555692b9fa62bec24a6520fb7a8d4a5d1e5a944e947
|
|
BLAKE2b-256 checksum How to use checksums |
26ab099201ee0e7abdeae8f1c4ca633c75722f8c4278c17c0c561c6dec6709c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / codecount_cli-0.1.0-py3-none-any.whl
| Download URL | codecount_cli-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fe173f7a278efd5cfaf7c609f695c554142b6b8e9f148861cf3219d4153257e0
|
|
BLAKE2b-256 checksum How to use checksums |
4f9d10df85d3d859feb7f61606f3d7f93a2a18b4e413707e450b8b24e65ad87e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|