Skip to content

Getting Started

P Avinash edited this page May 22, 2026 · 1 revision

Getting Started

Welcome to Sparx! This guide will walk you through installing Sparx, initializing a project, and running your very first development server in under a minute.


Installation

Install the Sparx CLI globally using your favorite package manager:

# Using npm
npm install -g @sparx/cli

# Using yarn
yarn global add @sparx/cli

# Using pnpm
pnpm add -g @sparx/cli

Verify the installation:

sparx --version
# Output: sparx/1.0.9 (x86_64-unknown-linux-gnu)

Initialize a Project

To initialize a new project, use the interactive init command:

sparx init my-sparx-app

You will be prompted to choose from 19 meta-framework templates (e.g., React, Vue, Svelte, Solid, Next.js, Nuxt).

Manual Setup

Alternatively, add Sparx to an existing project:

cd my-existing-app
sparx init --manual

Running the Dev Server

Start the development server with sub-100ms HMR:

sparx dev

The CLI will start the dev server and print the local URL:

Sparx Dev Server started in 42ms
   > Local:   http://localhost:3000
   > Network: http://192.168.1.10:3000

To build for production, run:

sparx build

The smart persistent cache will skip unchanged modules, ensuring near-instant incremental builds.

Clone this wiki locally