Updated October 16, 2026 · Maintained by huanglizhuo

tokei online: run tokei on GitHub repositories

tokei is a fast, open-source line counter written in Rust — but it is a command-line tool you install on your own machine. OctoCounts runs tokei server-side on public GitHub repositories: paste a repository URL and get files, total lines, code lines, comments, and blanks per language, without installing anything. This page explains when an online tokei run makes sense and how it compares with the CLI.

What is tokei?

tokei is an open-source source-line counter maintained at github.com/XAMPPRocky/tokei. It counts files, code lines, comment lines, and blank lines per programming language, and it is widely used because it is fast and recognizes hundreds of languages. It normally runs as a command-line tool on a checkout of code that already exists on your machine. OctoCounts uses tokei as its counting engine, so the numbers you get from the web app are tokei's numbers, produced by the same engine the CLI uses.

How do I run tokei online without installing it?

Paste a public GitHub repository URL (for example https://github.com/react/react) into the OctoCounts web app. OctoCounts downloads the repository's source archive — pinned to an exact commit SHA, so the count is reproducible — runs tokei on it, and returns the full breakdown: files, total lines, code, comments, blanks, and per-language totals. You can also point the analysis at a specific branch, tag, or commit. No account, token, or installation is required, and results are cached by commit, so re-viewing a report is instant. Try it with react/react or torvalds/linux.

Is OctoCounts really running tokei?

Yes. tokei is the counting engine, and every OctoCounts report states the exact tokei version that produced it, alongside the commit SHA it counted. The counting pipeline — archive download, default ignored directories, and how code, comment, and blank lines are classified per language — is documented on the counting methodology page. That means an OctoCounts report and a local tokei run on the same commit at the same version produce matching numbers, which is what makes the online results citable in a pull request, README, or report.

When should I use the tokei CLI instead?

Use the tokei CLI when your code is private or not hosted on GitHub: OctoCounts only analyzes public GitHub repositories, so private repositories, local-only projects, and other forges are CLI territory — clone or point tokei at the code on your machine. Use OctoCounts when the repository is public on GitHub and you want a shareable, commit-pinned report, a README badge, or API access without setting up a toolchain.

tokei CLIOctoCounts (tokei online)
Installationcargo install tokei, brew, or a release binaryNone — paste a URL
Repository accessAny code on your machine, including privatePublic GitHub repositories only
Commit pinningWhatever checkout you run it onPinned to an exact commit SHA, cached by commit
Shareable reportTerminal outputLinkable page, PNG/JSON/text export
README badgeBuild it yourselfLive SLOC badges
API—Public report API

Can I get tokei counts as a badge, API, or export?

Yes. From any OctoCounts report you can export plain text, JSON, or a shareable PNG card. Live badges put SLOC, code lines, files, comment share, or a single language's count into your README, refreshed from the cached report. The report API returns the same tokei-derived numbers as JSON for automation, and the Chrome, Edge, and Firefox extension shows a SLOC card right in the GitHub repository sidebar, next to the language bar.