A blazingly fast CLOC(Count Lines Of Code) program, written in Rust.
If you have cargo 0.6.0>=
installed just run the cargo install
command.
$ cargo install tokei
Install rust and cargo from either the official page or use a copr repo such as Rust
$ dnf copr enable phnxrbrn/tokei
$ dnf install tokei
$ git clone https://github.com/Aaronepower/tokei.git
$ cd tokei
$ cargo build --release
# sudo mv target/release/tokei /usr/local/bin
# sudo mv <your_download_location>/tokei /usr/local/bin/tokei
env
PATH
<path_stuff_here>;C:/tokei;
To use tokei, use must add it to your path. Then you can call tokei like so
$ tokei ./path/to/code
``` Tokei 1.3.0 Aaron P. theaaronepower@gmail.com A quick CLOC (Count Lines Of Code) tool
USAGE: Tokei [FLAGS] [OPTIONS] ... [--]
FLAGS: -f, --files Will print out the files found only recommended for debugging purposes -h, --help Prints help information -l, --languages prints out supported languages and their extensions -V, --version Prints version information
OPTIONS:
-e, --exclude
ARGS: input... The input file(s)/directory(ies)
```
If there is a language that you want added submit a pull request with the following information
ActionScript
BASH
Batch
C
C++
ColdFusion CFScript
ColdFusion
Clojure
CoffeeScript
C#
CSS
D
Dart
LISP
FORTRAN Legacy
FORTRAN Modern
Go
C Header
C++ Header
Haskell
HTML
JAI
Java
Julia
JavaScript
JSON
JSX
LESS
Objective-C
Markdown
Objective-C++
Pascal
PHP
Perl
Python
R
Ruby
Ruby HTML
Rust
Sass
SQL
TeX
Swift
TOML
TypeScript
XML
YAML
If you get errors like the following, it is mostly like due to having folders with paths that too long. For example NPM<3.0.0 node_modules
generates long path files, which causes problems on windows. You can exclude these paths with theexclude
argument, or in the case of NPM, update to >3.0.0, and update your codebase dependencies.
"The system cannot find the path specified.\r\n"
thread <main> has overflowed its stack
Illegal instruction: 4
(C) Copyright 2015 by Aaron Power and contributors
See CONTRIBUTORS.md 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.