Automic VaultAutomic Vault

brew

Install cargo-shear with Homebrew, Nix, winget

Detect and remove unused dependencies from Cargo.toml in Rust projects. Version 1.13.1 via Homebrew; verified 2026-06-06.

install

Additional install commands

macOS

Homebrewverified · 100%
brew install cargo-shear

local Homebrew formula metadata

Linux

Nixverified · 92%
nix profile install nixpkgs#cargo-shear

nixpkgs package indexes · pkgs/by-name/ca/cargo-shear/package.nix · source: api.github.com

Windows

Windows Package Managerverified · 92%
winget install --id Boshen.cargo-shear -e

Windows Package Manager source index · Boshen.cargo-shear · source: cdn.winget.microsoft.com

overview

Package summary

Detect and remove unused dependencies from Cargo.toml in Rust projects

Commands and aliases

  • cargo-shear

history

Project history and usage

cargo-shear is a Rust Cargo subcommand for detecting and optionally fixing unused or misplaced dependencies and unlinked source files.

Project history

The GitHub repository was created in March 2024 and the first crates.io release appeared the next day. The README describes the tool as feature-complete, with ongoing work focused on bug fixes, dependency upgrades, and UI/UX improvements.

Adoption history

Despite being newer than the other tools in this batch, crates.io metadata showed many releases by 2026 and package facts list Homebrew, Nix, and winget packages. The README includes CI examples and machine-readable JSON output for automation.

How it is used

Users run cargo shear to check for issues, cargo shear --fix to remove unused dependencies, --deny-warnings for strict CI, --format=json for structured output, and --expand with nightly when macro expansion is needed.

Why package nerds care

It is part of the Rust ecosystem's dependency-hygiene tooling, sitting near cargo-udeps and cargo-machete but using rust-analyzer parsing and Cargo metadata to find unused dependencies without compiling in the default mode.

Timeline

  • 2024: Repository created and first crates.io release published.
  • 2026: README described the tool as feature-complete.
  • 2026: crates.io reported v1.13.1 as the latest release.

Related projects

  • README prior art names cargo-udeps, cargo-machete, Cargo, and Clippy.
  • README documents automatic handling for cargo-hakari workspace-hack crates.

security posture

No protected-tool coverage found yet

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

Install behavior

  • No Homebrew post-install hook is recorded in formula metadata.
  • Homebrew bottle metadata is available for 6 platform targets.
  • Build metadata lists 1 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.

local files

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

Config paths the tool may read or write during local use.

Unix
Cargo.toml

executables

Installed executables

CommandKindExposureNote
cargo-shearcliglobal 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.13.1
manager updated2026-06-06
local dataok
upstreamcurrent
latest detectedv1.13.1

https://github.com/Boshen/cargo-shear

  • okNo freshness warnings were generated.

install metadata

Package metadata

Package keybrew:cargo-shear
Version1.13.1
Package managerHomebrew
Package manager pagehttps://formulae.brew.sh/formula/cargo-shear
Homepagehttps://github.com/Boshen/cargo-shear
Repositoryhttps://github.com/Boshen/cargo-shear
Upstream docshttps://github.com/Boshen/cargo-shear#readme
LicenseMIT
Source archivehttps://github.com/Boshen/cargo-shear/archive/refs/tags/v1.13.1.tar.gz
Last updated2026-06-06T20:42:23Z
Pulseupdated
Build dependenciesrust
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 Namecargo-shear
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%

cargo-shear

nix profile install nixpkgs#cargo-shear
  • normalized package name match
  • Matched by: Cargo Shear
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/ca/cargo-shear/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
winget95%

Boshen.cargo-shear

winget install --id Boshen.cargo-shear -e
  • normalized package name match
  • Matched by: Cargo Shear
Windows Package Manager source index · cdn.winget.microsoft.com · Windows Package Manager source index: Boshen.cargo-shear 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 configuration and credential file locations
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment