smart-install-packages
v1.0.1
Published
🚀 Smart Install CLI — Auto-detect your package manager, fix Node.js version mismatches, clean caches, and safely install dependencies.
Maintainers
Readme
Smart Install CLI
A cross-platform intelligent CLI that automatically detects your project’s package manager, fixes Node.js version mismatches, cleans caches, and installs dependencies safely — even handling NVM version switches automatically.
Smart Install CLI detects your environment, selects the right package manager, cleans old lock files, ensures Node.js compatibility, and performs safe installations automatically.
Features
- Auto-detects your package manager (
npm,yarn,pnpm,bun) - Automatically switches Node.js version via NVM
- Cleans
node_modulesand lock files before install - Auto-retries after environment fix or version switch
- Built-in
--doctorand--fixcommands for quick repair - Works seamlessly on Windows, macOS, and Linux
- Integrated with VS Code via Safe Packages Installation Extension
Installation
npm install -g smart-install-packages
# or
yarn global add smart-install-packagesBasic Usage
smart-installSmart Install will:
- Detect your project’s package manager
- Verify Node.js version compatibility
- Switch Node version if required (via
nvm) - Clean
node_modulesand lock files - Install dependencies safely
Example Output
Smart Install CLI
========================================
Current directory: C:\Projects\MyApp
CLI location: C:\Users\KZ\AppData\Roaming\npm\node_modules\smart-install-packages\bin
----------------------------------------
Initializing Smart Install...
Using package manager: YARN
Cleaning project files...
Running: yarn install
Detected Node mismatch — switching to Node 18.12.0...
Node v18.12.0 activated successfully.
Re-running installation...
Installation finished successfully!CLI Flags
| Flag | Description |
| ---------------------- | --------------------------------------------------- |
| --clean-only | Remove node_modules and lockfiles only |
| --force | Force reinstall dependencies |
| --manager <name> | Use specific manager (npm, yarn, pnpm, bun) |
| --debug | Show detailed logs |
| --auto-relaunch | Auto-relaunch after Node switch |
| --skip-switch | Skip Node version switching |
| --status | Show current Node and engine compatibility |
| --fix | Fix Node and manager issues before install |
| --doctor | Diagnose Node/NVM/network environment |
| --requirements | Show project requirements before installing |
| --keep-terminal-open | Keep terminal open after relaunch |
| --list-flags | Display all supported flags |
| --help | Show help menu |
Examples
Clean Project Only
smart-install --clean-onlyForce Fresh Install
smart-install --forceUse Specific Manager
smart-install --manager npmDiagnose Environment
smart-install --doctorAuto-Fix Node & Dependencies
smart-install --fixAdvanced Commands
Check Requirements Before Installing
smart-install --requirementsView Compatibility Status
smart-install --statusVS Code Integration
Smart Install integrates directly with VS Code through the companion extension:
Safe Packages Installation
This allows automatic installation and repair after cloning or switching branches — perfect for teams and CI/CD environments.
Error Handling
Smart Install gracefully handles:
- Node version mismatches (auto-switches)
- Missing package managers (auto-installs globally)
- Locked files or corrupted caches
- Network or permission errors
If Node remains undetected after switching, run:
nvm use <version> smart-install --skip-switch
Changelog
v1.0.0**
- Initial stable release
- Full Windows/macOS/Linux support
- Added Node auto-switch via NVM
- Implemented
--doctor,--fix,--requirements - Improved error handling and flag detection
- Added VS Code integration
Author
Kerolos Zakaria
Portfolio • GitHub • npm • LinkedIn • VS Code Marketplace
License
MIT License © 2025 Kerolos Zakaria
