Forrest logo
tool overview
On this page you find all important commands for the CLI tool tokei. If the command you are looking for is missing please ask our AI.

tokei

Tokei is a command line tool used for code line counting and analysis in various programming languages. It provides developers with useful metrics for their codebases.

  1. Tokei is primarily designed for tracking the number of lines in a code repository and analyzing the code statistics.
  2. It supports a wide range of programming languages, including but not limited to C++, Java, Python, JavaScript, Ruby, and more.
  3. The tool can count lines of code, lines of comments, blank lines, and even total lines for a specific language or the entire project.
  4. Tokei provides additional statistics like code complexity, estimated time to read the code, and average lines per function.
  5. Developers can choose specific file extensions or languages to include or exclude during the line counting process.
  6. Tokei supports recursive searching, allowing developers to analyze codebases with multiple subdirectories and files.
  7. It can generate an output summary in various formats, including tabular, JSON, and TOML, making it easier to integrate with other tools or automate processes.
  8. Developers can save the analysis result to a file for future reference or comparisons.
  9. Tokei is open-source and written in Rust, providing high performance and reliability in code counting and analysis.
  10. It is highly versatile, making it useful for individual developers, open-source projects, or companies managing large codebases.

List of commands for tokei:

  • tokei:tldr:2e78f tokei: Print out statistics for individual files in a directory.
    $ tokei ${path-to-directory} --files
    try on your machine
    explain this command
  • tokei:tldr:a1907 tokei: Get a report for all files of type Rust and Markdown.
    $ tokei ${path-to-directory} -t=${Rust},${Markdown}
    try on your machine
    explain this command
  • tokei:tldr:e6852 tokei: Get a report on the code in a directory and all subdirectories.
    $ tokei ${path-to-directory}
    try on your machine
    explain this command
  • tokei:tldr:ec95b tokei: Get a report for a directory excluding `.min.js` files.
    $ tokei ${path-to-directory} -e ${*-min-js}
    try on your machine
    explain this command
tool overview