This 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. Linguist is a Ruby library so you will need a recent version of Ruby installed. There are known problems with the macOS/XCode supplied version of Ruby that causes problems installing some of the dependencies. Accordingly, 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. Linguist uses charlock_holmes for character encoding and rugged for libgit2 bindings for Ruby. These components have their own dependencies. A repository's languages stats can also be assessed from the command line using the github-linguist executable. Without any options, github-linguist will output the breakdown that correlates to what is shown in the language stats bar.

Features

  • Create a language stats bar which displays the languages percentages for the files in the repository
  • Detect blob languages, ignore binary or vendored files
  • Suppress generated files in diffs, and generate language breakdown graphs
  • Linguist takes the list of languages it knows from languages.yml and uses a number of methods to try and determine the language used by each file
  • Linguist goes through all the files in a repository and excludes all files that it determines to be binary data
  • The results of this analysis are cached for the lifetime of your repository

Project Samples

Project Activity

See All Activity >

Categories

Graphics, Libraries

License

MIT License

Follow Linguist

Linguist Web Site

Other Useful Business Software
$300 in Free Credit Towards Top Cloud Services Icon
$300 in Free Credit Towards Top Cloud Services

Build VMs, containers, AI, databases, storage—all in one place.

Start your project in minutes. After credits run out, 20+ products include free monthly usage. Only pay when you're ready to scale.
Get Started
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Linguist!

Additional Project Details

Operating Systems

Linux, Mac

Programming Language

Ruby

Related Categories

Ruby Graphics Software, Ruby Libraries

Registered

2021-06-29