{"id":13414182,"url":"https://github.com/vmchale/polyglot","last_synced_at":"2026-01-27T06:01:10.053Z","repository":{"id":39620128,"uuid":"112181977","full_name":"vmchale/polyglot","owner":"vmchale","description":"Tool to count lines of source code.","archived":false,"fork":false,"pushed_at":"2024-01-31T23:08:37.000Z","size":11370,"stargazers_count":246,"open_issues_count":6,"forks_count":6,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-07-31T21:51:49.742Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"ATS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vmchale.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-27T10:28:06.000Z","updated_at":"2024-07-06T05:17:28.000Z","dependencies_parsed_at":"2024-10-26T10:36:59.048Z","dependency_job_id":"d295c671-27ae-46c6-9cc9-6c6cecbad668","html_url":"https://github.com/vmchale/polyglot","commit_stats":null,"previous_names":[],"tags_count":130,"template":false,"template_full_name":null,"purl":"pkg:github/vmchale/polyglot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmchale%2Fpolyglot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmchale%2Fpolyglot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmchale%2Fpolyglot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmchale%2Fpolyglot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vmchale","download_url":"https://codeload.github.com/vmchale/polyglot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmchale%2Fpolyglot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28805317,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T05:43:52.625Z","status":"ssl_error","status_checked_at":"2026-01-27T05:43:48.957Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T21:00:16.157Z","updated_at":"2026-01-27T06:01:09.968Z","avatar_url":"https://github.com/vmchale.png","language":"ATS","funding_links":[],"categories":["Misc","Code"],"sub_categories":["Cloc"],"readme":"# polyglot\n\n[![Build Status](https://travis-ci.org/vmchale/polyglot.svg?branch=master)](https://travis-ci.org/vmchale/polyglot)\n\n`poly` is a command-line tool that determines project contents.\nThe goal is to able to point it to any directory and get an accurate,\ncomplete, and informative summary of its contents.\n\n\u003cimg alt=\"Screenshot of sample output\" src=https://github.com/vmchale/polyglot/raw/master/screenshot.png\u003e\n\nIt also has the secondary goal of advancing the state-of-the art for ATS, by\nwriting practical, distributable software and supporting tooling.\n\n## Pitch\n\nReasons to use polyglot:\n\n  * Accurate: won't confuse Coq and Verilog\n  * Fast: polyglot is faster than all other tools\n  * Pretty: magenta output\n\nReasons not to use polyglot:\n\n  * Written in ATS\n  * Best on Linux\n  * No regex-based exclusions\n  * Doesn't read `.gitignore` \u0026c.\n  * Doesn't count block comments\n  * Multiline string\n    [bug](https://github.com/Aaronepower/tokei/blob/master/COMPARISON.md#Accuracy).\n\n### Benchmarks\n\nOn the Rust repo:\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth\u003eTool\u003c/th\u003e\n    \u003cth\u003eLanguage\u003c/th\u003e\n    \u003cth\u003eTime\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003epolyglot\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eATS\u003c/td\u003e\n    \u003ctd\u003e134.6 ms\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eloc\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eRust\u003c/td\u003e\n    \u003ctd\u003e139.6 ms\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003escc\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eGo\u003c/td\u003e\n    \u003ctd\u003e225.4 ms\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003etokei\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eRust\u003c/td\u003e\n    \u003ctd\u003e262.6 ms\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003egocloc\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eGo\u003c/td\u003e\n    \u003ctd\u003e923.9 ms\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003ecloc\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003ePerl\u003c/td\u003e\n    \u003ctd\u003e5.610 s\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eenry\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eGo\u003c/td\u003e\n    \u003ctd\u003e6.926 s\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003elinguist\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eRuby\u003c/td\u003e\n    \u003ctd\u003e20.16 s\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\nFor more extensive benchmarks, see my [blog post](http://blog.vmchale.com/article/polyglot-comparisons)\nwith some additional data.\n\n### Heuristics\n\nPolyglot distinguishes itself from `tokei`, `gocloc`, and `loc` by being able to disambiguate file names.\nThus, `poly` will not confuse Happy for Yacc (for instance).\n\n## Installation\n\n### From a Script\n\nThe easiest way to install is to use the installation script, like so:\n\n```bash\ncurl -sSl https://raw.githubusercontent.com/vmchale/polyglot/master/bash/install.sh | sh -s\n```\n\nYou can optionally install [compleat](https://github.com/mbrubeck/compleat) for\nshell completions as well.\n\n### Vim Plugin\n\nThere is a [vim plugin](https://github.com/vmchale/polyglot-vim) available which\ncan count lines of code in a project.\n\n### Documentation\n\nYou can view manpages for `poly` with\n\n```\nman poly\n```\n\n## Building for Hacking\n\nYou can install [ats-pkg](http://hackage.haskell.org/package/ats-pkg)\nwith\n\n```bash\ncurl -sSl https://raw.githubusercontent.com/vmchale/atspkg/master/bash/install.sh | sh -s\n```\n\nAnd then build `poly` with\n\n```bash\ngit clone git@github.com:vmchale/polyglot.git\ncd polyglot\natspkg build --pkg-args './gc.dhall'\n```\n\nThis will put a binary at `target/poly`.\n\nIf you are on Mac, replace the last line with\n\n```bash\natspkg build --pkg-args './mac.dhall'\n```\n\n### Testing\n\nTo run the test suite\n\n```bash\natspkg test --pkg-args './gc.dhall'\n```\n\n## Languages\n\nFor languages already supported, see\n[LANGUAGES.md](https://github.com/vmchale/polyglot/blob/master/LANGUAGES.md)\n\n## Contents\n\n```\n-------------------------------------------------------------------------------\n Language             Files       Lines         Code     Comments       Blanks\n-------------------------------------------------------------------------------\n ATS                     17        3794         3626           41          127\n C                        1          24           22            0            2\n C Header                 1          43           35            0            8\n Dash                     5         144          110            8           26\n Dhall                    5          93           83            0           10\n Markdown                 6         938          813            0          125\n TOML                     1           3            3            0            0\n YAML                     1          58           52            0            6\n-------------------------------------------------------------------------------\n Total                   37        5097         4744           49          304\n-------------------------------------------------------------------------------\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvmchale%2Fpolyglot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvmchale%2Fpolyglot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvmchale%2Fpolyglot/lists"}