Installation
Get Importy installed and running on your system in just a few steps.
System Requirements
- Node.js: Version 18.0.0 or higher
- npm: Version 8.0.0 or higher (or equivalent pnpm/yarn)
- Operating System: Windows, macOS, or Linux
Global Installation (Recommended)
Install Importy globally to use it from anywhere in your terminal:
# Using npm
npm install -g importy
# Using yarn
yarn global add importy
# Using pnpm
pnpm add -g importy
Verify Installation
After installation, verify that Importy is working correctly:
# Check version
importy --version
# Should output: 0.1.1
# Display help
importy --help
Local Installation
If you prefer to install Importy locally in your project:
# Using npm
npm install --save-dev importy
# Using yarn
yarn add --dev importy
# Using pnpm
pnpm add --save-dev importy
Then run it using npx:
npx importy --dir ./src --lib react
Or add it to your package.json scripts:
{
"scripts": {
"analyze": "importy --dir ./src --lib react",
"analyze-lodash": "importy --dir ./src --lib lodash --verbose"
}
}
Alternative Installation Methods
Using npx (No Installation)
Run Importy without installing it permanently:
npx importy --dir ./src --lib react
This downloads and runs the latest version of Importy without installing it globally.
Docker Installation
If you prefer using Docker:
# Pull the image (when available)
docker pull importy/cli
# Run analysis
docker run --rm -v $(pwd):/workspace importy/cli --dir /workspace/src --lib react
Troubleshooting Installation
Permission Issues (macOS/Linux)
If you encounter permission errors during global installation:
# Option 1: Use sudo (not recommended)
sudo npm install -g importy
# Option 2: Configure npm to use a different directory (recommended)
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
npm install -g importy
Windows Installation Issues
If you encounter issues on Windows:
- Run your terminal as Administrator
- Or use a package manager like Chocolatey:
# Install Node.js via Chocolatey
choco install nodejs
# Then install Importy
npm install -g importy
Node.js Version Issues
If you're using an older version of Node.js:
# Check your Node.js version
node --version
# If less than 18.0.0, update Node.js
# Using nvm (recommended)
nvm install 18
nvm use 18
# Or download from https://nodejs.org
Package Manager Issues
If npm is slow or having issues, try using pnpm:
# Install pnpm
npm install -g pnpm
# Install Importy with pnpm
pnpm add -g importy
Updating Importy
Keep Importy up to date to get the latest features and bug fixes:
# Check current version
importy --version
# Update to latest version
npm update -g importy
# Or reinstall
npm uninstall -g importy
npm install -g importy
Uninstalling
If you need to remove Importy:
# Global uninstall
npm uninstall -g importy
# Local uninstall
npm uninstall importy
Next Steps
Once Importy is installed:
- 📖 Follow the Getting Started guide
- 🔧 Learn about Configuration options
- 💡 Check out Examples for common use cases
Getting Help
If you encounter any installation issues:
- 📖 Check our Troubleshooting Guide
- 🐛 Report an Issue
- 💬 Ask for Help