macOS
brew install magikalocal Homebrew formula metadata
brew
Fast and accurate AI powered file content types detection. Version 1.0.2 via Homebrew; verified 2026-06-22.
install
brew install magikalocal Homebrew formula metadata
sudo apk add magikaAlpine Linux edge package indexes · magika · source: dl-cdn.alpinelinux.org
nix profile install nixpkgs#magikanixpkgs package indexes · magika · source: raw.githubusercontent.com
winget install --id Google.Magika -eWindows Package Manager source index · Google.Magika · source: cdn.winget.microsoft.com
overview
Fast and accurate AI powered file content types detection
history
Magika is Google's AI-powered file content type detection tool. It ships as a Rust CLI plus Python, Rust, JavaScript/TypeScript, and emerging Go bindings, using a compact deep-learning model to classify binary and text files quickly on CPU.
Google created the public repository in August 2023 and announced the open-source release in February 2024. Official docs describe a model trained and evaluated on roughly 100 million samples across more than 200 content types, with about 99 percent average precision and recall on Google's test set.
The project moved beyond a Python package into a multi-language toolchain. The README documents a Rust command-line tool, Python API, JavaScript package, Rust bindings, web demo, and additional bindings, with release tags split by CLI, Python, JavaScript, and Go components.
Magika had unusually fast visibility because Google said it was already used at scale inside Gmail, Drive, and Safe Browsing routing, processing hundreds of billions of samples weekly. Official docs also note integrations with VirusTotal and abuse.ch.
The open-source package spread into package managers quickly: the README documents Homebrew, pipx, pip, cargo, npm, and installer scripts, while the supplied Homebrew input also lists apk, Nix, and winget packages. The GitHub repository has tens of thousands of stars and more than a thousand forks, reflecting broad interest from security and developer-tooling users.
The CLI scans files or directories and can emit descriptions, labels, MIME types, scores, JSON, or JSONL. Typical package-manager usage is `magika PATH`, often recursively, as a faster and ML-backed complement to extension- or magic-number-based detection.
Library users embed Magika to classify uploads, repositories, malware samples, or large file corpora. The docs emphasize near-constant inference time because the model uses a limited subset of file content.
Magika is package-nerd interesting because it packages an ML model as a normal fast CLI. It belongs in the same mental drawer as `file` and libmagic, but with model assets, language bindings, and security-scanning use cases layered on top.
Its multi-artifact release style matters to maintainers: Homebrew ships the CLI, Python users install `magika`, Rust users can install `magika-cli`, JavaScript users have npm bindings, and downstreams need to track model/data changes as part of versioning.
security posture
narrow executable package without higher-risk signals.
green risk · low confidence · appliance
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
executables
| Command | Kind | Exposure | Note |
|---|---|---|---|
magika | cli | global executable |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
https://github.com/google/magika
install metadata
| Package key | brew:magika |
|---|---|
| Version | 1.0.2 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/magika |
| Homepage | https://securityresearch.google/magika/ |
| Repository | https://github.com/google/magika |
| Upstream docs | https://securityresearch.google/magika |
| License | Apache-2.0 |
| Source archive | https://github.com/google/magika/archive/refs/tags/cli/v1.0.2.tar.gz |
| Last updated | 2026-06-22T14:05:26-07:00 |
| Pulse | updated |
| Dependencies | openssl@3 |
| Build dependencies | pkgconf, rust |
| Bottle | available (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | magika |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
magika
nix profile install nixpkgs#magikamagika 1.0.2-r0
Detect file content types with deep learning
https://github.com/google/magika
sudo apk add magikaGoogle.Magika
winget install --id Google.Magika -esource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.