macOS
brew install magikalocal Homebrew formula metadata
安装
brew install magikalocal Homebrew formula metadata
sudo apk add magikaAlpine Linux edge package indexes · magika · 来源: dl-cdn.alpinelinux.org
nix profile install nixpkgs#magikanixpkgs package indexes · magika · 来源: raw.githubusercontent.com
winget install --id Google.Magika -eWindows Package Manager source index · Google.Magika · 来源: cdn.winget.microsoft.com
概览
Fast and accurate AI powered file content types detection
历史
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.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
magika | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://github.com/google/magika
安装元数据
| 软件包键 | brew:magika |
|---|---|
| 版本 | 1.0.2 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/magika |
| 主页 | https://securityresearch.google/magika/ |
| 仓库 | https://github.com/google/magika |
| 上游文档 | https://securityresearch.google/magika |
| 许可证 | Apache-2.0 |
| 源码归档 | https://github.com/google/magika/archive/refs/tags/cli/v1.0.2.tar.gz |
| 最后更新 | 2026-07-15T14:17:07+09:00 |
| Pulse | updated |
| 依赖 | openssl@3 |
| 构建依赖 | pkgconf, rust |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| 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 |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
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 -e来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.