# tokei Code Statistics Counter

> Fast and accurate code statistics tool written in Rust. Counts lines of code, comments, and blanks across 200+ languages, with output in JSON, YAML, or CBOR for programmatic analysis of codebase composition.

- Skill: `agentskillexchange/tokei-code-statistics-counter` (Agent Skill)
- Install (CLI): `npx skillmds@latest add agentskillexchange/tokei-code-statistics-counter`
- Raw SKILL.md: https://api.skillmd.com/api/skills/agentskillexchange/tokei-code-statistics-counter/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: agentskillexchange (https://skillmd.com/u/agentskillexchange)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/agentskillexchange/tokei-code-statistics-counter

---


# tokei Code Statistics Counter

Fast and accurate code statistics tool written in Rust. Counts lines of code, comments, and blanks across 200+ languages, with output in JSON, YAML, or CBOR for programmatic analysis of codebase composition.

## Installation

Use the upstream install or setup path that matches your environment:
- cargo install tokei
- conda install -c conda-forge tokei
- brew install tokei
- cargo install --git https://github.com/XAMPPRocky/tokei.git tokei

Requirements and caveats from upstream:
- You can also build and install from source (requires the latest stable [Rust] compiler.)
- Tokei is available in a small alpine-based docker image, buildable through [earthly](https://github.com/earthly/earthly):

Basic usage or getting-started notes:
- ## Example
- reused in tokei combining a previous run's statistics with another set.
- ### Package Managers

- Source: https://github.com/XAMPPRocky/tokei
- Extracted from upstream docs: https://raw.githubusercontent.com/XAMPPRocky/tokei/HEAD/README.md

## Source

- [Agent Skill Exchange](https://agentskillexchange.com/skills/tokei-code-statistics-counter/)

