Outputs the number of files, total lines within those files and code, comments, and blanks grouped by language.
Notes
Latest published Windows binary is 12.1.2. Newer source tags (13.x, 14.0.0) have no Windows release asset yet.
Version
Latest known: 12.1.2
Examples
1. Identifies languages used and outputs the results as JSON.
tokei.exe d:\www --output json
Try it
Count the shared sample fixtures
Run tokei against TryIt/_samples/ with --output json so each detected language is broken out: files, lines, code, comments, blanks. The sample folder is intentionally mixed (Python, JavaScript, HTML, Markdown, JSON, XML, SQL, plain text) so the JSON breakdown gives a compact feel for tokei's per-language detection. --no-ignore is added because the demo lives inside a git checkout that already ignores parts of the tree - we want every fixture counted.
Count the cfExec CFC library
Run tokei against the project's CFCs/ directory. Tokei's built-in language list includes ColdFusion (.cfm/.cfc), so the per-language row appears with files / lines / code / comments / blanks. Compare with cloc's identical demo to see how the two tools agree (or disagree) on the same source tree.
# Tokei - Help
Source: https://github.com/XAMPPRocky/tokei
```
tokei 12.1.2 compiled with serialization support: json, cbor, yaml
Erin P. <xampprocky@gmail.com> + Contributors
Count your code, quickly.
Support this project on GitHub Sponsors: https://github.com/sponsors/XAMPPRocky
USAGE:
tokei.exe [FLAGS] [OPTIONS] [--] [input]...
FLAGS:
-C, --compact Do not print statistics about embedded languages.
-f, --files Will print out statistics on individual files.
-h, --help Prints help information
--hidden Count hidden files.
-l, --languages Prints out supported languages and their extensions.
--no-ignore Don't respect ignore files (.gitignore, .ignore, etc.). This implies --no-ignore-parent,
--no-ignore-dot, and --no-ignore-vcs.
--no-ignore-dot Don't respect .ignore and .tokeignore files, including those in parent directories.
--no-ignore-parent Don't respect ignore files (.gitignore, .ignore, etc.) in parent directories.
--no-ignore-vcs Don't respect VCS ignore files (.gitignore, .hgignore, etc.), including those in parent
directories.
-V, --version Prints version information
-v, --verbose Set log output level:
1: to show unknown file extensions,
2: reserved for future debugging,
3: enable file level trace. Not recommended on multiple files
OPTIONS:
-c, --columns <columns> Sets a strict column width of the output, only available for terminal output.
-e, --exclude <exclude>... Ignore all files & directories matching the pattern.
-i, --input <file_input> Gives statistics from a previous tokei run. Can be given a file path, or
"stdin" to read from stdin.
-n, --num-format <num_format_style> Format of printed numbers, i.e. plain (1234, default), commas (1,234), dots
(1.234), or underscores (1_234). Cannot be used with --output. [possible
values: commas, dots, plain, underscores]
-o, --output <output> Outputs Tokei in a specific format. Compile with additional features for more
format support. [possible values: cbor, json, yaml]
-s, --sort <sort> Sort languages based on column [possible values: files, lines, blanks, code,
comments]
-t, --type <types> Filters output by language type, seperated by a comma. i.e. -t=Rust,Markdown
ARGS:
<input>... The path(s) to the file or directory to be counted.
```