Skip to main content

UVX-friendly wrapper for cloc (Count Lines of Code) binary executable

Project description

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.

Project details


Download files

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

Source Distribution

cloc_python-0.1.0.tar.gz (5.6 MB view details)

Uploaded Source

Built Distribution

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

cloc_python-0.1.0-py3-none-any.whl (5.6 MB view details)

Uploaded Python 3

File details

Details for the file cloc_python-0.1.0.tar.gz.

File metadata

  • Download URL: cloc_python-0.1.0.tar.gz
  • Upload date:
  • Size: 5.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cloc_python-0.1.0.tar.gz
Algorithm Hash digest
SHA256 56cc148511e133df3b293b1374c3bf055f5474eed136086b74d370d8b9e63a52
MD5 032f2b29a6d041393650bce168f6fc44
BLAKE2b-256 6b532836480c3f6cbc2e282823ac0c7c61a169658151c52f43c0a7be3dc05852

See more details on using hashes here.

Provenance

The following attestation bundles were made for cloc_python-0.1.0.tar.gz:

Publisher: publish.yml on Napuh/cloc-python

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

File details

Details for the file cloc_python-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cloc_python-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cloc_python-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c7bc1a20f6e01b25ef95917d15311efca6735fda61b62058710880a2e102873b
MD5 a55ad731ab1beb1bc7a228f07e95f5d5
BLAKE2b-256 fa8723b07ab41a63c7d149a2219017403dca698caf08185991942892cb5472a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for cloc_python-0.1.0-py3-none-any.whl:

Publisher: publish.yml on Napuh/cloc-python

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 Pingdom Monitoring Sentry Error logging StatusPage Status page