Tokei is a powerful tool that allows you to analyze and display detailed statistics on your source code. It quickly has the number of files, total lines, effective code, comments and empty lines, all grouped by programming language.

The main assets of Tokei are :

  • An excellent performance: capable of analyzing millions of lines of code in a few seconds
  • A great precision: correct management of multi-line, nested comments and character strings
  • Large support: more than 150 recognized programming languages
  • Export flexibility: multiple formats available (JSON, YAML, CBOR) to easily reuse data
  • Multiplateform availability: works on Linux, Mac and Windows
  • Easy integration: usable as a library in other projects

SCR 20241215 OQSG

The tool offers many customization options, such as sorting results by different criteria (number of lines, comments, etc.), display of statistics per file, or respecting .Gitignore files to exclude certain contents of analysis.

To install it under macOS:

To install it under Windows:

# Winget
winget install XAMPPRocky.tokei
# Scoop
scoop install tokei

And to install it under Linux with cargo:

Tokei also offers a badge system to display code metrics directly in your Readm, allowing you to highlight the statistics of your projects visually.

In short, a good way of cheap flex, as the other would say. And to have stats, because we all love it the stats !!

Thanks to Lorenper for the information.

Source link


Source link

Categorized in: