google/magika
Fast and accurate AI powered file content types detection observed · 2026-10-15
Health v2 · maintenance only
87/100
- Activity 99
- Release rhythm 74
- Longevity 82
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-10-21. Adoption (stars, forks) is never an input.
- gap_med: 20
- age_days: 1155
- days_rel: 179
- days_push: 6
- n_releases_24m: 12
Adoption not part of the score
18718 stars · 1178 forks observed · 2026-10-15
What it is AI-extracted, prompt v1, taxonomy v1, 2026-10-19, confidence 0.98
Magika is an AI‑powered tool that detects a file's content type using a tiny deep‑learning model. It is available as a fast command‑line utility and as language bindings for Python, Rust, JavaScript/TypeScript and Go.
Use cases
- Identify the true MIME type of unknown files in a security pipeline
- Classify large batches of files by content type for data ingestion
- Detect file types in a CI/CD workflow to enforce policy compliance
- Replace unreliable "file" or "magic" utilities in scripts
- Provide content‑type hints for indexing services like Elasticsearch
When to choose
- You need high‑accuracy file type detection (≈99% on a 200+ type test set)
- You want a solution that runs quickly on a single CPU without GPU
- You prefer an open‑source tool with bindings for multiple languages
- You need to process thousands of files in parallel from the command line
When to avoid
- You require detection of hundreds or thousands of obscure formats not covered by the ~200 supported types
- You need real‑time inference on extremely low‑latency edge devices where even a few milliseconds matter
- You depend on a single‑language library without a binding for your stack
Facets
cli-tool · maturity active
parser cli api-framework security data-science windows cli python rust ai-powered deep-learning mime-types onnx rust-cli python-api npm-package go-wip linux macos nodejs docker
8 sources
- readme: https://github.com/google/magika · fetched 2026-10-15 · 3c33b75d9f6d
- homepage: https://securityresearch.google/magika/ · fetched 2026-10-05 · ec15d30f9bd5
- site_page: https://securityresearch.google/magika/getting-started/installation · fetched 2026-10-05 · 19af51b62f71
- site_page: https://securityresearch.google/magika/getting-started/quick-start · fetched 2026-10-05 · 0b720bd7d2ac
- registry_pypi: https://pypi.org/pypi/magika/json · fetched 2026-08-29 · 1860273316e6
- registry_crates: https://crates.io/api/v1/crates/magika · fetched 2026-10-05 · 1852fdb3a107
- site_page: https://securityresearch.google/magika/additional-resources/faq · fetched 2026-10-05 · 31f6373ff4e3
- site_page: https://securityresearch.google/magika/additional-resources/changelog · fetched 2026-10-05 · 03a7d6528fb4
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| google/magika | main | 87 |
For agents
Data as of 2026-10-19T08:05:51.212177+00:00 · Report a problem