XAMPPRocky/tokei — a frontend project — sits at 15.1k GitHub stars in the Frontend space. Count your code, quickly.
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
Tokei is a program that displays statistics about your code. Tokei will show the number of files, total lines within those files and code, comments, and blanks grouped by language.
Tokei is very fast, and is able to count millions of lines of code in seconds.
Check out the 11.0.0 release
to see how Tokei's speed compares to others.
Tokei is accurate, Tokei correctly handles multi line comments,
nested comments, and not counting comments that are in strings. Providing an
accurate code statistics.
Tokei has huge range of languages, supporting over 150 languages, and
their various extensions.
Tokei can output in multiple formats (CBOR, JSON, YAML)
allowing Tokei's output to be easily stored, and reused. These can also be
reused in tokei combining a previous run's statistics with another set.
Tokei is available on Mac, Linux, and Windows. See installation
instructions for how to get Tokei on your platform.
Tokei is also a library allowing you to easily integrate it with other
projects.
Tokei comes with and without color. Set the env variable NO_COLOR to 1, and
it'll be black and white.
Tokei has a configuration file that allows you to change default behaviour.
The file can be named tokei.toml or .tokeirc. Currently tokei looks for
this file in three different places. The current directory, your home directory,
and your configuration directory.
How to use Tokei
Basic usage
This is the basic way to use tokei. Which will report on the code in ./foo
and all subfolders.
$ tokei ./foo
Multiple folders
To have tokei report on multiple folders in the same call, simply add all the
folders you'd like tokei to examine.
$ tokei ./foo ./bar ./baz
Excluding folders
Tokei will respect all .gitignore and .ignore files, and you can use
the --exclude option to exclude any additional files. The --exclude flag has
the same semantics as .gitignore.
$ tokei ./foo --exclude *.rs
Paths to exclude can also be listed in a .tokeignore file, using the same
syntax as .gitignore files.
Sorting output
By default tokei sorts alphabetically by language name, however using --sort
tokei can also sort by any of the columns.
blanks, code, comments, lines
$ tokei ./foo --sort code
Outputting file statistics
By default tokei only outputs the total of the languages, and using --files
flag tokei can also output individual file statistics.
$ tokei ./foo --files
Outputting into different formats
Tokei normally outputs into a nice human readable format designed for terminals.
There is also using the --output option various other formats that are more
useful for bringing the data into another program.
Note: This version of tokei was compiled without any serialization formats, to enable serialization, reinstall
tokei with the features flag.
Tokei can also take in the outputted formats added in the previous results to its
current run. Tokei can take either a path to a file, the format passed in as a
value to the option, or from stdin.
$ tokei ./foo --input ./stats.json
Options
USAGE:
tokei [FLAGS] [OPTIONS] [--] [input]...
FLAGS:
-f, --files Will print out statistics on individual files.
-h, --help Prints help information
--hidden Count hidden files.
-l, --languages Prints out supported languages and their extensions.
--no-ignore Don't respect ignore files (.gitignore, .ignore, etc.). This implies --no-ignore-parent,
--no-ignore-dot, and --no-ignore-vcs.
--no-ignore-dot Don't respect .ignore and .tokeignore files, including those in parent directories.
--no-ignore-parent Don't respect ignore files (.gitignore, .ignore, etc.) in parent directories.
--no-ignore-vcs Don't respect VCS ignore files (.gitignore, .hgignore, etc.), including those in parent
directories.
-V, --version Prints version information
-v, --verbose Set log output level:
1: to show unknown file extensions,
2: reserved for future debugging,
3: enable file level trace. Not recommended on multiple files
OPTIONS:
-c, --columns <columns> Sets a strict column width of the output, only available for terminal output.
-e, --exclude <exclude>... Ignore all files & directories matching the pattern.
-i, --input <file_input> Gives statistics from a previous tokei run. Can be given a file path, or "stdin" to
read from stdin.
-o, --output <output> Outputs Tokei in a specific format. Compile with additional features for more format
support. [possible values: cbor, json, yaml]
-s, --sort <sort> Sort languages based on column [possible values: files, lines, blanks, code, comments]
-t, --type <types> Filters output by language type, separated by a comma. i.e. -t=Rust,Markdown
ARGS:
<input>... The path(s) to the file or directory to be counted.
Dockerized version
Tokei is available in a small alpine-based docker image, buildable through earthly:
earthly +docker
Once built, one can run the image with:
docker run --rm -v /path/to/analyze:/src tokei .
Or, to simply analyze the current folder (linux):
docker run --rm -v $(pwd):/src tokei .
Supported Languages
If there is a language that you would to add to tokei feel free to make a pull
request. Languages are defined in languages.json, and you can
read how to add and test your language in our CONTRIBUTING.md.
Abap
ActionScript
Ada
Agda
Alex
Alloy
APL
Asn1
Asp
AspNet
Assembly
AssemblyGAS
ATS
Autoconf
AutoHotKey
Automake
AWK
Bash
Batch
Bazel
Bean
Bicep
Bitbake
BQN
BrightScript
C
C3
Cabal
Cassius
Ceylon
CHeader
Cil
Clojure
ClojureC
ClojureScript
CMake
Cobol
CoffeeScript
Cogent
ColdFusion
ColdFusionScript
Coq
Cpp
CppHeader
Crystal
CSharp
CShell
Css
Cuda
CUE
Cython
D
D2
DAML
Dart
DeviceTree
Dhall
Dockerfile
DotNetResource
DreamMaker
Dust
Ebuild
EdgeDB
Edn
Elisp
Elixir
Elm
Elvish
EmacsDevEnv
Emojicode
Erlang
Factor
FEN
Fish
FlatBuffers
ForgeConfig
Forth
FortranLegacy
FortranModern
FreeMarker
FSharp
Fstar
GDB
GdScript
GdShader
Gherkin
Gleam
Glsl
Go
Graphql
Groovy
Gwion
Hamlet
Handlebars
Happy
Hare
Haskell
Haxe
Hcl
Hex
Hex0
Hex1
Hex2
HiCAD
hledger
Hlsl
HolyC
Html
Hy
Idris
Ini
IntelHex
Isabelle
Jai
Janet
Java
JavaScript
Jq
Json
Jsx
Julia
Julius
Just
KakouneScript
KaemFile
Koka
Kotlin
Lean
Less
Lingua Franca
LinkerScript
Liquid
Lisp
LLVM
Logtalk
Lua
Lucius
M1Assembly
Madlang
Max
Makefile
Markdown
Mdx
Meson
Mint
Mlatu
ModuleDef
MonkeyC
MoonScript
MsBuild
Mustache
Nim
Nix
NotQuitePerl
NuGetConfig
Nushell
ObjectiveC
ObjectiveCpp
OCaml
Odin
OpenSCAD
OpenQASM
Org
Oz
Pascal
Perl
Perl6
Pest
Phix
Php
Po
Poke
Polly
Pony
PostCss
PowerShell
Processing
Prolog
Protobuf
PRQL
PSL
PureScript
Pyret
Python
Qcl
Qml
R
Racket
Rakefile
Razor
Renpy
ReStructuredText
RON
RPMSpecfile
Ruby
RubyHtml
Rust
Sass
Scala
Scheme
Scons
Sh
ShaderLab
Slang
Sml
Solidity
SpecmanE
Spice
Sql
SRecode
Stata
Stratego
Svelte
Svg
Swift
Swig
SystemVerilog
Slint
Tact
Tcl
Templ
Tex
Text
Thrift
Toml
Tsx
Twig
TypeScript
UMPL
UnrealDeveloperMarkdown
UnrealPlugin
UnrealProject
UnrealScript
UnrealShader
UnrealShaderHeader
UrWeb
UrWebProject
Vala
VB6
VBScript
Velocity
Verilog
VerilogArgsFile
Vhdl
VimScript
VisualBasic
VisualStudioProject
VisualStudioSolution
Vue
WebAssembly
Wolfram
Xaml
XcodeConfig
Xml
XSL
Xtend
Yaml
ZenCode
Zig
ZoKrates
Zsh
Common issues
Tokei says I have a lot of D code, but I know there is no D code!
This is likely due to gcc generating .d files. Until the D people decide on
a different file extension, you can always exclude .d files using the
-e --exclude flag like so
$ tokei . -e *.d
Canonical Source
The canonical source of this repo is hosted on
GitHub. If you have a GitHub account,
please make your issues, and pull requests there.
Related Tools
tokei-pie: Render tokei's output to
interactive sunburst chart.
Copyright and License
(C) Copyright 2015 by XAMPPRocky and contributors
See the graph for a full list of contributors.
Tokei is distributed under the terms of both the MIT license and the Apache License (Version 2.0).
See LICENCE-APACHE, LICENCE-MIT for more information.
No homepage URL was recorded for XAMPPRocky/tokei in TopGit's last sync. The README tab above frequently contains screenshots and demo links, or check the repository description on GitHub.
How active is development on XAMPPRocky/tokei?
The most recent commit recorded on XAMPPRocky/tokei was 2 months ago, based on the GitHub push timestamp. The repository has 722 forks — one of the better signals of community interest.
How many stars does XAMPPRocky/tokei have?
XAMPPRocky/tokei has 15.1k GitHub stars — refresh the page for the live number, or check github.com/XAMPPRocky/tokei. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
Is XAMPPRocky/tokei open source?
TopGit's metadata for XAMPPRocky/tokei does not record a license. Most public repositories on GitHub ARE open source, but the exact terms vary — verify by opening the LICENSE file directly.
What else is in the Frontend space?
XAMPPRocky/tokei is tracked by TopGit under the Frontend category, alongside 12 GitHub-tagged topics. Trending and Topics pages list peer repositories of comparable stars and language.
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/XAMPPRocky/tokei is the definitive source.
Read full README in the tab above.
Still deciding about tokei?
One click hands the question to an AI along with this page — see what it says about tokei.