tokei Count lines of code
Light · Postcard
102 × 152 mm · PDF
Dark · Postcard
102 × 152 mm · PDF
Ink saver · Postcard
102 × 152 mm · PDF
Light · A4 landscape
297 × 210 mm · PDF
Dark · A4 landscape
297 × 210 mm · PDF
Ink saver · A4 landscape
297 × 210 mm · PDF
Light · A3 landscape
420 × 297 mm · PDF
Dark · A3 landscape
420 × 297 mm · PDF
Ink saver · A3 landscape
420 × 297 mm · PDF
Start here
tokeitokei <path>...
tokei -ftokei -s codetokei -t=<lang>
tokei -e <glob>
tokei -o jsontokei -lConcepts
- Walk paths ignore files applied
- Match language by extension
- Split lines code / comments / blanks
Counting
tokeitokei <dir> <dir>
tokei -ftokei -s <key>
tokei -s code -f
tokei --hiddentokei -c <n>
tokei -ltokei -vtokei -VFiltering
tokei -t=<lang>,<lang>
tokei -t=Rust,Markdown
tokei -e <pattern>
tokei -e '*.d' -e <dir>
tokei --no-ignore
tokei --no-ignore-vcs
tokei --no-ignore-dot
tokei --no-ignore-parent
Output and config
tokei -o jsontokei -o yamltokei -o cbortokei -o json > stats.json
tokei -i stats.json
tokei -i stdin.tokeignoretokei.toml / .tokeirc
| Where | Command |
|---|---|
Cargo |
cargo install tokei |
Homebrew |
brew install tokei |
Arch |
pacman -S tokei |
Fedora |
sudo dnf install tokei |
Windows |
winget install XAMPPRocky.tokei |
Recipes
tokei -f -s code -t=Rust src
tokei -o json > now.jsongit stash -q && git checkout -q <rev>tokei -o json > then.jsongit checkout -q - && git stash pop -q
tokei -o json | jq '.Total.code'
printf 'vendor/\n*_test.go\n' >> .tokeignoretokei



