UNPKG

dep-insight-cli

Version:

A powerful CLI tool for managing npm packages, checking dependencies, analyzing sizes, and ensuring license compliance.

166 lines (117 loc) 3.45 kB
# dep-insight-cli A powerful CLI tool for managing npm packages, checking dependencies, analyzing sizes, and ensuring license compliance. ## Features - Package Analysis: Deep insights into package sizes, dependencies, and structure - Dependency Management: Track and analyze your project's dependencies - License Compliance: Check and verify package licenses - Size Analysis: Analyze package sizes and their impact - Script Management: List and manage npm scripts ## Installation ```bash npm install -g dep-insight-cli ``` ## Quick Start You can use either `dep` (shorter) or `dep-insight` (full name) as the command: ```bash # Using dep (shorter) dep analyze express dep size react dep tree next # Using dep-insight (full name) dep-insight analyze express dep-insight size react dep-insight tree next ``` ## Available Commands ### Package Analysis ```bash dep analyze [package] # Analyze a package's structure and dependencies dep size [package] # Check package size and dependencies dep info [package] # Show detailed package information ``` ### Dependency Management ```bash dep deps [package] # List and analyze dependencies dep tree [package] # Display dependency tree dep graph [package] # Generate dependency graph visualization dep outdated [package] # Check for outdated dependencies ``` ### Security & Compliance ```bash dep audit [package] # Run security audit dep licenses [package] # Check licenses of package and its dependencies ``` ### Statistics & Comparison ```bash dep stats [package] # Show download statistics and trends dep compare <pkg1> <pkg2> # Compare two packages ``` ### Script Management ```bash dep scripts [package] # List and manage npm scripts ``` ### Version Management - **Package Compatibility**: `dep check [package]` - Project-wide analysis (when no package specified): - Check all dependencies for compatibility - Identify outdated packages - Detect incompatible versions - Auto-fix capability - Single package analysis: - Node.js version compatibility - npm version compatibility - Framework compatibility (React, Angular, Vue) - Peer dependencies check - Package size and download stats - Interactive installation ```bash # Check all project dependencies dep check # Check with auto-fix option dep check --fix # Deep analysis including dev dependencies dep check -d # Check specific package dep check express # Check specific version dep check react -v 16.8.0 # Get JSON output dep check vue --json # Non-interactive mode dep check lodash --no-interactive ``` ## Options Most commands support the following options: ```bash --json # Output in JSON format --depth <number> # Specify dependency tree depth --dev # Include devDependencies --prod # Include only dependencies --format <format> # Output format (table/json/tree) ``` ## Examples ### Analyze a Package ```bash dep analyze express ``` ### Check Package Size ```bash dep size react --format table ``` ### View Dependency Tree ```bash dep tree next --depth 2 ``` ### Compare Two Packages ```bash dep compare react vue ``` ### Check Package Licenses ```bash dep licenses express --json ``` ## Contributing Contributions are welcome! Please feel free to submit a Pull Request. ## License MIT Hiren Vaishnav,