clocx
clocx counts lines of code and shows where work is happening right now: totals by language and directory, lines added and removed over the last hour, day, week and month from git history, and the work in progress in every git worktree of the repository. It prints one colored report and exits, or stays open as a live dashboard that refreshes as files and commits change. It is built for a repository where several people or coding agents work in parallel worktrees and you want to see all of it at a glance.
Install
cargo install clocx
Or, without a Rust toolchain, the prebuilt binary from PyPI (the wheel
holds only the clocx executable):
uv tool install clocx # or: pipx install clocx
uvx clocx # run once without installing
Prebuilt binaries for Linux (x86_64, arm64; static, any distribution),
macOS (arm64, x86_64) and Windows (x86_64) are attached to every
GitHub release, each with a
SHA-256 checksum. Download the archive for your platform, check it, and put
clocx on your PATH.
From a checkout:
cargo install --path crates/clocx
Sixty-second tour
clocx # report on the current directory and exit
clocx path/to/repo # report on another directory
clocx --live # full-screen dashboard; q quits
clocx --json # the same report as one JSON document
Read top to bottom:
- Languages and Directories: files and code, comment and blank lines, with the change in code lines since you last ran clocx.
- Activity: lines added and removed, files touched and commits over the last hour, 24 hours, 7 days and 30 days, across every local branch, each with a sparkline of when the changes happened.
- Where work is happening: the same activity per directory, with current work on top.
- Worktrees: every worktree with its branch, uncommitted lines against
its HEAD, commits ahead of the base branch, everything it changed since
branching (committed or not), and its last activity. The worktree you
ran clocx in is marked
*.
Green is lines added, red is lines removed, totals are dimmed. Output is
plain when it goes to a pipe or a file, or when NO_COLOR is set.
Live view
clocx --live (or -l) draws the same report full screen and keeps it
current. It refreshes when a source file changes (debounced, ignoring what
.gitignore ignores), when commits, branches, HEAD or the index change
in any worktree, and every 30 seconds so the time windows keep moving.
Only changed files are recounted and only new commits are diffed, so it is
cheap to leave open on a second screen. q quits, r refreshes.
Options
| Flag | Meaning |
|---|---|
-l, --live |
Live dashboard instead of a one-shot report. |
--json |
One JSON document with every section (schema_version 1). |
-d, --depth N |
Group directories N levels deep (default 1). |
--rows N |
Fold tables after N rows (default 12, 0 for all); changed rows always show. |
--base BRANCH |
What worktrees compare with (default main, else master). |
--color WHEN |
auto, always or never. |
--cache-dir DIR, --no-cache |
Where counts are cached, or no cache at all. |
--no-progress |
No progress line on stderr while the report is computed. |
-v |
Diagnostics on stderr (-vv debug); RUST_LOG also works. |
The full reference, with the JSON shape and the exact rules for each section, is docs/clocx.md.
How it counts
Counting is done by tokei: files git
would not ignore are counted, hidden directories such as .github count,
and documentation counts as comment (Python docstrings and Markdown prose;
code blocks in Markdown are code). clocx started as a fork of
cloc and agrees with it within a few
percent on code lines for the languages checked; the differences, and why,
are listed in
docs/clocx.md, Differences from cloc.
Development
cargo test
cargo clippy --all-targets -- -D warnings
cargo fmt --all
The toolchain is pinned in rust-toolchain.toml. All output goes through
one module, crates/clocx/src/render; everything else computes typed data
and hands it over. Git access uses
gix, the dashboard uses
ratatui, and file watching uses
notify. CI runs formatting, clippy,
the MSRV build, a crates.io package dry run and the tests on Linux, macOS
and Windows for every push.
Versioning and compatibility
clocx follows Semantic Versioning. Before 1.0, a
minor version may change flags, output layout or the JSON shape; the JSON
carries a schema_version that changes whenever its shape does. The
minimum supported Rust version is 1.88 and is checked in CI; raising it is
a minor-version change. Changes are listed in CHANGELOG.md,
and releases are cut as described in docs/releasing.md.
Contributing
Contributions are welcome, from a typo fix to a new section of the report. Read CONTRIBUTING.md before opening a pull request; it covers the local setup, the commit format and the AI-assisted contributions policy. Everyone taking part is expected to follow the Code of Conduct.
Security
See SECURITY.md for how to report a vulnerability; please do not open a public issue for one.
License
GPL-2.0-only, like cloc, from which clocx grew. See LICENSE.
Logan Dapp logan@logand.app
Metadata
Release files for clocx 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| clocx-0.2.0.tar.gz | 97.0 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| clocx-0.2.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| clocx-0.2.0-py3-none-musllinux_1_2_x86_64.whl | Python 3 | none | Linux musl 1.2+ x86-64 | Details |
| clocx-0.2.0-py3-none-musllinux_1_2_aarch64.whl | Python 3 | none | Linux musl 1.2+ ARM64 | Details |
| clocx-0.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | Python 3 | none | Linux glibc 2.17+ x86-64 | Details |
| clocx-0.2.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | Python 3 | none | Linux glibc 2.17+ ARM64 | Details |
| clocx-0.2.0-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
| clocx-0.2.0-py3-none-macosx_10_12_x86_64.whl | Python 3 | none | macOS 10.12+ x86-64 | Details |
Total release size: 29.1 MB
Release files / clocx-0.2.0.tar.gz
| Download URL | clocx-0.2.0.tar.gz |
|---|---|
| Size | 97.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1b8cfe4b43a60a08d8d6995c7af94ef7de36baf3c0bccacd0fb9d976bd9cda7b
|
|
BLAKE2b-256 checksum How to use checksums |
c61474cc996ab674db2a49bf683fd90f3ca5589c4d5f6f4fd3d2050ffa7dcadc
|
| 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 Oct 4, 2026.
Transparency logRelease files / clocx-0.2.0-py3-none-win_amd64.whl
| Download URL | clocx-0.2.0-py3-none-win_amd64.whl |
|---|---|
| Size | 4.2 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
5f3b3970c11eebca5f6e657df50914da1eb449361e820be986263fe6466707ad
|
|
BLAKE2b-256 checksum How to use checksums |
2d75cf30d9c991685e67cff4436b7a11edabb5bf71c5b5b7ee15d217bc7bc152
|
| 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 Oct 4, 2026.
Transparency logRelease files / clocx-0.2.0-py3-none-musllinux_1_2_x86_64.whl
| Download URL | clocx-0.2.0-py3-none-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 4.4 MB |
| Tags | Linux musl 1.2+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
af0685731f52d93a50b227efea918d8bc076983f8829fca5e1da70b2a087f85c
|
|
BLAKE2b-256 checksum How to use checksums |
a9d07fac1475cab33c580ca1d88547356e6316e21e3af061600e00bf03c13e5f
|
| 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 Oct 4, 2026.
Transparency logRelease files / clocx-0.2.0-py3-none-musllinux_1_2_aarch64.whl
| Download URL | clocx-0.2.0-py3-none-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 4.0 MB |
| Tags | Linux musl 1.2+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
dd439da7b70af2b2129bc821a950ffa371799cfeb308e78eb3c695f0d1ae7e47
|
|
BLAKE2b-256 checksum How to use checksums |
b180a64926357a65edaf0b1ad5cf954e3feae6efb069d236bba42c3d57b275fa
|
| 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 Oct 4, 2026.
Transparency logRelease files / clocx-0.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | clocx-0.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 4.3 MB |
| Tags | Linux glibc 2.17+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
fe0f21c819853c2c86a2f92c3768d67db7551ef8440fc1fe4ab2d66c0676e0b7
|
|
BLAKE2b-256 checksum How to use checksums |
a5dfd49810e8fd62b2abcdfc8966d6a62de727ccd816a37e0b9bd97e8f460dd8
|
| 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 Oct 4, 2026.
Transparency logRelease files / clocx-0.2.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | clocx-0.2.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 4.1 MB |
| Tags | Linux glibc 2.17+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
413138eda932dd69339e220b42faf763ef91b4168db15da32cca7434dfbe7db1
|
|
BLAKE2b-256 checksum How to use checksums |
a2ff41d7e74ce7d9fc52c0ee66b690aadd33d380eb0c4f9752d45f6f85f6701d
|
| 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 Oct 4, 2026.
Transparency logRelease files / clocx-0.2.0-py3-none-macosx_11_0_arm64.whl
| Download URL | clocx-0.2.0-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 4.0 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
f3326a50a11747c2ed74dfb7aa9594e418a1f9e3d18c2ea0c3309decdce4cb05
|
|
BLAKE2b-256 checksum How to use checksums |
7459945c09e47397a12516f0182d47456b0df9681dce619263479720ca4798c8
|
| 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 Oct 4, 2026.
Transparency logRelease files / clocx-0.2.0-py3-none-macosx_10_12_x86_64.whl
| Download URL | clocx-0.2.0-py3-none-macosx_10_12_x86_64.whl |
|---|---|
| Size | 4.1 MB |
| Tags | Python 3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
45acf0b8d4466c00ef5110ee2ec30aa126409f15bd40493c96c7a53cd98d6746
|
|
BLAKE2b-256 checksum How to use checksums |
7c8dc266248da5fffe930f83d53a2d8d1b8c0be0a44b5562ef15e5bc885d5025
|
| 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 Oct 4, 2026.
Transparency log