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-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-18 08:47:33
[tag:github.com,2008:Grit::Commit/f6975dae65320bead500489f7efa14aa2d31c81b Add support for 3 new extensions and 7 filenames (#8118)]
by Alhadis https://github.com/Alhadis
2026-08-12 16:50:53
[tag:github.com,2008:Grit::Commit/2e859d2fff68b2646e2f45eb230aba2cde431535 Add B programming language (#8056)]
by aceinetx https://github.com/aceinetx
2026-08-11 08:30:56
[tag:github.com,2008:Grit::Commit/2cbe6fb6e2d35745d4fcefa435972f81a5625a54 Added support for ImHex's Pattern Language (#7411)]
by WerWolv https://github.com/WerWolv
2026-08-10 19:05:56
[tag:github.com,2008:Grit::Commit/cebdad77796be73580252f3f7058b5cab3a45105 Add Aleo instructions (#6969)]
by d0cd https://github.com/d0cd
2026-08-10 15:22:31
[tag:github.com,2008:Grit::Commit/2bdfc643d2243550a93ed8f42d5184c750d85013 Add Roblox `.rbxmx` as XML (#8032)]
by gords2 https://github.com/gords2

References

See also

  • CLOC (Count Lines of Code) on COPTR.