# Tokei
Code statistics tool written in Rust. Counts lines of code, comments, and blanks across 150+ languages. Properly handles multi-line comments, nested comments, and strings.
## Install
```bash
brew install tokei
cargo install tokei
```
## Usage
```bash
tokei . # current directory
tokei ./foo ./bar # multiple paths
tokei --files . # per-file breakdown
tokei --sort code . # sort by code lines
tokei --exclude "*.min.js" . # exclude patterns
tokei -o json . # JSON output (also: yaml, cbor)
```
Respects `.gitignore` automatically. Configure via `tokei.toml` or `.tokeirc`.
---
See also: [[scc]], [[cloc]], [[Counting Lines of Code]]