Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

package-checker-cli

kingjethro0MIT0.4.0

AI-powered CLI tool for intelligent dependency analysis and code assistance

cli, dependency-management, package-analyzer, npm, yarn, pnpm, ai-analysis, javascript, python, typescript, php, code-completion, ai, gemini, nodejs, node, code-assistance, file-operations, automation

readme

Package Checker CLI

An AI-powered CLI tool for intelligent dependency analysis, code assistance, and automated project management.

🚀 Features

  • 🤖 AI-Powered Help - Ask questions in natural language and get intelligent solutions
  • 🔍 Smart Dependency Analysis - Detect missing, unused, and uninstalled dependencies
  • 🛠️ Automated File Operations - AI can create, modify, and delete files with your permission
  • 📊 Multi-Language Support - Works with npm, yarn, composer, pip, and more
  • One-Command Fixes - Install, uninstall, and fix dependencies automatically
  • 📍 File Location Tracking - See exactly where unused dependencies are imported
  • 🔒 Security Audits - AI-powered security vulnerability detection
  • 📈 Performance Tips - Get suggestions to optimize your project

📦 Installation

Global Installation

npm install -g package-checker-cli

Local Usage

npx package-checker-cli

🎯 Quick Start

  1. Navigate to your project directory
  2. Run dependency analysis: checker check
  3. Get AI help: checker help "describe your problem"
  4. Fix issues automatically: checker fix

🤖 AI-Powered Help

The standout feature - ask for help in natural language:

# Get help with any coding problem
checker help "my file is not running"
checker help "npm install fails with permission errors"
checker help "how do I optimize my webpack config"

# Auto-apply suggested fixes (skips confirmation)
checker help "fix my package.json dependencies" --auto

The AI can:

  • ✅ Analyze your problem and suggest solutions
  • ✅ Create new files with proper code
  • ✅ Modify existing files to fix issues
  • ✅ Delete problematic files
  • ✅ Provide code examples and resources
  • ✅ Always asks for your permission before making changes

📋 Commands

Core Commands

checker help <query>

Ask AI for help with any coding problem or project issue.

checker help "my tests are failing"
checker help "how to setup eslint" --auto

Options:

  • --auto - Automatically apply suggested file operations without confirmation

checker check [options]

Analyze project dependencies for issues.

checker check                    # Basic analysis
checker check --ai              # AI-powered analysis with insights
checker check --json            # Output in JSON format
checker check --path ./src      # Scan specific path

checker fix [options]

Automatically fix dependency issues.

checker fix                      # Fix all issues
checker fix --dry-run           # Preview what would be fixed
checker fix --path ./project    # Fix specific path

checker doctor [options]

Comprehensive project health check.

checker doctor                   # Basic health check
checker doctor --ai             # AI-powered health analysis
checker doctor --path ./src     # Check specific path

Package Management

checker install <module>

Install a specific missing dependency.

checker install lodash
checker install express --path ./backend

checker uninstall <module>

Remove unused dependencies.

checker uninstall unused-package
checker uninstall old-lib --path ./frontend

checker list [options]

List all dependencies by status.

checker list                     # Show all dependencies
checker list --json            # JSON output
checker list --path ./src      # List for specific path

Project Maintenance

checker scan <path>

Scan specific directory or file.

checker scan ./src              # Scan source directory
checker scan ./package.json --ai # AI analysis of package.json
checker scan . --json          # JSON output for entire project

checker sync [options]

Reinstall all dependencies (like npm ci).

checker sync                     # Sync current directory
checker sync --path ./project   # Sync specific project

checker clean [options]

Remove unused dependencies from package.json.

checker clean                    # Remove unused deps
checker clean --dry-run        # Preview what would be removed
checker clean --path ./app     # Clean specific path

Configuration

checker config [options]

Manage CLI configuration.

checker config --set ignored="test,build"
checker config --get ignored
checker config --list

checker update

Update the CLI tool to latest version.

checker update

🌍 Supported Languages & Package Managers

  • JavaScript/TypeScript: npm, yarn, pnpm
  • PHP: Composer
  • Python: pip, pipenv, poetry
  • Ruby: Bundler
  • Go: Go modules
  • Rust: Cargo
  • Java: Maven, Gradle
  • .NET: NuGet
  • Dart/Flutter: pub

🧠 AI Features

Powered by Google's Gemini AI, providing:

  • Natural Language Processing: Understand your problems in plain English
  • Intelligent Code Analysis: Analyze your codebase for issues
  • Automated Solutions: Generate and apply fixes automatically
  • Package Insights: Smart recommendations for updates and alternatives
  • Security Analysis: Vulnerability detection and remediation
  • Performance Optimization: Code and dependency optimization tips

🔧 Advanced Usage

Batch Operations

# Check multiple projects
for dir in */; do checker check --path "$dir"; done

# Fix all projects in workspace
find . -name "package.json" -execdir checker fix \;

CI/CD Integration

# In your CI pipeline
checker check --json > dependency-report.json
checker doctor --ai || exit 1

Configuration File

Create .checkerrc in your project:

{
  "ignored": ["test", "build", "docs"],
  "autoFix": false,
  "aiEnabled": true
}

📖 Examples

Common Workflows

New Project Setup:

checker help "setup a new React project with TypeScript"

Dependency Issues:

checker check --ai
checker fix

Performance Optimization:

checker help "my app is slow, how to optimize"

Security Audit:

checker doctor --ai

🛠️ Requirements

  • Node.js 16.0.0 or higher
  • npm, yarn, or pnpm (for Node.js projects)
  • Internet connection for AI features

🐛 Troubleshooting

Common Issues:

  1. Permission Errors: Run with sudo on macOS/Linux if needed
  2. API Failures: Check internet connection for AI features
  3. Large Projects: May take longer to analyze (>1000 files)

Get Help:

checker help "I'm having trouble with [describe your issue]"

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

MIT License - see LICENSE file for details.


Made with ❤️ by King Jethro

Transform your development workflow with AI-powered assistance!

changelog

Change Log

All notable changes to the "package-checker" project will be documented in this file.

Check Keep a Changelog for recommendations on how to structure this file.

[0.4.0] - 2024-01-XX - Major CLI Transformation

🚀 Breaking Changes

  • Complete transformation from VS Code extension to standalone CLI tool
  • Removed all VS Code extension dependencies and functionality
  • Changed from OpenRouter to Google Gemini AI API
  • Updated package.json structure for CLI-focused distribution

✨ Added

  • AI-Powered Natural Language Help - checker help "describe your problem"

    • Ask questions in plain English and get intelligent solutions
    • AI can create, modify, and delete files with user confirmation
    • --auto flag to skip confirmations for automated workflows
    • Provides code examples and helpful resources
  • Enhanced CLI Commands

    • checker help <query> - Natural language AI assistance
    • AI integration for existing commands with --ai flag
    • Improved help text and command descriptions
    • Better error handling and user feedback
  • Automated File Operations

    • AI can create new files with suggested code
    • Modify existing files to fix detected issues
    • Delete problematic files when necessary
    • All operations require user confirmation (unless --auto is used)
  • Google Gemini Integration

    • Switched from OpenRouter to Google Gemini API
    • Embedded API key for immediate functionality
    • Enhanced natural language processing capabilities
    • Better code analysis and suggestions
  • Improved Build System

    • Updated esbuild configuration for CLI-only builds
    • Added proper shebang handling for cross-platform execution
    • Optimized bundle size by removing extension dependencies
    • Fixed executable permissions for Unix systems

🗑️ Removed

  • All VS Code extension files and dependencies
  • Extension-specific UI components (sidebar, webview, etc.)
  • VS Code API integrations
  • Extension marketplace metadata
  • OpenRouter AI service integration

🔧 Changed

  • Project Structure: Converted from extension to CLI-focused architecture
  • AI Service: Migrated from OpenRouter to Google Gemini API
  • Package Configuration: Updated for npm CLI distribution
  • Build Process: Simplified for CLI-only output
  • Command Interface: Enhanced existing commands with AI capabilities

🐛 Fixed

  • Duplicate shebang issue in built CLI file
  • Cross-platform executable permissions
  • API key management and configuration
  • Error handling for AI service failures

[0.3.8] - Previous Extension Version

Added

  • VS Code extension functionality
  • Sidebar dependency analysis
  • Basic OpenRouter AI integration
  • Multi-language package manager support

Features

  • Interactive sidebar with dependency tree
  • Command palette integration
  • File location tracking for unused dependencies
  • Basic security audit capabilities

[0.3.0] - Extension Release

Added

  • Initial VS Code extension implementation
  • Basic dependency analysis for npm projects
  • Command palette commands
  • Simple dependency management

Features

  • Dependency scanning and analysis
  • Missing/unused dependency detection
  • Basic install/uninstall functionality

[0.2.0] - Early Development

Added

  • Core dependency analysis logic
  • Multi-package manager support
  • File parsing capabilities

[0.1.0] - Initial Release

Added

  • Basic project structure
  • Core dependency checking functionality
  • npm package.json parsing

Migration Guide (0.3.8 → 0.4.0)

If you were using the VS Code extension:

  1. Uninstall the VS Code extension (if previously installed)
  2. Install the CLI globally: npm install -g package-checker-cli
  3. Use new command syntax: checker help "your question"
  4. Enjoy enhanced AI capabilities with natural language processing

The CLI tool provides all previous functionality plus powerful AI assistance that can understand and solve problems described in natural language.