semvec/pypi-packages huggingface dataset:
codecount-cli 0.1.0
Count lines of code, comments, and blanks by language
License: MIT
Requires Python: >=3.9
Keywords: loc, lines-of-code, cloc, code-count, cli, developer-tools

# codecount-cli

Count lines of code, comments, and blanks by language. Like `cloc` but simpler, with `--json` output for automation.

## Install

```bash
pip install codecount-cli
```

## Usage

```bash
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