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
Thecreate 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
Arguments
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:Validate Directory
Validates the target directory path and checks for path traversal attacks to ensure security.
Clone Template
Clones the sveltekit-shadcn-template repository into your specified directory.
Remove Git History
Removes the
.git directory from the cloned template so you can initialize your own repository.Update package.json
Automatically updates the
package.json file with:name: Set to your project directory namedescription: Cleared to an empty stringversion: Reset to “0.0.1”
Usage Examples
Expected Output
When you run the create command successfully, you’ll see output similar to this:--install flag:
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.
-
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: -
Invalid path: If the directory path contains invalid characters or attempts path traversal:
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