Skip to content

buildingopen/blast-radius

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

blast-radius

Find all files affected by your changes. One bash script, zero dependencies.

$ blast-radius

Changed files (3):
  src/auth/login.ts
  src/auth/session.ts
  src/api/middleware.ts

Affected files (7 dependents):
  src/pages/dashboard.tsx
  src/pages/settings.tsx
  src/api/routes/user.ts
  src/api/routes/admin.ts
  src/hooks/useAuth.ts
  src/components/ProtectedRoute.tsx
  src/utils/fetchWithAuth.ts

Test files (2):
  src/auth/login.test.ts
  src/auth/session.test.ts

Install

curl -fsSL https://raw.githubusercontent.com/buildingopen/blast-radius/main/install.sh | bash

That's it. Works on Mac and Linux. Installs to /usr/local/bin or ~/.local/bin.

Usage

blast-radius              # diff against main
blast-radius develop      # diff against develop
blast-radius HEAD~5       # last 5 commits
blast-radius --json       # JSON output (requires jq)

Why

When you change files, you need to know what else is affected before you break something. AI coding tools like Claude Code figure this out by running 10-20 grep calls incrementally. blast-radius gives you the full picture in one command.

What it does:

  1. git diff finds your changed source files
  2. git grep finds every file that imports from a changed file
  3. git ls-files locates matching test files

No graph database, no AST parser, no 200MB dependency. Just git.

Claude Code skill

Copy .claude/skills/blast-radius/ into your project's .claude/skills/ directory. Claude will run blast-radius automatically before code reviews and edits, giving it the full blast radius upfront instead of discovering it file by file.

JSON output

blast-radius --json
{
  "changed": ["src/auth/login.ts", "src/auth/session.ts"],
  "affected": ["src/pages/dashboard.tsx", "src/hooks/useAuth.ts"],
  "tests": ["src/auth/login.test.ts"],
  "summary": "2 changed, 2 affected, 1 test files"
}

Supported languages

Language Import pattern detected
TypeScript / JavaScript import from, require()
Python from module import
Go import "path"
Rust use crate::module
C / C++ #include
Ruby, Java, Kotlin, Swift, PHP, C# import / require variants

Test file patterns: *.test.*, *.spec.*, test_*, *_test.*, __tests__/, tests/

Limitations

  • Filename-based matching: a file named utils.ts will match any import containing "utils". Favors recall over precision.
  • Direct dependents only: finds first-degree importers, not transitive dependencies.
  • Large diffs (>30 files): skips dependent search since the blast radius is effectively the whole project.

Requirements

  • git
  • jq (only for --json)

License

MIT

About

Find all files affected by your changes. One bash script, zero dependencies.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages