tokei Code Statistics Counter
Fast and accurate code statistics tool written in Rust. Counts lines of code, comments, and blanks across 200+ languages, with output in JSON, YAML, or CBOR for programmatic analysis of codebase composition.
Installation
Use the upstream install or setup path that matches your environment:
- cargo install tokei
- conda install -c conda-forge tokei
- brew install tokei
- cargo install --git https://github.com/XAMPPRocky/tokei.git tokei
Requirements and caveats from upstream:
- You can also build and install from source (requires the latest stable [Rust] compiler.)
- Tokei is available in a small alpine-based docker image, buildable through earthly:
Basic usage or getting-started notes:
Example
reused in tokei combining a previous run's statistics with another set.
Package Managers
Extracted from upstream docs: https://raw.githubusercontent.com/XAMPPRocky/tokei/HEAD/README.md