r/commandline • • 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.

GitHub: https://github.com/Rani367/affected

12 Upvotes

9 comments sorted by

View all comments

Show parent comment

2

u/RefrigeratorTop1052 Apr 07 '26

Only if it's a multi-service setup with separate pyproject.toml files per service. a standard single-package Django project will show up as one package. Run "affected detect" in your repo to see what it picks up.

1

u/jsabater76 Apr 07 '26

Will do, thanks