Skip to main content

NeonLoc

A blazingly fast, cyber-styled source code counter. Count your lines with pure edge.

PyPI version

NeonLoc Logo

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, and Style, each with a Code / Comment / Blank ratio 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 auto choosing 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 ERRORS table for any file NeonLoc couldn't analyze (never silently skipped).
  • File Size Distribution & Duplication: -D shows size buckets, empty/minimal files, and the largest files; -X detects duplicated code blocks across files.
  • Git Integration: --git shows branch/commit/author/diffstat; --since shows a daily LOC trend derived from Git history.
  • Config File: Drop a .neonloc.toml in your project to set scan, output, and threshold defaults.
  • Export Files: -e/--export writes timestamped JSON + text reports to .neonloc/; --html writes a standalone, self-contained HTML report.
  • Scripting Friendly: -q/--quiet, --no-banner, --no-color.

View on PyPIView on GitHub

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neonloc-0.6.1.tar.gz (23.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

neonloc-0.6.1-py3-none-any.whl (23.6 kB view details)

Uploaded Python 3

File details

Details for the file neonloc-0.6.1.tar.gz.

File metadata

  • Download URL: neonloc-0.6.1.tar.gz
  • Upload date:
  • Size: 23.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for neonloc-0.6.1.tar.gz
Algorithm Hash digest
SHA256 d5ae1b877543b680434d6113d7ed5366ab292bf22aa5e2314e348fe990c98a96
MD5 9c6097935cb8dc77c74764dc17268ad4
BLAKE2b-256 fccb49ccecd027c21b7e5a103089802af22eb46964f429564d9b1cfe0a7844c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for neonloc-0.6.1.tar.gz:

Publisher: release.yml on debeski/neonloc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file neonloc-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: neonloc-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 23.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for neonloc-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2af9a2ed1227c2cd5fc3fa7d1a5f5f4b9835fe230e5a91fd3c292cf6740f85cf
MD5 4f259e57e6529c8f00f85b208473e1bc
BLAKE2b-256 a14f0161eeed079d4d9f8d064dd26b3d9ed5743ae5e715ab5364d9bf27603002

See more details on using hashes here.

Provenance

The following attestation bundles were made for neonloc-0.6.1-py3-none-any.whl:

Publisher: release.yml on debeski/neonloc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page