Tokei is a command-line tool that counts lines of code, comments, and blanks across multiple programming languages.
The tool solves the problem of quickly obtaining accurate code statistics for projects. It parses source files to distinguish between actual code, comments, and blank lines, correctly handling multi-line comments, nested comments, and comments within strings. Tokei groups results by language and can process millions of lines in seconds.
Tokei suits developers and teams who need rapid code metrics for reporting, project assessment, or CI/CD integration. It works across Mac, Linux, and Windows, and supports over 150 languages with their various file extensions. The tool offers multiple output formats including JSON, YAML, and CBOR, making results easy to store, reuse, and combine with previous runs. It is also available as a library for integration into other projects. The README emphasizes Tokei's speed and accuracy as distinguishing characteristics compared to alternatives in this category.
The project maintains active continuous integration with a dedicated CI workflow. Help-wanted issues are explicitly labeled and tracked, indicating openness to community contributions. The tool is packaged across multiple distribution channels including package managers for different platforms, and dependency status is actively monitored.