Linguist

From COPTR
Revision as of 12:16, 30 March 2026 by Ross-spencer (talk | contribs) (Initial entry)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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-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
2025-09-18 09:55:02
[tag:github.com,2008:Repository/1725199/v9.3.0 v9.3.0]
by lildude

Activity Feed

Below the last 5 commits:

2026-05-20 09:34:20
[tag:github.com,2008:Grit::Commit/c94cbf94cb25296f71cdedc5051aa18f556b3c9d Add Quint Specification language (#7953)]
by beu5a https://github.com/beu5a
2026-05-18 16:27:22
[tag:github.com,2008:Grit::Commit/85b9eb48e7d8d6de4330bddc93653698511e662e Add IL Assembly language (#7961)]
by mg0x7BE https://github.com/mg0x7BE
2026-05-18 09:36:27
[tag:github.com,2008:Grit::Commit/e3c9e3ac881bea95e80b08734289dc280ef94567 Move fixtures added in #6565 to samples directory (#7966)]
by Alhadis https://github.com/Alhadis
2026-05-15 05:22:01
[tag:github.com,2008:Grit::Commit/08c3c969e8077edd29fa97e3fe0bae1154506968 Mark Julia package manifests (Manifest.toml) as generated (#7960)]
by ararslan https://github.com/ararslan
2026-05-01 14:12:03
[tag:github.com,2008:Grit::Commit/e535c9adf5306132e9df0b75ffe1ce2679873fe8 Add SpiceDB Schema language support (#7936)]
by ivanauth https://github.com/ivanauth

References

See also

  • CLOC (Count Lines of Code) on COPTR.