Automic VaultAutomic Vault

brew

使用 Homebrew, apk, Nix, winget 安装 magika

查看 magika 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install magika

local Homebrew formula metadata

Windows

Windows Package Manager已验证 · 92%
winget install --id Google.Magika -e

Windows Package Manager source index · Google.Magika · 来源: cdn.winget.microsoft.com

概览

软件包摘要

Fast and accurate AI powered file content types detection

命令和别名

  • magika

历史

项目历史与用法

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.

时间线

  • 2023: Public GitHub repository created.
  • 2024: Google open-sourced Magika and announced it on the Google Open Source Blog.
  • 2024: CLI, Python, Rust, and JavaScript packaging paths documented.
  • 2025: Research paper published at ICSE according to official docs.
  • 2026: CLI and binding release tags continue in the public repository.

Related projects

  • libmagic and the Unix `file` command are the traditional content-type detection tools Magika is commonly compared with.
  • VirusTotal and abuse.ch are named by Google as integrations.
  • Gmail, Drive, and Safe Browsing are named by Google as internal-scale consumers.

安全态势

风险级别:绿色

narrow executable package without higher-risk signals.

风险分类器

绿色 风险 · 低 置信度 · appliance

原因

  • narrow executable package without higher-risk signals

信号

  • metadata:no-higher-risk-signals

安装行为

  • formula 元数据中未记录 Homebrew post-install 钩子。
  • Homebrew bottle 元数据适用于 6 个平台目标。
  • 安装时包含 1 个运行时依赖。
  • 构建元数据列出 2 个构建依赖。

建议审查

在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。

可执行文件

已安装的可执行文件

命令类型暴露范围备注
magikacli全局可执行文件

新鲜度

版本和新鲜度

这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。

页面生成时间2026-07-25
管理器版本1.0.2
管理器更新时间2026-07-15
本地数据OK
上游当前
检测到的最新版本cli/v1.0.2

https://github.com/google/magika

  • OK没有生成新鲜度警告。

安装元数据

软件包元数据

软件包键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
Pulseupdated
依赖openssl@3
构建依赖pkgconf, rust
Bottle可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux)
Homebrew post-install未定义
服务未声明

注册表事实

源数据库详情

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namemagika
Version Scheme0
Revision0
Head VersionHEAD
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • head
  • stable

源数据库匹配

其他软件包管理器记录

匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。

Nix95%

magika

nix profile install nixpkgs#magika
  • normalized package name match
  • 匹配方式:Magika
nixpkgs package indexes · raw.githubusercontent.com · nixpkgs package indexes: magika from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
apk95%

magika 1.0.2-r0

Detect file content types with deep learning

https://github.com/google/magika

sudo apk add magika
  • License: Apache-2.0
  • Architecture: x86_64
  • Source Package: magika
  • 1 依赖
  • 1 提供
  • normalized package name match
  • 匹配方式:Magika
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: magika from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
winget95%

Google.Magika

winget install --id Google.Magika -e
  • normalized package name match
  • 匹配方式:Magika
Windows Package Manager source index · cdn.winget.microsoft.com · Windows Package Manager source index: Google.Magika from https://cdn.winget.microsoft.com/cache/source.msix

来源线索

由仓库数据生成

此页面由 av-webscripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。

使用的来源

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment