Documentation Index
Fetch the complete documentation index at: https://mintlify.com/queaxtra/zvelte/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Zvelte CLI supports automatic dependency installation during project creation using the--install flag. You can specify your preferred package manager or let Zvelte prompt you to choose from the ones installed on your system.
Supported Package Managers
Zvelte supports the following package managers:Bun
Fast all-in-one JavaScript runtime and toolkit
pnpm
Fast, disk space efficient package manager
npm
Default Node.js package manager
Yarn
Fast, reliable, and secure dependency management
The —install Flag
The--install flag controls whether and how dependencies are installed after project creation.
Syntax Options
Interactive Package Manager Selection
When you use--install without specifying a package manager, Zvelte will:
Detect Installed Package Managers
Scans your system for available package managers (bun, pnpm, npm, yarn) by checking if each command is executable.
Present Interactive Menu
Shows you a selection menu with all detected package managers plus a “None” option.
Example Interactive Flow
The interactive prompt only shows package managers that are actually installed on your system, making it impossible to select an unavailable option.
Auto-Detection Logic
Zvelte’s package manager detection works by attempting to run each package manager’s version command:- Only functional package managers are offered
- You never encounter “command not found” errors
- The selection menu is tailored to your environment
Installation Process
When dependencies are being installed, you’ll see:Error Handling
Package Manager Not Found
If you specify a package manager that isn’t installed:No Package Managers Available
If you use--install but no package managers are detected:
Installation Failure
If the installation process fails (exit code ≠ 0):- Your project files are still created successfully
- You can manually run the installation command
- Check the package manager output for specific error details
Manual Installation
If you create a project without the--install flag, you can manually install dependencies:
Best Practices
Use --install for faster setup
Use --install for faster setup
Including
--install in your create command saves time by automating the dependency installation step.Specify your preferred package manager
Specify your preferred package manager
If you have multiple package managers installed, explicitly specify which one to use to avoid the interactive prompt:
Use interactive mode when uncertain
Use interactive mode when uncertain
If you’re not sure which package managers are available, use
--install without a value to see your options: