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 provides a simple command-line interface for creating new SvelteKit projects from a pre-configured template.

Command Syntax

bunx @queaxtra/zvelte <command> [options]

Available Commands

create

Creates a new SvelteKit project using a predefined template.
project-directory
string
required
The directory for the new project. Use . to initialize in the current directory.

Syntax

bunx @queaxtra/zvelte create <project-directory> [options]

Behavior

The create command performs the following operations:
  1. Validates the target directory for security (prevents path traversal)
  2. Clones the sveltekit-shadcn-template repository
  3. Removes the .git directory to start fresh
  4. Updates package.json with project-specific details:
    • Sets name to the project directory name
    • Clears description to an empty string
    • Sets version to “0.0.1”
  5. Installs dependencies (if --install flag is used)

Current Directory Behavior

When you use . as the project directory, Zvelte checks if the current directory is empty:
  • Empty directory: Clones the template directly
  • Non-empty directory: Clones to a temporary directory and merges files
    • Aborts if conflicting files are detected
    • Only copies files that don’t already exist
If you attempt to create a project in a non-empty directory (not using .), Zvelte will abort with an error to prevent accidental overwrites.

Examples

Create a new project in a new directory:
bunx @queaxtra/zvelte create my-awesome-project
Create a project in the current directory:
bunx @queaxtra/zvelte create .
Create a project and install dependencies with Bun:
bunx @queaxtra/zvelte create my-awesome-project --install=bun
Create a project and choose package manager interactively:
bunx @queaxtra/zvelte create my-awesome-project --install

—help

Displays the help message with usage information.
-h, --help
flag
Shows the complete usage message including commands, arguments, options, and examples.

Syntax

bunx @queaxtra/zvelte --help
bunx @queaxtra/zvelte -h

Output

The help command displays:
Usage: bunx @queaxtra/zvelte <command> [options]

Commands:
  create <project-directory>  Creates a new SvelteKit project using a predefined template.

Arguments:
  <project-directory>  The directory for the new project.
                       Use '.' to use the current directory.

Options:
  --install[=<pm>]     Installs dependencies using the specified package manager (bun, pnpm, npm, yarn).
                       If no package manager is specified, you will be prompted to choose.
  -h, --help           Displays this help message.

Examples:
  bunx @queaxtra/zvelte create my-awesome-project --install=bun

Next Steps

After creating your project:
  1. Navigate into your project directory:
    cd my-awesome-project
    
  2. If you didn’t use --install, install dependencies manually:
    bun install  # or npm install, yarn, pnpm
    
  3. Start the development server:
    bun run dev  # or npm run dev, yarn dev, pnpm dev
    

Build docs developers (and LLMs) love