# 使用 Homebrew, apk, dnf, Nix, pacman 安装 cargo-insta

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

## 安装

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

其他安装命令:

### macOS

- Homebrew (100%):

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

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

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

  证据: 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
```

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

- Nix (92%):

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

  证据: 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
```

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

## 软件包事实

- **软件包键:** brew:cargo-insta
- **软件包管理器:** Homebrew
- **版本:** 1.48.0
- **来源摘要:** Snapshot testing CLI for Rust
- **主页:** <https://insta.rs>
- **仓库:** <https://github.com/mitsuhiko/insta>
- **最后更新:** 2026-06-11T15:29:22Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- cargo-insta (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.48.0
## 项目历史与用法

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.

### 项目历史

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.

### 采用历史

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.

### 使用方式

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.

### 为什么软件包爱好者会关心

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.

### 时间线

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

### 来源

- <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/>


## 安全说明

没有找到 cargo-insta 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 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
## 其他软件包管理器记录

- 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-2.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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Review tool for the insta snapshot testing library for Rust | https://crates.io/crates/cargo-insta
- pacman - cargo-insta - 1.48.0-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


## 相关链接

- [cargo-insta](https://pkg.so/zh-hans/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/mxcl/pkgdb/blob/main/combined/cargo-insta.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
