Automic VaultAutomic Vault

brew

Install magika with Homebrew, apk, Nix, winget

Fast and accurate AI powered file content types detection. Version 1.0.2 via Homebrew; verified 2026-06-22.

install

Additional install commands

macOS

Homebrewverified · 100%
brew install magika

local Homebrew formula metadata

Windows

Windows Package Managerverified · 92%
winget install --id Google.Magika -e

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

overview

Package summary

Fast and accurate AI powered file content types detection

Commands and aliases

  • magika

history

Project history and usage

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.

Project history

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.

Adoption history

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.

How it is used

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.

Why package nerds care

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.

Timeline

  • 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.

security posture

Risk level: green

narrow executable package without higher-risk signals.

Risk classifier

green risk · low confidence · appliance

Why

  • narrow executable package without higher-risk signals

Signals

  • metadata:no-higher-risk-signals

Install behavior

  • No Homebrew post-install hook is recorded in formula metadata.
  • Homebrew bottle metadata is available for 6 platform targets.
  • Installs with 1 runtime dependencies.
  • Build metadata lists 2 build dependencies.

Recommended review

Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.

executables

Installed executables

CommandKindExposureNote
magikacliglobal executable

freshness

Version and 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.

page generated2026-07-08
manager version1.0.2
manager updated2026-06-22
local dataok
upstreamcurrent
latest detectedcli/v1.0.2

https://github.com/google/magika

  • okNo freshness warnings were generated.

install metadata

Package metadata

Package keybrew:magika
Version1.0.2
Package managerHomebrew
Package manager pagehttps://formulae.brew.sh/formula/magika
Homepagehttps://securityresearch.google/magika/
Repositoryhttps://github.com/google/magika
Upstream docshttps://securityresearch.google/magika
LicenseApache-2.0
Source archivehttps://github.com/google/magika/archive/refs/tags/cli/v1.0.2.tar.gz
Last updated2026-06-22T14:05:26-07:00
Pulseupdated
Dependenciesopenssl@3
Build dependenciespkgconf, rust
Bottleavailable (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux)
Homebrew post-installnot defined
Servicenone declared

registry facts

Source database details

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

source database matches

Other package-manager records

Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.

Nix95%

magika

nix profile install nixpkgs#magika
  • normalized package name match
  • Matched by: 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 dependencies
  • 1 provides
  • normalized package name match
  • Matched by: 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
  • Matched by: 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

source trail

Generated from repository data

This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.

Used sources

  • 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