VS Code Extension
Analyze and update dependencies directly in Visual Studio Code
VS Code Extension
Analyze and update package dependencies directly in Visual Studio Code. Pack-Man brings real-time dependency health monitoring to your editor with inline indicators, hover information, and quick update actions.
The VS Code extension is available for testing! Download the .vsix file from the repository.
Features
🔍 Real-time Dependency Analysis
- Automatic Detection - Activates when you open projects with
package.json,requirements.txt, orpubspec.yaml - Multi-ecosystem Support - Works with npm, pip, and pub package managers
- Instant Feedback - See dependency status as you edit your files
📊 Visual Indicators
CodeLens Integration
Inline status indicators above each dependency:
- ✅ Green checkmark - Up-to-date packages
- ⚠️ Yellow warning - Outdated packages with available version
- ❌ Red error - Packages with issues
Hover Information
Detailed package info on hover:
- Current version vs. latest version
- Package status
- Documentation links
- Registry URLs
Problems Panel
Outdated and error dependencies appear in VS Code's Problems panel
Status Bar
Project-wide dependency health at a glance:
- 🟢
Dependencies: OK- All up-to-date - 🟡
Dependencies: X outdated- Some need updates - 🔴
Dependencies: X errors- Issues found
⚡ Quick Actions
- One-Click Updates - Update individual dependencies directly from CodeLens
- Bulk Updates - Update all outdated dependencies with a single command
- File Preservation - Maintains formatting and comments when updating
- Progress Feedback - Real-time notifications during updates
🎨 Rich UI
- Detailed Webview - Comprehensive analysis panel with statistics and package lists
- Theme Support - Respects your VS Code theme (light/dark mode)
- Responsive Design - Clean, intuitive interface
🚀 Smart Features
- Auto-analysis on Save - Automatically re-analyzes when you save package files
- Intelligent Caching - Reduces API calls with smart caching (5min success, 2min error TTL)
- Multi-root Workspaces - Handles multiple projects simultaneously
- GitHub Token Support - Analyze private repositories with authentication
Installation
From VSIX File
Download the Extension
Download pack-man-vscode-1.0.0.vsix from the vscode-extension directory
Install in VS Code
Option A: Command Palette
- Open VS Code
- Press
Ctrl+Shift+P(orCmd+Shift+Pon Mac) - Type "Install from VSIX" and select the command
- Choose the downloaded
.vsixfile - Reload VS Code when prompted
Option B: Command Line
code --install-extension pack-man-vscode-1.0.0.vsixVerify Installation
- Open the Extensions view (
Ctrl+Shift+XorCmd+Shift+X) - Search for "Pack-Man"
- You should see the extension installed and active
From Marketplace (Coming Soon)
Search for "Pack-Man" in the VS Code Extensions marketplace and click Install.
Usage
Automatic Analysis
The extension automatically activates when you open a workspace containing:
package.json(npm/Node.js projects)requirements.txt(Python/pip projects)pubspec.yaml(Flutter/Dart projects)
Manual Commands
Access these commands via Command Palette (Ctrl+Shift+P or Cmd+Shift+P):
| Command | Description |
|---|---|
Pack-Man: Analyze Dependencies | Analyze the active package file |
Pack-Man: Analyze Workspace | Analyze all package files in workspace |
Pack-Man: Update All Dependencies | Update all outdated packages in active file |
Pack-Man: Show Analysis | Open detailed analysis webview |
Keyboard Shortcuts
Ctrl+Shift+P A(orCmd+Shift+P Aon Mac) - Analyze DependenciesCtrl+Shift+P U(orCmd+Shift+P Uon Mac) - Update All Dependencies
Configuration
Configure Pack-Man through VS Code settings (File > Preferences > Settings or Ctrl+,):
API Endpoint
"packman.apiEndpoint": "https://pack-man.vercel.app"Change this to use a self-hosted Pack-Man instance.
Auto-analyze on Save
"packman.autoAnalyzeOnSave": trueAutomatically re-analyze dependencies when you save package files.
Show CodeLens
"packman.showCodeLens": trueDisplay inline status indicators above dependencies.
Show Diagnostics
"packman.showDiagnostics": trueShow outdated/error dependencies in the Problems panel.
GitHub Token (Secure Storage)
For private repositories or to increase API rate limits:
- Open Command Palette (
Ctrl+Shift+P) - Search for "Preferences: Open Settings (UI)"
- Search for "Pack-Man"
- Click "Edit in settings.json" for GitHub Token
- The token is stored securely in VS Code's SecretStorage
Benefits of GitHub Token:
- Access private repositories
- Increased rate limits (5000/hour vs 60/hour)
- Better reliability for large projects
Supported Package Managers
npm (package.json)
{
"dependencies": {
"react": "^18.0.0",
"axios": "^1.0.0"
},
"devDependencies": {
"vitest": "^4.0.0"
}
}pip (requirements.txt)
django==4.2.0
requests>=2.28.0
pytest~=7.3.0pub (pubspec.yaml)
dependencies:
flutter:
sdk: flutter
http: ^1.0.0
dev_dependencies:
flutter_test:
sdk: flutterQuick Start Example
1. Create a Test Project
mkdir test-packman && cd test-packman2. Create package.json
{
"name": "test-project",
"version": "1.0.0",
"dependencies": {
"react": "^17.0.0",
"axios": "^0.21.0"
},
"devDependencies": {
"vitest": "^3.0.0"
}
}3. Open in VS Code
code .4. Observe the Extension
You should see:
- ⚠️ CodeLens indicators above each dependency showing available updates
- 🟡 Status bar showing "Dependencies: 3 outdated"
- Hover information when you mouse over package names
- Warnings in the Problems panel (
Ctrl+Shift+M)
5. Update Packages
- Click "Update" on any CodeLens indicator to update that package
- Or use
Pack-Man: Update All Dependenciesto update everything
Troubleshooting
Extension Not Activating
Problem: Extension doesn't activate when opening package files.
Solutions:
- Ensure the file is named correctly (
package.json,requirements.txt, orpubspec.yaml) - Check that the file is in the workspace root or a subdirectory
- Reload VS Code window (
Ctrl+Shift+P> "Reload Window")
No CodeLens Indicators
Problem: Inline indicators don't appear above dependencies.
Solutions:
- Check that
packman.showCodeLensis enabled in settings - Verify the file is a valid package file
- Wait a few seconds for initial analysis to complete
- Check Output panel (
View > Output> select "Pack-Man") for errors
API Connection Issues
Problem: "Failed to analyze dependencies" errors.
Solutions:
- Check your internet connection
- Verify
packman.apiEndpointis correct in settings - Check if you're behind a proxy or firewall
- Try again in a few minutes (might be temporary API issue)
Rate Limit Errors
Problem: "Rate limit exceeded" messages.
Solutions:
- Configure a GitHub token in settings (increases limit to 5000/hour)
- Wait for the rate limit to reset (usually 1 hour)
- Use caching to reduce API calls
Updates Not Working
Problem: Update commands fail or don't change the file.
Solutions:
- Ensure the file is not read-only
- Check file permissions
- Verify you have write access to the file
- Close other programs that might have the file open
Private Repository Access
Problem: Can't analyze dependencies in private repositories.
Solutions:
- Configure a GitHub token with appropriate permissions
- Ensure the token has
reposcope for private repositories - Verify the token is valid and not expired
Performance
The extension is designed to be lightweight and efficient:
- Activation Time: < 500ms
- Parsing: Incremental parsing with caching
- CodeLens Updates: Debounced by 300ms
- API Calls: Cached for 5 minutes (success) or 2 minutes (errors)
- Memory: Minimal footprint with automatic cleanup
Privacy & Security
- GitHub Tokens: Stored securely in VS Code's SecretStorage (encrypted)
- API Communication: HTTPS only
- No Telemetry: Extension doesn't collect or send usage data
- Local Processing: File parsing happens locally
- Minimal Permissions: Only requests necessary VS Code API permissions
Related Projects
- Pack-Man Web App: pack-man.vercel.app
- Pack-Man Chrome Extension: Analyze dependencies on GitHub repository pages
Contributing
The VS Code extension is open source! Contributions are welcome:
- Bug Reports - Open an issue with detailed information
- Feature Requests - Suggest new features or improvements
- Pull Requests - Submit code improvements or fixes
- Documentation - Help improve this guide
See the vscode-extension/ directory for source code.
Support
- Issues: GitHub Issues
- Documentation: pack-man.vercel.app/docs
- Website: pack-man.vercel.app