| name | tokei |
| description | Use this skill when the user wants to count lines of code, get code statistics for a project, or analyze code by language. |
tokei Plugin
Count your code quickly. Fast code statistics for 150+ languages.
Commands
Count
tokei count run — Count code statistics
tokei count files — Count with individual file stats
tokei count json — Output as JSON
Usage Examples
- "Count lines of code in this directory"
- "Get code statistics as JSON"
- "Show per-file statistics"
Installation
cargo install tokei
brew install tokei
Examples
tokei .
tokei ./src
tokei --files ./src
tokei --output json ./src
tokei --sort code ./src
tokei ./src --exclude *.test.*
Output Columns
- Files — number of files
- Lines — total lines
- Code — lines of code
- Comments — lines of comments
- Blanks — blank lines
Key Features
- Supports 150+ languages
- Respects .gitignore
- Multiple output formats (text, JSON, YAML, CBOR)
- Very fast (millions of lines in seconds)
- Accurate multi-line comment handling