Skip to main content

cloc-python

A Python CLI wrapper for cloc (Count Lines of Code) that can be executed via uvx without needing to install cloc on your system.

Install

No installation required! Just run via uvx:

uvx cloc-python [options]

Requirements

  • Windows: No dependencies! The bundled cloc.exe is standalone.
  • Linux/macOS: Perl is required (usually pre-installed)
    • Ubuntu/Debian: sudo apt install perl
    • CentOS/RHEL: sudo yum install perl
    • Arch Linux: sudo pacman -S perl
    • macOS: Usually pre-installed, or brew install perl
    • Docker: docker run --rm -v $(pwd):/workdir miquella/cloc

Note: Most Linux distributions and macOS come with Perl pre-installed. You only need to install it if you're using a minimal container (like Alpine) or a custom system.

Usage

This wrapper passes all arguments directly to the underlying cloc binary:

# Count lines in current directory
uvx cloc-python .

# Count lines in specific files
uvx cloc-python file1.py file2.py

# Exclude certain directories
uvx cloc-python --exclude-dir=vendor,node_modules .

# JSON output
uvx cloc-python --json .

# See all cloc options
uvx cloc-python --help

More options available on the cloc's repository README.

cloc version

This package includes cloc v2.08.

Metadata

Release files for cloc-python 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cloc-python 0.1.0
File Size Uploaded Provenance
cloc_python-0.1.0.tar.gz 5.6 MB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for cloc-python 0.1.0
File Interpreter ABI Platform
cloc_python-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.2 MB

Release files / cloc_python-0.1.0.tar.gz

Download URL cloc_python-0.1.0.tar.gz
Size 5.6 MB
Tags Source
SHA-256 checksum
How to use checksums
56cc148511e133df3b293b1374c3bf055f5474eed136086b74d370d8b9e63a52
BLAKE2b-256 checksum
How to use checksums
6b532836480c3f6cbc2e282823ac0c7c61a169658151c52f43c0a7be3dc05852
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Feb 3, 2026.

Transparency log

Release files / cloc_python-0.1.0-py3-none-any.whl

Download URL cloc_python-0.1.0-py3-none-any.whl
Size 5.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
c7bc1a20f6e01b25ef95917d15311efca6735fda61b62058710880a2e102873b
BLAKE2b-256 checksum
How to use checksums
fa8723b07ab41a63c7d149a2219017403dca698caf08185991942892cb5472a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Feb 3, 2026.

Transparency log

Security for cloc-python 0.1.0

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cloc_python-0.1.0.tar.gz

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 Feb 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page