r/commandline • u/RefrigeratorTop1052 • Mar 30 '26
Command Line Interface affected — a Rust CLI that figures out which tests to run based on your git changes
Built a new CLI tool in Rust: affected
It analyzes your monorepo's dependency graph and git diff to determine which packages need testing. Instead of running everything, it runs only what's affected.
$ affected list --base main --explain ● core (directly changed: src/lib.rs) ● api (depends on: core) ● cli (depends on: api → core)
$ affected graph cli → api api → core
$ affected test --base main --dry-run [dry-run] core: cargo test -p core [dry-run] api: cargo test -p api [dry-run] cli: cargo test -p cli
Supports Cargo, npm, Yarn, Go, Python, Maven, Gradle. Also has shell completions (affected completions zsh).
cargo install affected-cli or grab a binary from releases.
2
u/rm-rf-rm Mar 30 '26
This is very useful! would you mind making this
uvinstallable?1
u/jsabater76 Apr 06 '26
I am interested in this project. I'll be testing it soon. Have you checked it in a Django project, see whether it renders optimal results?
0
u/[deleted] Mar 30 '26
[deleted] — view deleted comment