# Install tokei with Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, scoop, winget, zypper

Program that allows you to count code, quickly. Version 14.0.0 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:tokei
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install tokei
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install tokei
```

  Evidence: MacPorts ports tree: devel/tokei/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add tokei
```

  Evidence: Alpine Linux edge package indexes: tokei from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install tokei
```

  Evidence: Debian stable package indexes: tokei from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install tokei
```

  Evidence: Fedora Rawhide package metadata: tokei from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#tokei
```

  Evidence: nixpkgs package indexes: pkgs/by-name/to/tokei/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S tokei
```

  Evidence: Arch Linux sync databases: tokei from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install tokei
```

  Evidence: openSUSE Tumbleweed package metadata: tokei from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

### Windows

- Scoop (92%):

```sh
scoop install main/tokei
```

  Evidence: Scoop official bucket manifest trees: bucket/tokei.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id XAMPPRocky.Tokei -e
```

  Evidence: Windows Package Manager source index: XAMPPRocky.Tokei from https://cdn.winget.microsoft.com/cache/source.msix

## Package facts

- **Package key:** brew:tokei
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/tokei>
- **Version:** 14.0.0
- **Source summary:** Program that allows you to count code, quickly
- **Homepage:** <https://github.com/XAMPPRocky/tokei>
- **Repository:** <https://github.com/XAMPPRocky/tokei>
- **Upstream docs:** <https://github.com/XAMPPRocky/tokei#readme>
- **License:** Apache-2.0 OR MIT
- **Source archive:** <https://github.com/XAMPPRocky/tokei/archive/refs/tags/v14.0.0.tar.gz>
- **Generated:** 2026-07-08T18:08:21+00:00

## Executables

- tokei (cli)
- tokei (alias)

## Build dependencies

- rust

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 14.0.0
- Local data: ok
- Upstream repository: https://github.com/XAMPPRocky/tokei
- Upstream latest detected: v14.0.0 (current)
- info: No package-manager update timestamp was available.
## Project history and usage

Tokei is a Rust code-statistics tool that counts files, total lines, code, comments, and blanks by language, with both CLI and library use cases.

### Project history

The README positions Tokei as a fast and accurate counter for source trees, emphasizing multi-line and nested-comment handling, more than 150 supported languages, multiple machine-readable output formats, and use as a library.

Tokei's changelog follows Keep a Changelog and Semantic Versioning. Recent entries show continued maintenance through the 13.0.0 alpha series in 2024 and 2025, and a 14.0.0 release dated 2025-12-26 with additional language support such as C++20 modules, Ark TypeScript, and Koka.

### Adoption history

The upstream README lists package-manager installs across Unix, macOS, and Windows: apk, pacman, Cargo, conda-forge, dnf, FreeBSD pkg, NetBSD pkgin, Nix, zypper, Void, Homebrew, MacPorts, winget, and Scoop. The input facts independently list Homebrew, Debian, Fedora/DNF, MacPorts, Nix, Arch, Scoop, winget, and openSUSE.

The README also advertises crates.io, GitHub, Homebrew, Chocolatey, and Repology badges, reflecting the project's package-manager-centered distribution culture.

### How it is used

Typical use is pointing tokei at one or more source directories to get a language-by-language table. It respects .gitignore, .ignore, and .tokeignore by default, can exclude paths, sort by statistics columns, print per-file counts, and emit JSON, YAML, or CBOR for downstream tools.

Because tokei can read prior output back in, it also supports workflows that snapshot code statistics and combine them with later runs.

### Why package nerds care

Tokei is significant in the package-nerd niche because it is both a benchmarkable Rust CLI and a widely packaged developer utility. It is small enough to install casually, but broad enough to become a standard smoke-test tool for language detection, ignore-file behavior, terminal output, and package metadata across many ecosystems.

Its long package-manager list and machine-readable output make it useful for maintainers comparing source trees, release artifacts, vendored code, or language mix without bringing in a full analytics stack.

### Timeline

- Current: README documents support for Mac, Linux, and Windows, more than 150 languages, JSON/YAML/CBOR output, and library use.
- 2024-03-04: 13.0.0-alpha.1 changelog entry added maintenance and language-data updates.
- 2025-07-21: 13.0.0-alpha.9 changelog entry included Markdown CRLF and mixed-line-ending fixes.
- 2025-12-26: 14.0.0 changelog entry added C++20 modules and Ark TypeScript support.

### Related projects

- Tokei belongs to the same utility family as cloc and scc, though the cited upstream material emphasizes Tokei's own speed, accuracy, language coverage, and Rust library interface.
- Repology, Homebrew, Cargo, winget, Scoop, and distribution package managers are part of the adoption surface documented by the README and input facts.

### Sources

- <https://github.com/XAMPPRocky/tokei#readme>
- <https://github.com/XAMPPRocky/tokei/blob/master/CHANGELOG.md>
- source_facts.package-manager


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** tokei
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Debian apt - tokei - 12.1.2-6+b1: normalized package name match | Debian stable package indexes: tokei from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | display statistics about your code | https://tokei.rs
- Nix - tokei: normalized package name match | nixpkgs package indexes: pkgs/by-name/to/tokei/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - tokei - 14.0.0-r0: normalized package name match | Alpine Linux edge package indexes: tokei from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | A blazingly fast CLOC (Count Lines Of Code) program | https://github.com/XAMPPRocky/tokei
- dnf - tokei - 14.0.0-5.fc45: normalized package name match | Fedora Rawhide package metadata: tokei from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Count your code, quickly | https://crates.io/crates/tokei
- pacman - tokei - 14.0.0-1: normalized package name match | Arch Linux sync databases: tokei from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A blazingly fast CLOC (Count Lines Of Code) program | https://github.com/XAMPPRocky/tokei
- zypper - tokei - 14.0.0+git0-1.1: normalized package name match | openSUSE Tumbleweed package metadata: tokei from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Code statistics commandline tool | https://github.com/XAMPPRocky/tokei
- MacPorts - tokei: normalized package name match | MacPorts ports tree: devel/tokei/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/tokei: normalized package name match | Scoop official bucket manifest trees: bucket/tokei.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - XAMPPRocky.Tokei: normalized package name match | Windows Package Manager source index: XAMPPRocky.Tokei from https://cdn.winget.microsoft.com/cache/source.msix


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [rust](https://www.automicvault.com/pkg/brew/rust/) - Build dependency declared by Homebrew.
- [cargo-llvm-lines](https://www.automicvault.com/pkg/brew/cargo-llvm-lines/) - Shares av.db curated category or tags: cli, code-analysis, developer-tools, rust.
- [gnu-complexity](https://www.automicvault.com/pkg/brew/gnu-complexity/) - Shares av.db curated category or tags: cli, code-analysis, code-metrics, developer-tools.
- [gocloc](https://www.automicvault.com/pkg/brew/gocloc/) - Shares av.db curated category or tags: cli, code-analysis, code-metrics, developer-tools.
- [lizard-analyzer](https://www.automicvault.com/pkg/brew/lizard-analyzer/) - Shares av.db curated category or tags: cli, code-analysis, code-metrics, developer-tools.
- [pmccabe](https://www.automicvault.com/pkg/brew/pmccabe/) - Shares av.db curated category or tags: cli, code-analysis, code-metrics, developer-tools.
- [castxml](https://www.automicvault.com/pkg/brew/castxml/) - Shares av.db curated category or tags: cli, code-analysis, developer-tools.
- [ccheck](https://www.automicvault.com/pkg/brew/ccheck/) - Shares av.db curated category or tags: cli, code-analysis, developer-tools.
- [clang-include-graph](https://www.automicvault.com/pkg/brew/clang-include-graph/) - Shares av.db curated category or tags: cli, code-analysis, developer-tools.
- [tokei](https://www.automicvault.com/pkg/cargo/tokei/) - Same normalized package name exists in another local package ecosystem.

## Combined YAML source

View the package source record on GitHub. [combined/tokei.yml](https://github.com/automic-vault/db/blob/main/combined/tokei.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
