google/magika

Fast and accurate AI powered file content types detection

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 9 minutes ago
Added to GitGenius on September 3rd, 2026
Created on August 22nd, 2023
Open Issues & Pull Requests: 163 (+0)
GitHub issues: Enabled
Number of forks: 1,125
Total Stargazers: 18,021 (+8)
Total Subscribers: 75 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 46.2 hours
Mean response time: 39.8 days
90th percentile: 121.9 days
Tracked items: 235

How this project is maintained

Around half of the issues opened in the past year never receive a reply. 75% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Work labelled "rust" is answered fastest, typically in under an hour, while "documentation" waits about 3 weeks. 81% of tracked open issues have had no activity in three months, so the open count overstates what is actively being worked. Only 5% of issues opened in the past year have been closed.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 85
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 422 days
Stale 30+ days: 82
Stale 90+ days: 72

Recent activity

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

Top labels

  • python (57)
  • missing content type (53)
  • content type to import in KB (36)
  • misdetection (36)
  • needs triage (23)
  • documentation (17)
  • rust (12)
  • testing (11)

Most active issues this week

Detailed Description

Magika is an AI-powered file type detection tool that uses deep learning to identify file content types with high accuracy.

The tool addresses the challenge of reliably determining what type of file you are dealing with, which matters for security scanning, content policy enforcement, and file routing. Magika trains a custom deep learning model on a large dataset of files across many content types and runs inference on just a limited portion of each file's content, achieving results in milliseconds even on a single CPU. The model itself is compact, weighing only a few megabytes, and the tool exposes detection through multiple interfaces: a command-line tool written in Rust, a Python API, and bindings for JavaScript/TypeScript and Go. Users can control tolerance for errors through different prediction modes and per-content-type confidence thresholds that determine whether to return a specific classification or a generic fallback label.

Magika suits projects that need fast, accurate file identification at scale, particularly those handling security-sensitive operations like email scanning or malware detection. The tool's near-constant inference time regardless of file size and ability to process thousands of files simultaneously make it practical for high-volume scenarios. The command-line interface and Python API both support recursive directory scanning. If you need file type detection beyond what traditional MIME type checking provides, especially for distinguishing between similar textual formats, this tool's deep learning approach offers a significant accuracy advantage over existing methods.

The project receives issue reports primarily from outside users rather than the core team, indicating a substantial base of real-world adopters. Maintainers typically respond to new issues and pull requests within a few days. Work in the issue tracker centers on Python-related matters, missing content type support, and content type knowledge base imports.