Go to file
Aaron Power c7c670be5e Updated language list 2016-03-26 14:44:49 +00:00
src Added shebang support, added Assembly, Plain Text, LD Scripts, Makefiles, C Shell, and Device Trees 2016-03-25 14:41:11 +00:00
.gitignore reimplemented comment syntax again, added OCaml, and Standard ML 2016-01-26 20:23:21 +00:00
.travis.yml added files flag fixes: #19 2015-11-26 22:32:13 +00:00
CHANGELOG.md updated changelog 2016-03-25 14:44:29 +00:00
CONTRIBUTING.md reimplemented comment syntax again, added OCaml, and Standard ML 2016-01-26 20:23:21 +00:00
CONTRIBUTORS.md Added Luthaf to CONTRIBUTORS.md 2015-09-22 09:59:11 +01:00
Cargo.lock Added shebang support, added Assembly, Plain Text, LD Scripts, Makefiles, C Shell, and Device Trees 2016-03-25 14:41:11 +00:00
Cargo.toml Added shebang support, added Assembly, Plain Text, LD Scripts, Makefiles, C Shell, and Device Trees 2016-03-25 14:41:11 +00:00
LICENCE-APACHE reimplemented comment syntax again, added OCaml, and Standard ML 2016-01-26 20:23:21 +00:00
LICENCE-MIT reimplemented comment syntax again, added OCaml, and Standard ML 2016-01-26 20:23:21 +00:00
README.md Updated language list 2016-03-26 14:44:49 +00:00
cli.yml reimplemented multi line comment detection, and updated the readme to include cargo install 2016-01-24 17:11:39 +00:00

README.md

Tokei (時計)

GitHub License

A blazingly fast CLOC(Count Lines Of Code) program, written in Rust.

Canonical Source

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.

Installation

Automatic

If you have cargo 0.6.0>= installed just run the cargo install command.

$ cargo install tokei

Manual

Fedora 64 bit

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

Other

$ git clone https://github.com/Aaronepower/tokei.git
$ cd tokei
$ cargo build --release
Linux
# sudo mv target/release/tokei /usr/local/bin
OSX
# sudo mv target/release/tokei /usr/local/bin/tokei
Windows
  • 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/;

Usage

To use tokei, use must add it to your path. Then you can call tokei like so

$ tokei ./path/to/code

Options

Tokei 1.3.0
Aaron P. <theaaronepower@gmail.com>
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)

Supported Languages

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

Common issues

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.