{"id":51509563,"url":"https://github.com/murphsicles/linguist-tmp","last_synced_at":"2026-07-08T04:31:00.500Z","repository":{"id":358248484,"uuid":"1240246183","full_name":"murphsicles/linguist-tmp","owner":"murphsicles","description":"Fork of github/linguist with Zeta language support","archived":false,"fork":false,"pushed_at":"2026-05-16T11:58:46.000Z","size":41339,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"add-zeta-language","last_synced_at":"2026-05-16T13:47:44.326Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/murphsicles.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-05-15T23:21:34.000Z","updated_at":"2026-05-16T11:58:51.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/murphsicles/linguist-tmp","commit_stats":null,"previous_names":["murphsicles/linguist-tmp"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/murphsicles/linguist-tmp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murphsicles%2Flinguist-tmp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murphsicles%2Flinguist-tmp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murphsicles%2Flinguist-tmp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murphsicles%2Flinguist-tmp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/murphsicles","download_url":"https://codeload.github.com/murphsicles/linguist-tmp/tar.gz/refs/heads/add-zeta-language","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murphsicles%2Flinguist-tmp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35252324,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-08T02:00:06.796Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2026-07-08T04:30:58.849Z","updated_at":"2026-07-08T04:31:00.484Z","avatar_url":"https://github.com/murphsicles.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Linguist\n\n[![Actions Status](https://github.com/github/linguist/workflows/Run%20Tests/badge.svg)](https://github.com/github/linguist/actions) \n\n[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/github-linguist/linguist)\n\nThis library is used on GitHub.com to detect blob languages, ignore binary or vendored files, suppress generated files in diffs, and generate language breakdown graphs.\n\n## Documentation\n\n- [How Linguist works](/docs/how-linguist-works.md)\n- [Change Linguist's behaviour with overrides](/docs/overrides.md)\n- [Troubleshooting](/docs/troubleshooting.md)\n- [Contributing guidelines](CONTRIBUTING.md)\n\n## Installation\n\nInstall the gem:\n\n```bash\ngem install github-linguist\n```\n\n### Dependencies\n\nLinguist is a Ruby library so you will need a recent version of Ruby installed.\nThere are known problems with the macOS/Xcode supplied version of Ruby that causes problems installing some of the dependencies.\nAccordingly, we highly recommend you install a version of Ruby using Homebrew, `rbenv`, `rvm`, `ruby-build`, `asdf` or other packaging system, before attempting to install Linguist and the dependencies.\n\nLinguist uses [`charlock_holmes`](https://github.com/brianmario/charlock_holmes) for character encoding and [`rugged`](https://github.com/libgit2/rugged) for libgit2 bindings for Ruby.\nThese components have their own dependencies.\n\n1. charlock_holmes\n    * cmake\n    * pkg-config\n    * [ICU](http://site.icu-project.org/)\n    * [zlib](https://zlib.net/)\n2. rugged\n    * [libcurl](https://curl.haxx.se/libcurl/)\n    * [OpenSSL](https://www.openssl.org)\n\nYou may need to install missing dependencies before you can install Linguist.\nFor example, on macOS with [Homebrew](http://brew.sh/):\n\n```bash\nbrew install cmake pkg-config icu4c\n```\n\nOn Ubuntu:\n\n```bash\nsudo apt-get install build-essential cmake pkg-config libicu-dev zlib1g-dev libcurl4-openssl-dev libssl-dev ruby-dev\n```\n\n## Usage\n\n### Application usage\n\nLinguist can be used in your application as follows:\n\n```ruby\nrequire 'rugged'\nrequire 'linguist'\n\nrepo = Rugged::Repository.new('.')\nproject = Linguist::Repository.new(repo, repo.head.target_id)\nproject.language       #=\u003e \"Ruby\"\nproject.languages      #=\u003e { \"Ruby\" =\u003e 119387 }\n```\n\n### Command line usage\n\nThe `github-linguist` executable operates in two distinct modes:\n\n1. **[Git Repository mode](#git-repository)** - Analyzes an entire Git repository (when given a directory path or no path)\n2. **[Single file mode](#single-file)** - Analyzes a specific file (when given a file path)\n\n#### Git Repository\n\nA repository's languages stats can be assessed from the command line using the `github-linguist` executable.\nWithout any options, `github-linguist` will output the language breakdown by percentage and file size.\n\n```bash\ncd /path-to-repository\ngithub-linguist\n```\n\nYou can try running `github-linguist` on the root directory in this repository itself:\n\n```console\n$ github-linguist\n66.84%  264519     Ruby\n24.68%  97685      C\n6.57%   25999      Go\n1.29%   5098       Lex\n0.32%   1257       Shell\n0.31%   1212       Dockerfile\n```\n\n#### Additional options\n\n##### `--rev REV`\n\nThe `--rev REV` flag will change the git revision being analyzed to any [gitrevisions(1)](https://git-scm.com/docs/gitrevisions#_specifying_revisions) compatible revision you specify.\n\nThis is useful to analyze the makeup of a repo as of a certain tag, or in a certain branch.\n\nFor example, here is the popular [Jekyll open source project](https://github.com/jekyll/jekyll).\n\n```console\n$ github-linguist jekyll\n\n70.64%  709959     Ruby\n23.04%  231555     Gherkin\n3.80%   38178      JavaScript\n1.19%   11943      HTML\n0.79%   7900       Shell\n0.23%   2279       Dockerfile\n0.13%   1344       Earthly\n0.10%   1019       CSS\n0.06%   606        SCSS\n0.02%   234        CoffeeScript\n0.01%   90         Hack\n```\n\nAnd here is Jekyll's published website, from the gh-pages branch inside their repository.\n\n```console\n$ github-linguist jekyll --rev origin/gh-pages\n100.00% 2568354    HTML\n```\n\n##### `--breakdown`\n\nThe `--breakdown` or `-b` flag will additionally show the breakdown of files by language.\n\nYou can try running `github-linguist` on the root directory in this repository itself:\n\n```console\n$ github-linguist --breakdown\n66.84%  264519     Ruby\n24.68%  97685      C\n6.57%   25999      Go\n1.29%   5098       Lex\n0.32%   1257       Shell\n0.31%   1212       Dockerfile\n\nRuby:\nGemfile\nRakefile\nbin/git-linguist\nbin/github-linguist\next/linguist/extconf.rb\ngithub-linguist.gemspec\nlib/linguist.rb\n…\n```\n\n##### `--strategies`\n\nThe `--strategies` or `-s` flag will show the language detection strategy used for each file. This is useful for understanding how Linguist determined the language of specific files. Note that unless the `--json` flag is specified, this flag will set the `--breakdown` flag implicitly.\n\nYou can try running `github-linguist` on the root directory in this repository itself with the strategies flag:\n\n```console\n$ github-linguist --breakdown --strategies\n66.84%  264519     Ruby\n24.68%  97685      C\n6.57%   25999      Go\n1.29%   5098       Lex\n0.32%   1257       Shell\n0.31%   1212       Dockerfile\n\nRuby:\n  Gemfile [Filename]\n  Rakefile [Filename]\n  bin/git-linguist [Extension]\n  bin/github-linguist [Extension]\n  lib/linguist.rb [Extension]\n  …\n```\n\nIf a file's language is affected by `.gitattributes`, the strategy will show the original detection method along with a note indicating whether the gitattributes setting changed the result or confirmed it.\n\nFor instance, if you had the following .gitattributes overrides in your repo:\n\n```gitattributes\n\n*.ts linguist-language=JavaScript\n*.js linguist-language=JavaScript\n\n```\n\nthe output of Linguist would be something like this:\n\n```console\n100.00% 217        JavaScript\n\nJavaScript:\n  demo.ts [Heuristics (overridden by .gitattributes)]\n  demo.js [Extension (confirmed by .gitattributes)]\n```\n\n##### `--json`\n\nThe `--json` or `-j` flag output the data into JSON format.\n\n```console\n$ github-linguist --json\n{\"Dockerfile\":{\"size\":1212,\"percentage\":\"0.31\"},\"Ruby\":{\"size\":264519,\"percentage\":\"66.84\"},\"C\":{\"size\":97685,\"percentage\":\"24.68\"},\"Lex\":{\"size\":5098,\"percentage\":\"1.29\"},\"Shell\":{\"size\":1257,\"percentage\":\"0.32\"},\"Go\":{\"size\":25999,\"percentage\":\"6.57\"}}\n```\n\nThis option can be used in conjunction with `--breakdown` to get a full list of files along with the size and percentage data.\n\n```console\n$ github-linguist --breakdown --json\n{\"Dockerfile\":{\"size\":1212,\"percentage\":\"0.31\",\"files\":[\"Dockerfile\",\"tools/grammars/Dockerfile\"]},\"Ruby\":{\"size\":264519,\"percentage\":\"66.84\",\"files\":[\"Gemfile\",\"Rakefile\",\"bin/git-linguist\",\"bin/github-linguist\",\"ext/linguist/extconf.rb\",\"github-linguist.gemspec\",\"lib/linguist.rb\",...]}}\n\n```\n\nNB. The `--strategies` flag has no effect, when the `--json` flag is present.\n\n#### Single file\n\nAlternatively you can find stats for a single file using the `github-linguist` executable.\n\nYou can try running `github-linguist` on files in this repository itself:\n\n```console\n$ github-linguist grammars.yml\ngrammars.yml: 884 lines (884 sloc)\n  type:      Text\n  mime type: text/x-yaml\n  language:  YAML\n```\n\n#### Additional options\n\n##### `--breakdown`\n\nThis flag has no effect in *Single file* mode.\n\n##### `--strategies`\n\nWhen using the `--strategies` or `-s` flag with a single file, you can see which detection method was used:\n\n```console\n$ github-linguist --strategies lib/linguist.rb \nlib/linguist.rb: 105 lines (96 sloc)\n  type:      Text\n  mime type: application/x-ruby\n  language:  Ruby\n  strategy:  Extension\n```\n\nIf a file's language is affected by `.gitattributes`, the strategy will show whether the gitattributes setting changed the result or confirmed it:\n\nIn this fictitious example, it says \"confirmed by .gitattributes\" since the detection process (using the Filename strategy) would have given the same output as the override:\n```console\n.devcontainer/devcontainer.json: 27 lines (27 sloc)\n  type:      Text\n  mime type: application/json\n  language:  JSON with Comments\n  strategy:  Filename (confirmed by .gitattributes)\n```\n\nIn this other fictitious example, it says \"overridden by .gitattributes\" since the gitattributes setting changes the detected language to something different:\n\n```console\ntest.rb: 13 lines (11 sloc)\n  type:      Text\n  mime type: application/x-ruby\n  language:  Java\n  strategy:  Extension (overridden by .gitattributes)\n```\n\nHere, the `.rb` file would normally be detected as Ruby by the Extension strategy, but `.gitattributes` overrides it to be detected as Java instead.\n\n##### `--json`\n\nUsing the `--json` flag will give you the output for a single file in JSON format:\n\n```console\n$ github-linguist --strategies --json  lib/linguist.rb\n{\"lib/linguist.rb\":{\"lines\":105,\"sloc\":96,\"type\":\"Text\",\"mime_type\":\"application/x-ruby\",\"language\":\"Ruby\",\"large\":false,\"generated\":false,\"vendored\":false}}\n```\n\nNB. The `--strategies` has no effect, when the `--json` flag is present.\n\n#### Docker\n\nIf you have Docker installed you can either build or use\nour pre-built images and run Linguist within a container:\n\n```console\n$ docker run --rm -v $(pwd):$(pwd):Z -w $(pwd) -t ghcr.io/github-linguist/linguist:latest\n66.84%  264519     Ruby\n24.68%  97685      C\n6.57%   25999      Go\n1.29%   5098       Lex\n0.32%   1257       Shell\n0.31%   1212       Dockerfile\n```\n\n##### Building the image\n\n```console\n$ docker build -t linguist .\n$ docker run --rm -v $(pwd):$(pwd):Z -w $(pwd) -t linguist\n66.84%  264519     Ruby\n24.68%  97685      C\n6.57%   25999      Go\n1.29%   5098       Lex\n0.32%   1257       Shell\n0.31%   1212       Dockerfile\n$ docker run --rm -v $(pwd):$(pwd) -w $(pwd) -t linguist github-linguist --breakdown\n66.84%  264519     Ruby\n24.68%  97685      C\n6.57%   25999      Go\n1.29%   5098       Lex\n0.32%   1257       Shell\n0.31%   1212       Dockerfile\n\nRuby:\nGemfile\nRakefile\nbin/git-linguist\nbin/github-linguist\next/linguist/extconf.rb\ngithub-linguist.gemspec\nlib/linguist.rb\n…\n```\n\n## Contributing\n\nPlease check out our [contributing guidelines](CONTRIBUTING.md).\n\n## License\n\nThe language grammars included in this gem are covered by their repositories' respective licenses.\n[`vendor/README.md`](/vendor/README.md) lists the repository for each grammar.\n\nAll other files are covered by the MIT license, see [`LICENSE`](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmurphsicles%2Flinguist-tmp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmurphsicles%2Flinguist-tmp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmurphsicles%2Flinguist-tmp/lists"}