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

The create command is the primary command in Zvelte CLI. It clones the SvelteKit Shadcn template repository and sets up a new project with your specified configuration.

Basic Syntax

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

Arguments

project-directory
string
required
The name or path of the directory where your new project will be created. Use . to initialize in the current directory.

Command Behavior

When you run the create command, Zvelte performs the following steps:
1

Validate Directory

Validates the target directory path and checks for path traversal attacks to ensure security.
2

Clone Template

Clones the sveltekit-shadcn-template repository into your specified directory.
3

Remove Git History

Removes the .git directory from the cloned template so you can initialize your own repository.
4

Update package.json

Automatically updates the package.json file with:
  • name: Set to your project directory name
  • description: Cleared to an empty string
  • version: Reset to “0.0.1”
5

Install Dependencies (Optional)

If you used the --install flag, installs project dependencies with your chosen package manager.

Usage Examples

bunx @queaxtra/zvelte create my-svelte-app

Expected Output

When you run the create command successfully, you’ll see output similar to this:
Creating new project in /path/to/my-svelte-app...
Cloning into 'my-svelte-app'...
Removed .git directory.
Project created successfully!
If you included the --install flag:
Creating new project in /path/to/my-svelte-app...
Cloning into 'my-svelte-app'...
Removed .git directory.
Project created successfully!
Installing dependencies with bun...

Dependencies installed successfully!

Directory Validation

Zvelte includes built-in security checks to prevent path traversal attacks. The target directory path is validated and normalized before any operations are performed.
The create command will fail in these scenarios:
  • Non-empty directory: If you specify a directory name (not .) and that directory already exists and is not empty, the command will abort with an error:
    Error: Directory 'my-app' already exists and is not empty.
    
  • Invalid path: If the directory path contains invalid characters or attempts path traversal:
    Error: Path traversal detected in project directory.
    
Use the current directory syntax (.) if you want to merge the template into an existing non-empty directory. See Current Directory for details.

Template Contents

The created project includes:
  • SvelteKit: Modern web framework for building fast, efficient applications
  • Shadcn UI: High-quality, accessible UI components
  • Tailwind CSS: Utility-first CSS framework
  • i18n Support: Built-in internationalization capabilities
  • Pre-configured tooling: ESLint, Prettier, and TypeScript ready to go

Next Steps

After creating your project:

Install Dependencies

Learn about package manager options and auto-installation

Start Developing

Navigate to your project and start the dev server

Getting Help

To view the help message at any time:
bunx @queaxtra/zvelte --help