README.md
April 22, 2026 ยท View on GitHub
๐ Lazy Install
VS Code extension to auto install missing npm packages from import statements
English | ็ฎไฝไธญๆ
Lazy Install detects missing dependencies in JavaScript, TypeScript, React, and Vue files, then lets you install them with one click via npm, pnpm, yarn, or ni.
โจ Why Lazy Install for VS Code?
Stop the tedious workflow! ๐
โ Before: Import โ Copy package name โ Switch to terminal โ Type install command โ Wait โ Switch back to editor โ After: Import โ Click install button โ Done! ๐
Lazy Install automatically detects uninstalled packages in import, export from, require(), and import() statements, then provides one-click install buttons directly in the editor. No more terminal switching or copy-pasting package names.
๐ฏ Features
- ๐ Missing Package Detection: Automatically scans import statements for dependencies that are not installed yet
- โก One-Click Install: Install npm packages instantly with inline CodeLens actions
- ๐ ๏ธ Multiple Package Managers: Supports npm, pnpm, yarn, and ni
- ๐งฉ Common Import Forms: Supports
import,export from,require(), andimport() - ๐ฆ Dev Dependencies: Choose between regular dependencies and dev dependencies
- ๐ง Monorepo Support: Works with pnpm workspaces and
package.jsonworkspaces - ๐ Zero Configuration: Works out of the box for JavaScript, TypeScript, React, and Vue projects
Just import and click - it's that simple!
๐ Quick Start
- Install the extension from VS Code Marketplace
- Write a missing import such as
import axios from 'axios' - Click the inline install button above the import
- Done! The missing dependency is installed and ready to use
โ๏ธ Configuration
Customize your package manager in VS Code settings:
{
"lazy-install.way": "pnpm" // Options: "ni", "npm", "pnpm", "yarn"
}
Supported Package Managers:
- ๐ง ni (default) - Universal package manager
- ๐ฆ npm - Node Package Manager
- โก pnpm - Fast, disk space efficient
- ๐งถ yarn - Reliable, secure, fast
๐ ๏ธ Supported Languages
- โ JavaScript (.js)
- โ TypeScript (.ts)
- โ React (.jsx, .tsx)
- โ Vue (.vue)
๐ก Pro Tips
- Regular Dependency: Click the package name button
- Dev Dependency: Click the "package-name -D" button
- Common Import Styles: Works with
import,require(), andimport() - Monorepos: Detects pnpm workspaces and
package.jsonworkspaces
โ FAQ
Does Lazy Install work with monorepos?
Yes. It detects pnpm workspaces and package.json workspaces, then installs dependencies in the current package instead of always using the repository root.
Which import styles are supported?
Lazy Install detects packages referenced by import, export from, require(), and import() syntax in supported files.
Can I install dev dependencies?
Yes. Each missing package gets both a regular install action and a -D install action in the CodeLens UI.
๐ค Contributing
Contributions are welcome! Feel free to:
- ๐ Report bugs
- ๐ก Suggest features
- ๐ง Submit pull requests
- โญ Star the project
๐ License
โ Support
If this extension saves you time, consider buying me a coffee! โ
๐ Sponsors
Made with โค๏ธ by Simon He