Favicon of tokei

tokei

Lightning-fast CLI tool that analyzes code repositories and generates detailed statistics including files, lines, code, comments, and blanks by language. Export to JSON, YAML, or CBOR.

Tokei is a blazingly fast command-line tool for analyzing code repositories and generating comprehensive statistics about your codebase. It processes millions of lines of code in seconds, making it ideal for quick code audits, project metrics, and integration into development workflows.

The tool excels at accuracy and speed, correctly handling multi-line comments, nested comments, and string content while delivering results faster than comparable solutions. With support for over 150 programming languages, Tokei covers virtually every language you'll encounter in modern development.

Key capabilities include:

  • Detailed metrics: Files count, total lines, code lines, comments, and blank lines grouped by language
  • Multiple output formats: JSON, YAML, and CBOR for easy integration with other tools and data pipelines
  • Flexible filtering: Respect .gitignore and .ignore files, with additional exclusion options via .tokeignore
  • Customizable sorting: Sort results by language name, code lines, comments, blanks, or total lines
  • File-level reporting: View statistics for individual files or aggregate by language
  • Cross-platform: Available on Mac, Linux, and Windows through multiple package managers
  • Library support: Use Tokei as a Rust library to integrate code analysis into your own projects

Whether you're documenting project metrics, comparing codebases, or automating code analysis in CI/CD pipelines, Tokei provides reliable, fast results with minimal overhead.

Install

Pacman
$ pacman -S tokei

Features

Config fileJSON output

Media

Pros

4
  • Analyzes code repositories and generates detailed statistics.
  • Supports multiple output formats including JSON, YAML, and CBOR.
  • Extremely fast, capable of analyzing millions of lines in seconds.
  • Accurate in handling multi-line comments, nested comments, and comments within strings.

Related tools

Share:

Auto-fetched .

Recent releases

Similar to tokei

Favicon

 

  
 
Favicon

 

  
 
Favicon