# tokei
> Count your code quickly and accurately by language

## Summary
A fast code statistics tool. Counts lines of code, comments, and blanks grouped by programming language with support for 150+ languages.

## Capabilities
- Counts code, comments, and blank lines by language
- Supports 150+ programming languages
- Very fast, even on large codebases
- Output in multiple formats (JSON, YAML, CBOR)

## When to Use
- Getting an overview of a codebase's language composition
- Tracking code size metrics over time
- Need a fast alternative to cloc

## When NOT to Use
- Need detailed per-function or per-class metrics

## Usage Patterns
### Count lines in current project
```
tokei
```
Shows a table of languages, files, lines, code, comments, and blanks

### Output as JSON
```
tokei -o json
```
Machine-readable JSON output for further processing

## Input / Output
- **stdout**: Table or structured output of code statistics

## Installation
- **homebrew**: `brew install tokei`
- **cargo**: `cargo install tokei`
- **pacman**: `sudo pacman -S tokei`

---
Source: https://littlescripts.sh/tools/tokei
