@maheshdev/dev-scope
v1.0.2
Published
CLI tool to analyze dependencies and impact in your project
Maintainers
Readme
DevScope 🚀
DevScope is a lightweight CLI tool to analyze file dependencies and understand the impact of changes in your codebase.
✨ Features
- 🔍 Analyze project dependency graph
- ⚡ Find affected files when a file changes
- 📊 Project overview (files, dependencies, unused files)
- 🌳 Clean terminal visualization (no external tools required)
📦 Installation
Global (recommended)
npm install -g @maheshdev/dev-scope🚀 Usage
Run commands inside your project directory:
1. Analyze Dependencies
dev-scope analyzeExample:
Dependency Graph
With dependencies:
src/index.ts
├── src/commands/overview.ts
├── src/commands/impact.ts
└── src/commands/analyze.ts2. Impact Analysis
dev-scope impact <file>Example:
dev-scope impact src/graph/buildGraph.tsOutput:
Impact: src/graph/buildGraph.ts
Affected:
├── src/commands/analyze.ts
├── src/index.ts
├── src/commands/impact.ts
└── src/commands/overview.ts3. Project Overview
dev-scope overviewExample:
Overview
Files: 11
Dependencies: 13
Leaf: 6 files
- src/parser/extractImports.ts
- src/resolver/resolverPath.ts
... (more)
Most used:
src/graph/buildGraph.ts (3)
Unused: 1 files
- src/unusedFile.ts🧠 How It Works
Builds a dependency graph of your project
Uses reverse traversal (DFS) to detect impacted files
Provides insights like:
- Leaf files (no dependencies)
- Most used files
- Unused files
🎯 Use Cases
- Safe refactoring
- Understanding large codebases
- Detecting unused files
- Impact analysis before making changes
⚙️ Tech Stack
- TypeScript
- Node.js
- Commander (CLI)
📌 Notes
- Currently supports
.ts,.tsx,.js,.jsx - Ignores
node_modules,dist, etc. - Designed to be fast and lightweight
🤝 Contributing
Feel free to open issues or submit pull requests.
📄 License
MIT
