NeonLoc
A blazingly fast, cyber-styled source code counter. Count your lines with pure edge.
Installation
Install directly from PyPI:
pip install neonloc
From source:
git clone https://github.com/debeski/neonloc.git
cd neonloc
pip install .
Usage
Simply run neonloc in your terminal and pass a directory. By default, it will use the current directory (.).
neonloc .
Or target a specific folder:
neonloc /path/to/project
List line metrics by layout-aware paths:
neonloc . -L auto
Use -L files, --list-loc dirs, or --list-loc both to force file, directory, or combined LOC tables.
When -L is passed, NeonLoc shows only the detailed path table view plus the final scan summary.
Tame large listings with --depth N (dirs mode), --top/--top-dirs/--top-languages N, and --sort loc|name|code|comments|ratio (files mode).
Export the scan result as JSON + text report:
neonloc . -e
Writes timestamped result_<timestamp>.json/.txt files under the scanned directory's .neonloc folder (never overwritten).
Export a standalone HTML report:
neonloc . --html report.html
Other useful flags:
neonloc . -D # file-size distribution, empty/minimal files, largest files
neonloc . -X # duplicate-code detection (normalized line-hash matching)
neonloc . --git # branch, HEAD commit, author, uncommitted diffstat
neonloc . --since 30d # daily LOC trend from Git history (also accepts w/m/y)
neonloc . -q # print only the total LOC count, for scripting
neonloc . --no-banner --no-color # script-friendly output
Configure defaults with a .neonloc.toml file in the scanned directory, so neonloc . just works:
[scan]
respect_gitignore = true
include_hidden = false
include_generated = false
[output]
color = true
banner = true
[thresholds]
large_file = 500
huge_file = 1000
Features
- Categorized Metrics: Distinct, color-coded tables for
Code,Documentation,Config,Data,Markup, andStyle, each with aCode / Comment / Blankratio column. - Cyber Aesthetic: Pure neon glory in your terminal, rendered with
Rich. - Lightning Fast: Scans and parses directories in the blink of an eye.
- Language Support: Python, JavaScript, TypeScript, Go, C/C++, C#, Rust, Swift, Kotlin, HTML, Jinja/Django, XML/SVG, CSS, YAML, JSON, SQL, CSV, Markdown, Text, Bash, Ruby, Java, PHP, Vue, Svelte, TOML, INI/Config, Dockerfile, and common ignore files (
.gitignore, etc.). - Deep Metrics: Counts true code logic, comments, blanks, and total lines.
- Path LOC Tables: Optional file and directory tables replace the generic category report, with
autochoosing flat, modular, or mixed layout output. Supports depth limiting, top-N caps, and sorting. - Project Health: Always-on panel with code ratio, average file size, largest file, empty/huge-file counts, and warnings — plus a
FILE READ ERRORStable for any file NeonLoc couldn't analyze (never silently skipped). - File Size Distribution & Duplication:
-Dshows size buckets, empty/minimal files, and the largest files;-Xdetects duplicated code blocks across files. - Git Integration:
--gitshows branch/commit/author/diffstat;--sinceshows a daily LOC trend derived from Git history. - Config File: Drop a
.neonloc.tomlin your project to set scan, output, and threshold defaults. - Export Files:
-e/--exportwrites timestamped JSON + text reports to.neonloc/;--htmlwrites a standalone, self-contained HTML report. - Scripting Friendly:
-q/--quiet,--no-banner,--no-color.
Metadata
Release files for neonloc 0.6.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| neonloc-0.6.4.tar.gz | 24.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| neonloc-0.6.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 48.6 kB
Release files / neonloc-0.6.4.tar.gz
| Download URL | neonloc-0.6.4.tar.gz |
|---|---|
| Size | 24.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d62ec00fd687dbc7f8e9e1fa01b5055cb58685d225359878a0ff9ec63a858a91
|
|
BLAKE2b-256 checksum How to use checksums |
6ad2cb071c38947ea715bd06050ab4359295ee6a0f13ad764620dd58c7d0be4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.
Transparency logRelease files / neonloc-0.6.4-py3-none-any.whl
| Download URL | neonloc-0.6.4-py3-none-any.whl |
|---|---|
| Size | 24.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
42fbac3803314067baa306faa70b74c056ae853ab07be36aad2887ee819dbc08
|
|
BLAKE2b-256 checksum How to use checksums |
fe86c5a20f9f9467b9fc1c73fd00614b1d230f2e9d7ef6410ebd6e5ddf6be90c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.
Transparency log