github-linguist/linguist

Language Savant. If your repository's language is being reported incorrectly, send us a pull request!

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 59 minutes ago
Added to GitGenius on September 4th, 2026
Created on May 9th, 2011
Open Issues & Pull Requests: 228 (+0)
GitHub issues: Enabled
Number of forks: 5,376
Total Stargazers: 13,681 (+0)
Total Subscribers: 590 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 5.1 hours
Mean response time: 73.2 days
90th percentile: 170.9 days
Tracked items: 220

How this project is maintained

Around half of the issues opened in the past year never receive a reply. 98% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Work labelled "Bug" is answered fastest, typically in about an hour, while "Add Language" waits about 13 days. Only 6% of issues opened in the past year have been closed. Three people close 81% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 62
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 708 days
Stale 30+ days: 57
Stale 90+ days: 52

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • Good First Issue (138)
  • Add Language (137)
  • Improvement (53)
  • Bug (45)
  • Invalid (4)
  • Blocked (1)
  • Help Wanted (1)
  • Pending Popularity (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

Linguist is a Ruby library that detects programming languages in source code files and generates language statistics for repositories.

The tool solves the problem of accurately identifying which programming languages are present in a codebase, which GitHub uses to ignore binary or vendored files, suppress generated files in diffs, and create language breakdown visualizations. It works by analyzing file contents and metadata to determine language, using character encoding detection and Git repository analysis to process entire codebases or individual files.

Linguist is essential for any project that needs accurate language detection and reporting, particularly those integrated with GitHub or requiring automated language statistics. It suits repositories of any size where correct language identification matters for documentation, metrics, or tooling. The tool operates in two modes: analyzing entire Git repositories to produce language breakdowns by percentage and file size, or examining single files for language detection. Users can inspect how the tool determined a file's language using the strategies flag, which shows the detection method and whether gitattributes overrides affected the result. The library can analyze repositories at specific Git revisions, making it useful for tracking language composition across branches or tags.

Development on the project is active and community-driven, with the README explicitly inviting pull requests when language detection is incorrect. The tool maintains comprehensive documentation covering how language detection works, how to override Linguist's behavior, and troubleshooting guidance. Installation requires careful attention to dependencies, particularly the native extensions charlock_holmes and rugged, which depend on system libraries including ICU, zlib, libcurl, and OpenSSL, with documented setup instructions for multiple platforms. The project provides both a Ruby API for programmatic use and a command-line interface with multiple output formats including JSON, making it accessible to different integration patterns.