Count your code, quickly.
open sourceApache-2.0self-hostablefree
Tokei displays statistics about your code: number of files, total lines, code, comments and blanks grouped by language. It is very fast, handles multi-line and nested comments correctly, supports over 150 languages, and can output CBOR, JSON or YAML. It is also usable as a Rust library.
Ways to install
Package managers
Problems it solves
- how many lines of code are in this repo, by language
- cloc is slow on a big monorepo
- count lines of code excluding comments and blank lines
- track codebase size over time in CI as JSON
- what languages is this project actually written in
- compare how much test code versus app code we have
- need a library to count source lines programmatically in Rust
- quick stats about an unfamiliar codebase I just cloned
Features
- 150+ languages
- accurate comment handling
- JSON/YAML/CBOR output
- library API
Capabilities
| Has an API | plan not known |
|---|---|
| Has a command line tool | plan not known |
| Has official SDKs | plan not known |
Alternatives
The same job
These do what Tokei does.
