JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 18
  • Score
    100M100P100Q53235F
  • License MIT

Comprehensive CLI tool for dependency management - scan, fix, clean, and monitor JavaScript/TypeScript project dependencies. Supports npm, yarn, pnpm with security audits, unused dependency cleanup, and real-time monitoring.

Package Exports

  • depmender
  • depmender/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (depmender) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

DepMender

npm version npm downloads License: MIT Node.js Version PRs Welcome

A comprehensive CLI tool that scans JavaScript/TypeScript projects for dependency issues and fixes them automatically. Features advanced diagnostics, unused dependency cleanup, real-time monitoring, and intelligent configuration management.

📑 Table of Contents

What it does

DepMender helps you maintain healthy dependencies by:

  • Scanning for outdated packages, broken installations, and security vulnerabilities
  • Fixing issues automatically with intelligent suggestions
  • Diagnosing system health and project structure
  • Cleaning unused dependencies to reduce bundle size
  • Monitoring changes in real-time with watch mode
  • Configuring behavior with flexible configuration files

Installation

npm install -g depmender

Quick Start

# Initialize configuration (optional)
depmender init

# Run system health check
depmender doctor

# Scan for dependency issues
depmender scan

# Get detailed report
depmender report

# Fix issues automatically
depmender fix --yes

# Clean unused dependencies
depmender clean --dry-run

# Monitor project in real-time
depmender watch

Commands

Core Commands

depmender scan

Analyzes your project dependencies and shows health overview.

depmender scan                    # Scan current directory
depmender scan --path ./frontend  # Scan specific directory
depmender scan --json            # Get JSON output
depmender scan --verbose         # Show detailed information

depmender report

Generates detailed health report with issue breakdown.

depmender report                  # Generate detailed report
depmender report --json          # Export as JSON
depmender report --verbose       # Include extra details

depmender fix

Automatically fixes detected issues with backup creation.

depmender fix                     # Interactive fix with prompts
depmender fix --yes              # Auto-fix without confirmation
depmender fix --path ./backend   # Fix specific project

Advanced Commands

depmender doctor

Run comprehensive system health diagnostics.

depmender doctor                  # Full system health check

What it checks:

  • Node.js environment and version compatibility
  • Project structure (package.json, lockfiles, node_modules)
  • Package manager health and configuration
  • Dependency analysis (duplicates, large packages)
  • Performance metrics (install time, disk usage)
  • Security audit results
  • Personalized recommendations

depmender clean

Find and remove unused dependencies to reduce bundle size.

depmender clean --dry-run         # Preview what would be removed (default)
depmender clean --confirm         # Actually remove unused packages

Features:

  • Scans source code for actual imports/requires
  • Protects essential dependencies (build tools, linters)
  • Shows potential space savings
  • Safe removal with dependency analysis

depmender watch

Monitor project files and run dependency checks automatically.

depmender watch                   # Start monitoring current directory
depmender watch --notify          # Enable desktop notifications
depmender watch --webhook URL     # Send results to webhook
depmender watch --interval 30s    # Custom scan interval
depmender watch --auto-fix        # Automatically fix issues

Features:

  • Real-time file monitoring (package.json, lockfiles)
  • Automatic scans on changes
  • Desktop notifications for critical issues
  • Webhook integration for CI/CD
  • Optional auto-fixing

depmender init

Initialize depmender configuration file.

depmender init                    # Create sample config file
depmender init --force           # Overwrite existing config

Creates: depmender.config.js with customizable options:

  • Scanning rules (max outdated days, allowed vulnerabilities)
  • Auto-fix settings (risk levels, confirmations)
  • Output formatting (colors, verbosity)
  • Integrations (Slack, GitHub)

Utility Commands

depmender help

Shows help information for commands.

depmender help                   # General help
depmender help scan              # Help for specific command

depmender examples

Shows usage examples and workflows.

depmender examples              # Show usage examples

depmender troubleshooting

Shows troubleshooting guide for common issues.

depmender troubleshooting       # Show troubleshooting guide

Configuration

Create a depmender.config.js file to customize behavior:

module.exports = {
  // Scanning rules
  rules: {
    maxOutdatedDays: 90,           // Allow packages older than 90 days
    allowedVulnerabilities: ['low'], // Ignore low severity vulnerabilities
    excludePackages: [             // Skip these packages
      '@types/*',
      'eslint-*'
    ],
    includeDev: true               // Include devDependencies in scan
  },
  
  // Auto-fix settings
  autoFix: {
    enabled: false,                // Enable automatic fixes
    confirmBeforeFix: true,        // Ask for confirmation
    backupBeforeFix: true,         // Create backup before fixing
    maxRiskLevel: 'medium'         // Only auto-fix low/medium risk
  },
  
  // Output customization
  output: {
    format: 'detailed',            // 'minimal', 'detailed', 'json'
    showSuccessMessages: true,     // Show success messages
    colors: true                   // Enable colored output
  }
};

Global Options

All commands support these global options:

  • -p, --path <path> - Project path to analyze (default: current directory)
  • --json - Output results in JSON format
  • --verbose - Enable verbose output with additional details
  • --quiet - Suppress all logs except errors

Workflows

Daily Development

# Quick health check
depmender scan

# Detailed analysis before deployment
depmender report --verbose

# Fix issues automatically
depmender fix --yes

CI/CD Integration

# Generate JSON report for CI
depmender scan --json > dependency-report.json

# Fail build on critical issues
depmender doctor && depmender scan --json | jq '.healthScore < 50' && exit 1

# Auto-fix in CI (with caution)
depmender fix --yes && npm test

Project Maintenance

# System health check
depmender doctor

# Clean unused dependencies
depmender clean --confirm

# Monitor for changes
depmender watch --notify

Package Manager Support

  • npm - Full support with package-lock.json
  • Yarn - Full support with yarn.lock
  • pnpm - Full support with pnpm-lock.yaml

Features

  • Comprehensive Scanning - Detects 6 types of dependency issues
  • Intelligent Fixing - Smart suggestions with risk assessment
  • System Diagnostics - Complete health check for your environment
  • Dependency Cleanup - Remove unused packages safely
  • Real-time Monitoring - Watch mode with notifications
  • Flexible Configuration - Customize behavior per project
  • Detailed Reporting - JSON/HTML output for integration
  • Security Focus - Vulnerability detection and fixing
  • Performance Optimized - Parallel scanning, caching
  • Lightweight - Under 500KB package size

License

MIT

🤝 Contributing

We welcome contributions! Here's how you can help:

  1. Report Bugs - Open an issue with detailed information
  2. Suggest Features - Share your ideas for improvements
  3. Submit PRs - Fix bugs or add new features
  4. Improve Docs - Help make documentation better
  5. Share Feedback - Let us know how you're using DepMender

Development Setup

# Clone the repository
git clone https://github.com/yourusername/depmender.git
cd depmender

# Install dependencies
npm install

# Build the project
npm run build

# Run locally
node dist/cli.js --help

Running Tests

npm test

📝 Changelog

See CHANGELOG.md for version history and updates.

🙏 Acknowledgments

Built with ❤️ using TypeScript, Commander.js, and Chalk.

Special thanks to all contributors and the open-source community.

📧 Support


Made with ❤️ for the JavaScript/TypeScript community