gitwtfhub

wtf is linguist?

yyx990803/linguist — explained in plain English

Analysis updated 2026-07-17 · repo last pushed 2018-01-28

7RubyAudience · developerComplexity · 2/5DormantSetup · easy

TL;DR

The tool GitHub uses to detect which programming languages a repository is written in and generate the colored language breakdown bar.

Mindmap

mindmap
  root((linguist))
    Inputs
      Repository files
      File extensions
      Shebang lines
    Outputs
      Language breakdown bar
      Per-file language tags
    Use Cases
      Fix mislabeled languages
      Ignore vendor folders
      Add new language support
    Tech Stack
      Ruby
      gitattributes
      Pattern matching

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Figure out why GitHub is misidentifying or missing a language in your repository's stats.

REASON 2

Use a .gitattributes file to make a vendor or generated-code folder excluded from language stats.

REASON 3

Contribute detection support for a programming language Linguist doesn't recognize yet.

REASON 4

Override the detected language for a specific file or folder in your project.

What's in the stack?

Ruby.gitattributes

How it stacks up

yyx990803/linguistmitchellh/xidlmitchellh/minitest-speed
Stars778
LanguageRubyRubyRuby
Last pushed2018-01-282011-03-092011-09-15
MaintenanceDormantDormantDormant
Setup difficultyeasyeasyeasy
Complexity2/52/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 30min

Runs behind the scenes on GitHub, using it as a library or contributing language support requires reading its detection heuristics.

License is not stated in the available content.

Yoink these prompts

Prompt 1
Explain how Linguist decides what language a file is written in, in the order it checks things.
Prompt 2
Help me write a .gitattributes entry to make Linguist ignore a vendor/ folder in my repo's language stats.
Prompt 3
My GitHub repo shows the wrong primary language on its main page, help me figure out why using Linguist's detection rules.
Prompt 4
Walk me through what's involved in adding support for a new language to Linguist.
Prompt 5
Show me how to force a specific file to be counted as documentation instead of code using Linguist's overrides.

Frequently asked questions

wtf is linguist?

The tool GitHub uses to detect which programming languages a repository is written in and generate the colored language breakdown bar.

What language is linguist written in?

Mainly Ruby. The stack also includes Ruby, .gitattributes.

Is linguist actively maintained?

Dormant — no commits in 2+ years (last push 2018-01-28).

What license does linguist use?

License is not stated in the available content.

How hard is linguist to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is linguist for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.