Linguist

From COPTR
Jump to navigation Jump to search


Identify the breakdown of programming languages used in a GitHub repository, or the anticipated language of an individual file
Homepage:https://github.com/github-linguist/linguist/tree/main
Status: Maintained ✅
Source Code:https://github.com/github-linguist/linguist/tree/main
License:MIT
Cost:Free and Open Source (FOSS)
Language:Ruby
Function:Content Profiling,File Format Identification

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

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-08-26 10:28:00
[tag:github.com,2008:Grit::Commit/e0c78d62c42abae6122235d8e68a7aa43eef89da Release v9.7.0 (#8147)]
by lildude https://github.com/lildude
2026-08-26 10:10:22
[tag:github.com,2008:Grit::Commit/196b2a14418cab005065c72c9759370934c184bc Add Rhai language support (#8150)]
by ruttydm https://github.com/ruttydm
2026-08-25 15:14:21
[tag:github.com,2008:Grit::Commit/8c837ad4158385a01d394238e185592f6687ac20 Add SIP (PyQt bindings specification) language (#8149)]
by saudzahirr https://github.com/saudzahirr
2026-08-24 13:34:52
[tag:github.com,2008:Grit::Commit/c878f456eed54087c17eaabf3e668ed2f9ec92ff Add Vespa Schema Definition language (#7880)]
by thomasht86 https://github.com/thomasht86
2026-08-24 09:30:37
[tag:github.com,2008:Grit::Commit/107f403b71d0eb3ef33f29beb43c42f95762e46b Detect PL/pgSQL by its DO block rather than by dollar quoting (#8138)]
by varuniyer https://github.com/varuniyer

References

See also

  • CLOC (Count Lines of Code) on COPTR.