cargo-advisor
cargo-advisor is the decision layer for Cargo: explainable crate recommendation, comparison, explanation, and local dependency review with explicit receipts.
The project is local-first. It keeps the evidence boundary narrow on purpose:
recommendpicks from a curated, checked-in catalog by intent and goal.compareexplains tradeoffs across named crates in that catalog.explainturns one crate into a recommendation narrative.reviewinspects localCargo.tomlandCargo.lockfiles for overlapping dependency decisions.- Every result stays explanation-first and includes confidence, tradeoffs, trust notes, and receipts.
This project uses review, not audit. It does not fake live crates.io, docs.rs, RustSec, download, or maintenance evidence. If a source is not consulted, the output should say so.
Install
Install from crates.io:
For local development, you can still install from the workspace path:
That installs the cargo-advisor binary as a Cargo subcommand, so you can run:
You can also run it from the workspace without installing:
Usage
Examples:
Current intent coverage:
cli-parsingconfiglogging-tracinghttp-clienthttp-serverserializationasync-runtimeerror-handlingtestingdatabase-access
Output Contract
The default renderer is text, but --format json exposes the same explanation-first contract in machine-readable form. Shared concepts across commands:
summaryrecommendationconfidencetradeoffstrust_notesreceipts
Command-specific JSON fixtures are checked in under tests/fixtures/contracts/ as release/reference fixtures for the explanation-first output contract.
The current contract is documented in docs/v0.1-plan.md.
Workspace
The workspace currently has five crates:
crates/cargo-advisor-cli: binary and command parsercrates/advisor-core: shared report models and decision logiccrates/advisor-catalog: curated intent catalogcrates/advisor-evidence: local evidence loading and receiptscrates/advisor-output: text and JSON rendering
Verification
Phase planning lives in BUILD.md. CI mirrors the local verification bar in ci.yml:
Release Hygiene
- Dual-licensed under
MIT OR Apache-2.0; see LICENSE-MIT and LICENSE-APACHE. - Release notes live in CHANGELOG.md.
- The local release checklist lives in RELEASE.md.
Design Boundaries
- Recommendations stay deterministic and checked into source.
- Review findings are heuristic and local-only.
- External evidence integrations remain future work until their receipts and trust boundaries are visible in output.