This project is a Rust-based command-line interface (CLI) tool designed to simplify interactions with Svelte projects.
Before installing and using this CLI, make sure you have at least one of the following tools installed:
- Rust: Install Rust by following the instructions at rust-lang.org.
- Node.js and npm: Svelte requires Node.js for dependency management and the development server.
Clone this repository and build the project using the following commands:
git clone https://github.com/gJmry/svelte-cli cd svelte-cli cargo install --path .
Or via NPM
npm i -g @gjmry/svelt
This will add Svelt in your terminal
svelt <command> [arguments]
For example, to initialize a new Svelte project:
svelt init my-project
| Emoji | Status |
|---|---|
| β | Finished |
| π©Ή | Fixing |
| π§ | In progress |
| β | Not started |
| Command | Description | Status |
|---|---|---|
init [NAME] [TOOLKIT] |
Initializes a new Svelte project with the specified name. | π§ |
version / v |
Displays the current version of the CLI. | β |
help / h |
Displays help information about the CLI and its commands. | β |
install [PACKAGE] [FLAG] |
Installs a specific package with optional flags. | β |
run [ENV] |
Runs the project in the specified environment. | β |
dev |
Starts a development server for live preview of the project. | β |
build |
Compiles the Svelte project for production. | β |
lint |
Runs the linter to detect syntax issues in the Svelte code. | β |
start |
Starts the project, typically used for launching the application. | β |
update [PACKAGE] |
Updates the specified package or the entire project. | β |
uninstall [PACKAGE] |
Uninstalls a specific package from the project. | β |
uninstall [PACKAGE] |
Uninstalls a specific package from the project. | β |
create [SCHEMATIC] [NAME] [OPTIONS] |
Generates a new component or file based on a schematic template. | π§ |
add [TOOLKIT] |
Add a toolkit in your project (check Toolkits ) | π§ |
| Name | Description | Status |
|---|---|---|
| UI Toolkits | β π§ | |
| Tailwind | A utility-first CSS framework for rapid UI development. | β |
| Bootstrap | A popular CSS framework with a lot of pre-built components. | β |
| Skeleton | A lightweight CSS framework for minimalistic designs. | β |
| Flowbite | A UI kit based on Tailwind CSS with ready-to-use components. | β |
| Development Toolkits | β | |
| ESLint | A popular linter for identifying and fixing JavaScript/TypeScript issues. | β |
| Prettier | An opinionated code formatter that supports multiple languages. | β |
| Husky | A tool to prevent bad git commit or push by running scripts before those actions. |
β |
| Lint-staged | Runs linters on pre-committed files in Git, useful with Husky for pre-commit hooks. | β |
| Testing Toolkits | β | |
| Jest | A delightful JavaScript testing framework with a focus on simplicity. | β |
| Mocha | A feature-rich JavaScript test framework running on Node.js and in the browser. | β |
| Cypress | A JavaScript end-to-end testing framework for web applications. | β |
| Jasmine | A behavior-driven testing framework for JavaScript, often used with Angular. | β |
| Build & Deployment Toolkits | β | |
| Webpack | A static module bundler for modern JavaScript applications. | β |
| Vite | A next-generation, fast build tool that focuses on speed and simplicity. | β |
| Parcel | A zero-config, blazingly fast web application bundler. | β |
| Rollup | A JavaScript module bundler optimized for ES modules. | β |
| Name | Description | Status |
|---|---|---|
| Store | Generate a js store file | β |
| Component | Generate a .svelte file in a /components directory | β |
| Service | Generate a .js file in a /service directory | β |
| Page | β¬οΈ Generate new route with a +page.svelte you can also add params β¬οΈ | β |
| Layout | Add +layout.svelte file in route | β |
| Error | Add +error.svelte file in route | β |
| Script | Add .ts file by default (otherwise use js) | β |
| Css | Add .css file by default (otherwise use sass, or scss) | β |
| Server | Add +page.server.ts file in route | β |
| Crate | Version | Description |
|---|---|---|
| cliclack | 0.3.5 | A crate for handling command-line input and output. |
| log | 0.4.22 | Provides a flexible logging system for runtime messages. |
| console | 0.15.8 | A crate for beautifying console output, making messages more readable. |
| serde_json | 1.0.132 | For serializing and deserializing JSON data. |
| clap | 4.5.20 | A powerful CLI argument parser, supporting features like auto-generated help. |
| Operating System | Architecture | Status |
|---|---|---|
| Linux | x86_64 | β Fully supported |
| Linux | ARM64 | π§ Work in progress |
| Windows | x86_64 | β Fully supported |
| macOS | x86_64 | π§ Work in progress |
This project is licensed under the MIT License - See in the repository