Tokei (時計)
A blazingly fast CLOC(Count Lines Of Code) program, written in Rust.
The canonical source of this repo is hosted on GitLab. If you have a GitLab account, please make your issues, and pull requests there. However if you don't have one, please feel free to make the issue on GitHub.
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 target/release/tokei /usr/local/bin/tokei
- Create a folder for tokei
- search for
env
- open "edit your enviroment variables"
- edit
PATH
- append folder path to the end of the string ie:
<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. <[email protected]>
A quick CLOC (Count Lines Of Code) tool
USAGE:
Tokei [FLAGS] [OPTIONS] <input>... [--]
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 <exclude> Will ignore all files and directories containing the word ie --exclude node_modules
-s, --sort <sort> Will sort based on a certain column ie --sort=files will sort by file count. [values: files total blanks code commments]
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
- Name of language
- Most common file extension
- The comment syntax (Does it have block comments? is it the same as C?)
ActionScript
Assembly
BASH
Batch
C
C Header
C Shell
C#
C
C Header
CSS
Clojure
CoffeeScript
ColdFusion
ColdFusion CFScript
D
Dart
Device Tree
FORTRAN Legacy
FORTRAN Modern
Go
HTML
Haskell
JAI
JSON
JSX
Java
JavaScript
Julia
LD Script
LESS
LISP
Lua
Makefile
Markdown
OCaml
Objective C
Objective C
PHP
Pascal
Perl
Plain Text
Polly
Python
R
Ruby
Ruby HTML
Rust
SQL
Sass
Standard ML
Swift
TOML
TeX
TypeScript
XML
YAML
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
(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.