Count lines of code, comments, and blanks by language
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
codecount_cli-0.1.0.tar.gz
(6.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file codecount_cli-0.1.0.tar.gz.
File metadata
- Download URL: codecount_cli-0.1.0.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6545e6160576934435b76555692b9fa62bec24a6520fb7a8d4a5d1e5a944e947
|
|
| MD5 |
3e82c94f027dee8146c870fd49210306
|
|
| BLAKE2b-256 |
26ab099201ee0e7abdeae8f1c4ca633c75722f8c4278c17c0c561c6dec6709c3
|
File details
Details for the file codecount_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: codecount_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe173f7a278efd5cfaf7c609f695c554142b6b8e9f148861cf3219d4153257e0
|
|
| MD5 |
53cbccce53bb1476a28eaa387f607c7d
|
|
| BLAKE2b-256 |
4f9d10df85d3d859feb7f61606f3d7f93a2a18b4e413707e450b8b24e65ad87e
|