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-20 07:52:51
- [tag:github.com,2008:Grit::Commit/3f3902361b0718ae2607e051fe8b23ec1abf47f8 Update Elixir color to the official brand color (#8212)]
- by georgeguimaraes https://github.com/georgeguimaraes
- 2026-09-15 15:53:10
- [tag:github.com,2008:Grit::Commit/ee4fb24d13cb21a0eb43b30b52f5cde17fbba8ae Make Hosts File heuristic regex portable (#8198)]
- by look https://github.com/look
- 2026-09-12 06:01:38
- [tag:github.com,2008:Grit::Commit/16cac170f73c97eb4e4329d66fcb341ef25ef4f0 Recognize Apex .trigger files (#8183)]
- by look https://github.com/look
- 2026-09-11 09:13:44
- [tag:github.com,2008:Grit::Commit/8b57fcfd3e082d8d369c0abd9b5f90f273cf865e Improve M and MATLAB .m heuristics (#8185)]
- by look https://github.com/look
- 2026-09-11 09:12:51
- [tag:github.com,2008:Grit::Commit/640a0aee63c950d82efb4ea4d8f1c4b5b915af45 Distinguish RouterOS Script and Rascal .rsc files (#8179)]
- by look https://github.com/look
References
- How Linguist Works on GitHub.
See also
- CLOC (Count Lines of Code) on COPTR.