Skip to main content

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

bunx @queaxtra/zvelte create my-app --install=bun
bunx @queaxtra/zvelte create my-app --install=pnpm
bunx @queaxtra/zvelte create my-app --install=npm
bunx @queaxtra/zvelte create my-app --install=yarn

Interactive Package Manager Selection

When you use --install without specifying a package manager, Zvelte will:
1

Detect Installed Package Managers

Scans your system for available package managers (bun, pnpm, npm, yarn) by checking if each command is executable.
2

Present Interactive Menu

Shows you a selection menu with all detected package managers plus a “None” option.
3

Install Dependencies

Runs the installation command for your selected package manager in the project directory.

Example Interactive Flow

$ bunx @queaxtra/zvelte create my-app --install

Creating new project in /home/user/my-app...
Project created successfully!

? Which package manager do you want to use for installation? 
 bun
  pnpm
  npm
  None

Installing dependencies with bun...

Dependencies installed successfully!
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:
// Checks if command exists by running: <command> --version
const availablePms = ['bun', 'pnpm', 'npm', 'yarn'].filter(isCommandInstalled);
This ensures that:
  • 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:
Installing dependencies with bun...
# Package manager output appears here

Dependencies installed successfully!
The installation runs the equivalent of:
bun install

Error Handling

Package Manager Not Found

If you specify a package manager that isn’t installed:
$ bunx @queaxtra/zvelte create my-app --install=pnpm

Project created successfully!
Warning: pnpm is not installed. Skipping dependency installation.
When a specified package manager is not found, Zvelte will skip installation rather than fail. Your project will be created successfully, but you’ll need to manually install dependencies.

No Package Managers Available

If you use --install but no package managers are detected:
Warning: No package managers (bun, pnpm, npm, yarn) found. 
Skipping dependency installation.

Installation Failure

If the installation process fails (exit code ≠ 0):
Error: Dependency installation failed with code 1
In this case:
  • 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:
cd my-app
bun install

Best Practices

Including --install in your create command saves time by automating the dependency installation step.
bunx @queaxtra/zvelte create my-app --install=bun
If you have multiple package managers installed, explicitly specify which one to use to avoid the interactive prompt:
bunx @queaxtra/zvelte create my-app --install=pnpm
If you’re not sure which package managers are available, use --install without a value to see your options:
bunx @queaxtra/zvelte create my-app --install
Bun users: Since you’re already using bunx to run Zvelte, --install=bun is often the most consistent choice for your workflow.

Starting Development

After dependencies are installed, start your development server:
bun run dev

Build docs developers (and LLMs) love