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-08-26 10:30:59
- [tag:github.com,2008:Repository/1725199/v9.7.0 v9.7.0]
- by lildude
- 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
Activity Feed
Below the last 5 commits:
- 2026-09-29 08:54:57
- [tag:github.com,2008:Grit::Commit/5fbdfcb8133be2bed88bf3ce62b2335f50474525 Recognize HLSL .fx effect techniques and shader semantics (#8184)]
- by look https://github.com/look
- 2026-09-29 08:54:26
- [tag:github.com,2008:Grit::Commit/2f6ca8eb0084766c98bc44cdcd30374a115ab524 Recognize GLSL .frag shaders (#8233)]
- by look https://github.com/look
- 2026-09-27 08:41:29
- [tag:github.com,2008:Grit::Commit/d0921d10bb68a1249fc9eac64e472759f36e2fd8 Add RPM Spec heuristic for .spec files (#8178)]
- by look https://github.com/look
- 2026-09-25 07:04:01
- [tag:github.com,2008:Grit::Commit/76f88c6d3c22f8560d22d29854f24d9607f9edde Recognize ShaderLab .shader wrappers (#8177)]
- by look https://github.com/look
- 2026-09-22 05:05:50
- [tag:github.com,2008:Grit::Commit/90fe0515940a5192980b2545c33ec59ef9fef17b Remove redundant Vim Help heuristic (#8226)]
- by look https://github.com/look
References
- How Linguist Works on GitHub.
See also
- CLOC (Count Lines of Code) on COPTR.