# Install cargo-insta with Homebrew, apk, dnf, Nix, pacman

Snapshot testing CLI for Rust. Version 1.48.0 via Homebrew; verified 2026-06-11.

## Install

```sh
sudo av install brew:cargo-insta
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install cargo-insta
```

  Evidence: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add cargo-insta
```

  Evidence: Alpine Linux edge package indexes: cargo-insta from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- dnf (92%):

```sh
sudo dnf install cargo-insta
```

  Evidence: Fedora Rawhide package metadata: cargo-insta from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#cargo-insta
```

  Evidence: nixpkgs package indexes: pkgs/by-name/ca/cargo-insta/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S cargo-insta
```

  Evidence: Arch Linux sync databases: cargo-insta from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

## Package facts

- **Package key:** brew:cargo-insta
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/cargo-insta>
- **Version:** 1.48.0
- **Source summary:** Snapshot testing CLI for Rust
- **Homepage:** <https://insta.rs>
- **Repository:** <https://github.com/mitsuhiko/insta>
- **Upstream docs:** <https://insta.rs/docs>
- **License:** Apache-2.0
- **Source archive:** <https://github.com/mitsuhiko/insta/archive/refs/tags/1.48.0.tar.gz>
- **Last updated:** 2026-06-11T15:29:22Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- cargo-insta (cli)
- cargo-insta (alias)

## Build dependencies

- rust

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 1.48.0
- Package-manager updated: 2026-06-11
- Local data: ok
- Upstream repository: https://github.com/mitsuhiko/insta
- Upstream latest detected: 1.48.0 (current)
## Project history and usage

Cargo Insta is the command-line companion to Insta, Armin Ronacher's snapshot testing library for Rust. It helps developers review, accept, reject, and update snapshot changes from Cargo workflows.

The CLI is not required for every snapshot test, but the official docs say it is required for inline snapshots and useful for snapshot review.

### Project history

The Insta repository was created in January 2019, and the cargo-insta crate was first published that same month. The project combines a Rust testing library, a Cargo subcommand, website documentation, and editor support.

The README positions snapshot tests as approval-style tests that compare complex or frequently changing values against stored reference snapshots. It also notes that inline snapshots are handled through the companion cargo-insta tool.

The changelog documents both insta and cargo-insta together, showing the CLI evolving with snapshot review, nextest integration, non-interactive review modes, diff tooling, pending snapshot handling, and CI behavior.

### Adoption history

Insta became a familiar Rust testing tool for projects that need readable diffs for large structured outputs, CLI output, serializers, generated code, and UI-like text fixtures.

cargo-insta's adoption follows from the review workflow: once snapshots are part of tests, maintainers need a convenient way to inspect pending changes, accept intended updates, reject regressions, and run checks in CI.

### How it is used

The official CLI docs describe `cargo insta review`, `accept`, `reject`, `pending-snapshots`, and `test`. The common loop is to run tests, inspect generated pending snapshots, and then accept or reject changes.

Configuration is workspace-local through `insta.yaml`; the docs say cargo-insta loads this config from the workspace to influence behavior, with settings documented on the official site.

### Why package nerds care

cargo-insta is package-nerd significant because it packages a whole testing workflow, not just an assertion macro. The CLI, file formats, review commands, settings, and editor extension together make snapshot testing feel native to Rust package maintenance.

It also reflects a broader trend in developer tooling: tests increasingly produce reviewable artifacts, and package-manager subcommands become the interface for accepting those artifacts into the repository.

### Timeline

- 2019-01-13: Insta GitHub repository created.
- 2019-01-18: cargo-insta 0.2.0 first published to crates.io.
- 2020s: Project adds inline snapshots, review tooling, settings, VS Code support, and nextest-aware workflows.
- 2026: cargo-insta 1.48.0 changelog includes CI behavior, snapshot filtering, and review workflow fixes; crate exceeds 1.4 million downloads.

### Related projects

- insta is the Rust snapshot testing library that cargo-insta supports.
- similar and similar-asserts are related diffing projects by the same author, mentioned in the Insta README.
- cargo-nextest is integrated into cargo-insta test workflows according to the changelog and CLI options.

### Sources

- <https://api.github.com/repos/mitsuhiko/insta>
- <https://crates.io/crates/cargo-insta>
- <https://github.com/mitsuhiko/insta#readme>
- <https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md>
- <https://insta.rs/docs/cli/>
- <https://insta.rs/docs/settings/>


## Security Notes

No matching local secret-handling manifest was found for cargo-insta. Nucleus package metadata is still published here so future coverage has a stable package URL.



## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: $CARGO_WORKSPACE/.config/insta.yaml, $CARGO_WORKSPACE/insta.yaml, $CARGO_WORKSPACE/.insta.yaml
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** cargo-insta
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- Nix - cargo-insta: normalized package name match | nixpkgs package indexes: pkgs/by-name/ca/cargo-insta/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - cargo-insta - 1.44.3-r0: normalized package name match | Alpine Linux edge package indexes: cargo-insta from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | review tool for insta, a snapshot testing library for Rust | https://github.com/mitsuhiko/insta
- apk - cargo-insta-doc - 1.44.3-r0: normalized package name match | Alpine Linux edge package indexes: cargo-insta-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | review tool for insta, a snapshot testing library for Rust (documentation) | https://github.com/mitsuhiko/insta
- dnf - cargo-insta - 1.46.3-1.fc45: normalized package name match | Fedora Rawhide package metadata: cargo-insta from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Review tool for the insta snapshot testing library for Rust | https://crates.io/crates/cargo-insta
- pacman - cargo-insta - 1.47.2-1: normalized package name match | Arch Linux sync databases: cargo-insta from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Cargo plugin for snapshot testing in Rust | https://github.com/mitsuhiko/insta


## Related links

- [Package publisher tools](https://www.automicvault.com/pkg/package-publishers/) - Belongs to a package publishing or registry command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [rust](https://www.automicvault.com/pkg/brew/rust/) - Build dependency declared by Homebrew.
- [cargo-nextest](https://www.automicvault.com/pkg/brew/cargo-nextest/) - Shares av.db curated category or tags: cargo, cli, developer-tools, rust, testing.
- [cargo-fuzz](https://www.automicvault.com/pkg/brew/cargo-fuzz/) - Shares av.db curated category or tags: cargo, cli, developer-tools, rust, testing.
- [cargo-hack](https://www.automicvault.com/pkg/brew/cargo-hack/) - Shares av.db curated category or tags: cargo, cli, developer-tools, rust, testing.
- [cargo-llvm-cov](https://www.automicvault.com/pkg/brew/cargo-llvm-cov/) - Shares av.db curated category or tags: cargo, cli, developer-tools, rust, testing.
- [cargo-auditable](https://www.automicvault.com/pkg/brew/cargo-auditable/) - Shares av.db curated category or tags: cargo, cli, developer-tools, rust.
- [cargo-binstall](https://www.automicvault.com/pkg/brew/cargo-binstall/) - Shares av.db curated category or tags: cargo, cli, developer-tools, rust.
- [cargo-binutils](https://www.automicvault.com/pkg/brew/cargo-binutils/) - Shares av.db curated category or tags: cargo, cli, developer-tools, rust.
- [cargo-bloat](https://www.automicvault.com/pkg/brew/cargo-bloat/) - Shares av.db curated category or tags: cargo, cli, developer-tools, rust.
- [cargo-insta](https://www.automicvault.com/pkg/cargo/cargo-insta/) - Same normalized package name exists in another local package ecosystem.

## Combined YAML source

View the package source record on GitHub. [combined/cargo-insta.yml](https://github.com/automic-vault/db/blob/main/combined/cargo-insta.yml)


## Sources

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