depsensei
v0.1.8
Published
A CLI tool to detect and resolve dependency issues across various programming environments
Downloads
5
Maintainers
Readme
DepSensei 🛡️
A smart CLI tool that helps developers maintain healthy dependencies across their projects. DepSensei automatically detects, analyzes, and helps resolve dependency issues while keeping your project secure and up-to-date.
✨ Features
- 🔍 Smart Analysis: Automatically detects outdated, deprecated, and conflicting dependencies
- 🎯 Multi-Ecosystem Support: Currently supports JavaScript/Node.js, with more ecosystems coming soon
- 🛠️ Intelligent Fixes: Provides smart suggestions for resolving dependency issues
- 🧪 Safe Testing: Tests fixes in a sandboxed environment before applying them
- 🔒 Secure Updates: Creates backups and allows selective package updates
- 📊 Detailed Reports: Clear, tabular reports of dependency issues and suggested fixes
📦 Installation
There are several ways to use DepSensei:
Option 1: Using npx (Recommended for one-off usage)
# Run directly without installation
npx depsenseiPros:
- No installation required
- Always uses the latest version
- Doesn't pollute global packages
- Perfect for occasional use
Cons:
- Downloads the package each time (unless cached)
- Slightly slower first run
Option 2: Local Installation (Recommended for project use)
# Install as a dev dependency in your project
npm install depsensei --save-dev
# Run using npx
npx depsensei
# Or run directly from node_modules
./node_modules/.bin/depsenseiPros:
- Version is locked to your project
- Faster execution
- Works offline
- Better for CI/CD pipelines
- Keeps dependencies with your project
Cons:
- Takes up space in your project's node_modules
- Need to update manually when new versions are released
Option 3: Global Installation (Not recommended)
# Install globally
npm install -g depsensei
# Run from anywhere
depsenseiPros:
- Available system-wide
- Faster execution than npx
Cons:
- Can cause version conflicts between projects
- Requires global npm permissions
- Can pollute your global npm packages
- Need to manually update
🚀 Quick Start
- Navigate to your project directory:
cd your-project- Analyze your dependencies:
depsensei analyze- Review and apply fixes:
depsensei fix📝 Usage Guide
Analyzing Dependencies
# Basic analysis
depsensei analyze
# Analyze with specific options
depsensei analyze --path <custom-path> # Analyze a specific project path
depsensei analyze --ecosystem <ecosystem> # Analyze a specific ecosystemThe analysis will show:
- Outdated packages
- Deprecated packages
- Version conflicts
- Security vulnerabilities (coming soon)
Applying Fixes
# Basic fix mode
depsensei fix
# Interactive mode (recommended)
depsensei fix --interactive
# Show what would be fixed without making changes
depsensei fix --dry-run
# Force mode (skip confirmations)
depsensei fix --force
# Skip backup creation
depsensei fix --no-backup
# Skip npm install after updates
depsensei fix --no-install
# Fix a specific project path
depsensei fix --path <custom-path>
# Fix a specific ecosystem
depsensei fix --ecosystem <ecosystem>The fix command will:
- Show all detected issues
- Let you choose whether to proceed (unless --force is used)
- Allow you to select which packages to update (in interactive mode)
- Create a backup of your package.json (unless --no-backup is used)
- Apply the selected updates
- Run npm install (unless --no-install is used)
Command Options
# Show help
depsensei --help
# Show version
depsensei --version🛠️ Supported Ecosystems
Currently Supported
- JavaScript/Node.js
- package.json
- package-lock.json
- Detects outdated, deprecated, and conflicting dependencies
- Smart version resolution
- Safe update application
Coming Soon
- Python (requirements.txt, pyproject.toml)
- Rust (Cargo.toml)
- Ruby (Gemfile)
- Java (pom.xml, build.gradle)
💻 Development
Prerequisites
- Node.js 14 or higher
- npm 6 or higher
Setup
- Clone the repository:
git clone https://github.com/ericBlack1/depSensei.git
cd depSensei- Install dependencies:
npm install- Build the project:
npm run buildAvailable Scripts
# Run tests
npm test
# Run workflow tests
npm run test:workflow
# Start development mode
npm run dev
# Lint code
npm run lint
# Format code
npm run format
# Build project
npm run buildProject Structure
depsensei/
├── src/
│ ├── analyzers/ # Ecosystem-specific analyzers
│ ├── fixers/ # Fix generators and appliers
│ ├── commands/ # CLI commands
│ ├── core/ # Core types and utilities
│ └── utils/ # Helper functions
├── test/ # Test files
└── dist/ # Compiled output🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Development Guidelines
- Write clear, descriptive commit messages
- Add tests for new features
- Update documentation for any changes
- Follow the existing code style
- Make sure all tests pass
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- npm-check-updates for inspiration
- All contributors who have helped shape this project
📞 Support
If you encounter any issues or have questions, please:
- Check the existing issues
- Create a new issue if needed
- Join our Discord community (coming soon)
