Count lines of code quickly with Tokei, a code statistics command-line tool.

github.com/XAMPPRocky/tokei
Tokei homepage screenshot

About Tokei

Tokei is a command-line program that counts code. It reports the number of files, total lines, code lines, comments, and blank lines, grouped by programming language. The project's homepage describes it as fast, able to count millions of lines of code in seconds, and states that it supports over 150 languages and their file extensions.

Tokei can be installed through common package managers on Linux, macOS, and Windows, or built from source with the Rust compiler. It respects .gitignore and .ignore files and offers an --exclude option for leaving out additional files. Its behavior can be changed with a configuration file named tokei.toml or .tokeirc.

Key features

  • Reports files, total lines, code, comments, and blanks grouped by language
  • Supports over 150 languages and their file extensions
  • Handles multi-line comments, nested comments, and comments inside strings
  • Exports results in CBOR, JSON, or YAML formats
  • Combines saved statistics from earlier runs with new results
  • Respects .gitignore and .ignore files and supports an --exclude option
Best for: Software developers and teams who want quick line-count statistics for source code from a terminal.
Good for
  • The homepage states it can count millions of lines of code in seconds.
  • It supports over 150 languages and their file extensions.
  • The homepage states it correctly handles nested and multi-line comments.
Watch out for
  • The documented usage is through the command line, with no graphical interface described.
  • Installation requires a package manager, a prebuilt binary, or the Rust compiler for building from source.

Tokei at a glance

Type
Open-source project
Pricing
Not confirmed. Check the site
Open source
Not stated
Language
English
Last checked
Oct 6, 2026 · Online when checked
Listed
Oct 5, 2026

Tokei alternatives

Tools and sites you could use instead, ranked by how closely they match.

All 13 alternatives

Popular in Code Editors & IDEs

Well-known listings from the same topic.

All 74

Tokei FAQ

Which operating systems does Tokei support?
The homepage states that Tokei is available on Mac, Linux, and Windows.
How can I exclude files or folders from the count?
Tokei respects .gitignore and .ignore files. You can also use the --exclude option, which follows the same rules as .gitignore.
How can I turn off colored output?
Set the environment variable NO_COLOR to 1, and the output will be black and white.
Is something wrong or out of date?

Tell us and an editor will check it.

Own this website?

Claim the listing and suggest updates yourself. An editor checks every claim first.

Claim this listing