A powerful command-line tool to analyze TypeScript/JavaScript modules for imports and exports.
- 🔍 Analyze
.ts
,.tsx
,.js
, and.jsx
files for imports and exports - 📊 Generate detailed reports on module dependencies
- 🎛 Interactive mode for selecting directories and files
- 📁 Export analysis to JSON or display in console
- 📈 Summary statistics for most imported/exported modules
cargo add rusty-react-flow
cargo install rusty-react-flow
npm install -D rusty-react-flow
Invoke via npx
:
npx rusty-react-flow [OPTIONS]
Run without arguments to analyze the current directory:
rusty-react-flow
# or via npm:
# npx rusty-react-flow
Option | Description | Default |
---|---|---|
-p , --path <PATH>
|
Directory path to analyze | . |
-i , --interactive
|
Run in interactive mode | — |
-o , --output <FILE>
|
Write output JSON to file | stdout |
--help |
Print help information | — |
--version |
Print version information | — |
-
Analyze
src
folder:rusty-react-flow --path ./src
-
Interactive mode:
rusty-react-flow --interactive
-
Save JSON output:
rusty-react-flow --output report.json
-
All combined (with npx):
npx rusty-react-flow --path ./lib --interactive --output deps.json
The JSON output has this structure:
{
"files": [
{
"filePath": "src/App.tsx",
"imports": [{ "name": "React", "source": "react", "kind": "default" }],
"exports": [{ "name": "App", "kind": "default-function" }]
}
],
"summary": {
"totalFiles": 1,
"totalImports": 1,
"totalExports": 1,
"mostImported": ["react"],
"mostExported": ["App"]
}
}
- Rust 1.85.1 or later
- Cargo
git clone https://github.com/cargo-fob/rusty-react-flow.git
cd rusty-react-flow
cargo build --release