Skip to content

hegner123/imports

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

imports

Dependency/import mapper MCP tool. Scans a directory and outputs which files import which packages and which local files reference each other. Useful for understanding blast radius before refactoring.

Supported Languages

Go, Python, JavaScript/TypeScript, Zig, Rust, C/C++, Swift, Java/Kotlin, Ruby, Shell

Installation

go build -o imports
codesign -s - imports
sudo cp imports /usr/local/bin/

Or with just:

just install

Usage

MCP Server (default)

Register with Claude Code:

claude mcp add --transport stdio imports -- imports

Then call via MCP:

{
  "dir": "/path/to/project",
  "recursive": true,
  "ext": ".go"
}

CLI

imports --cli --dir /path/to/project
imports --cli --dir /path/to/project --recursive
imports --cli --dir /path/to/project --ext .go

Output

Returns JSON with:

  • files — per-file imports with package name, type (stdlib/external/local/relative/system), and line number
  • packages — reverse index mapping each package to the files that import it
  • summary — human-readable scan summary

License

MIT

About

Dependency/import mapper MCP tool. Scans directories for import statements across 11 languages and outputs structured JSON for blast radius analysis before refactoring.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors