Linguist
Description
Identify the breakdown of programming languages used in a GitHub repository, or the anticipated language of an individual file.
The most well-known output of linguist's process is the language breakdown graph shown on a repository on GitHub documenting the percentage of languages used along with a small chart visualizing that breakdown.
Unlike utilities like DROID, based on PRONOM, which rely on pattern matching to identify, in this case programming language, and thus, file format, GitHub's linguist is deterministic and uses a series of decision making strategies to determine the potential file format.
Algorithm
Linguist uses a number of strategies to reduce the amount of inputs it is dealing with including excluding binary objects and those identified as data before applying a series of identification strategies to try and determine the programming language used across a GitHub repository or an individual file.
Its algorithm is described in more detail on GitHub.
Among its strategies, linguist lists the following checks:
- Vim or Emacs modeline,
- commonly used filename,
- shell shebang,
- file extension,
- XML header,
- man page section,
- heuristics,
- naïve Bayesian classification
User Experiences
- How to add a programming language to GitHub Jake Lee on Software.
- Linguist Discussions on GitHub.
Development Activity
All development activity is visible on GitHub: https://github.com/github-linguist/linguist/commits
Release Feed
Below the last 3 release feeds:
- 2026-06-08 11:03:25
- [tag:github.com,2008:Repository/1725199/v9.6.0 v9.6.0]
- by lildude
- 2026-03-18 15:09:57
- [tag:github.com,2008:Repository/1725199/v9.5.0 v9.5.0]
- by lildude
- 2026-01-21 10:42:09
- [tag:github.com,2008:Repository/1725199/v9.4.0 v9.4.0]
- by lildude
Activity Feed
Below the last 5 commits:
- 2026-08-05 10:16:04
- [tag:github.com,2008:Grit::Commit/41eb09270ba1564cb7e65d1d67a6cc55a537aa61 Rebuild the published Docker image on a supported Ruby, and pin the g…]
- by kobihikri https://github.com/kobihikri
- 2026-07-28 09:31:22
- [tag:github.com,2008:Grit::Commit/af6f772786199696e4d07d618c9c5b625a1a03f0 Add test validating language_id on new language additions (#8079)]
- by lildude https://github.com/lildude
- 2026-07-27 18:54:12
- [tag:github.com,2008:Grit::Commit/767853446a7763ee1d1f04c8bdc4d2f92d834037 Identify ruby code generated by protoc-gen-twirp as generated (#8088)]
- by offbyone https://github.com/offbyone
- 2026-07-27 08:59:43
- [tag:github.com,2008:Grit::Commit/ff0f7fd3f796d963a629a82303428b0027589e91 Fix Git LFS pointer detection and exclusion (#8085)]
- by DecimalTurn https://github.com/DecimalTurn
- 2026-07-24 15:12:43
- [tag:github.com,2008:Grit::Commit/8afc9a0110df1b62c723d51bea82bd29345f92d3 Update Gno language color (#8081)]
- by karagozemin https://github.com/karagozemin
References
- How Linguist Works on GitHub.
See also
- CLOC (Count Lines of Code) on COPTR.