Latest patch on December 6, 2017
bashgithub shenaniganson December 2, 2017
compleatbug fixes + polishon December 2, 2017
manextra pompouson November 30, 2017
srcmore progresson December 6, 2017
.ctagsreadmeon December 2, 2017
.ignorenicer ignoreson November 30, 2017
.travis.ymladd support for a lot of files; nearly rea…on December 3, 2017
.yamllintreadmeon December 2, 2017
CONTRIBUTING.mddocs + update benchmarkson December 1, 2017
Justfilegithub shenaniganson December 2, 2017
LICENSEadded license finally lol.on November 27, 2017
README.mdscreenshoton December 3, 2017
TODO.mdstarting to do concurrency stuff hopefullyon December 4, 2017
screenshot.pngscreenshoton December 3, 2017
shake.hspolygloton December 4, 2017


Build Status

poly is a command-line tool that determines project contents.

Screenshot of sample output


Reasons to use polyglot:

  • Fast: 217 ms to run on the entire GHC codebase
  • Accurate: won't confuse Coq and Verilog
  • Pretty: magenta output

Reasons not to use polyglot:

  • It's written in ATS
  • No regex-based exclusions


On the Rust repo:

Tool Language Time
polyglot ATS 218.3 ms
loc Rust 139.5 ms
tokei Rust 333.3 ms
cloc Perl 15.51 s
linguist Ruby 16.21 s


Polyglot distinguishes itself from tokei and loc by being able to disambiguate file names. Thus, poly will not confuse Happy for Yacc (for instance).


The easiest way to install is to use the installation script, like so:

curl -sSl | bash -s

You may need to add $HOME/.local/bin to your PATH and $HOME/.local/share/man/man1 to your MANPATH.

You can optionally install compleat for shell completions as well.


If you install stack, pandoc and patscc, you can install poly with

 $ ./shake.hs install


You can view manpages for poly with

 $ man poly