Skip to main content
Salesive themes are Vite + React projects. The salesive-dev-tools CLI scaffolds a project, runs it locally with live config watching, and publishes it to the Salesive Themes API.

Prerequisites

  • Node.js 18+ and a package manager (npm, yarn, pnpm, or bun).
  • A Salesive Themes API key (starts with sk-) — create one from the Developers → API keys area of your Salesive dashboard. You only need it to publish.

Step 1 · Install the Salesive CLI globally

npm install -g salesive-dev-tools
# or
yarn global add salesive-dev-tools
# or
pnpm add -g salesive-dev-tools
# or
bun add -g salesive-dev-tools
Verify the install:
salesive --version

Step 2 · Add your API key to the CLI

Authenticate the CLI with your Themes API key. This is stored once on your machine and is required before you can publish (salesive cook).
# paste your sk-... key when prompted (input is hidden)
salesive auth set-token

# confirm the key is valid and see its permissions
salesive auth verify
Useful auth commands: salesive auth status (is a token set?) and salesive auth clear-token (remove it). Keys are sent as the X-API-Key header.

Step 3 · Scaffold a new project

Run init and answer the prompts — project name, build tool, framework, and package manager:
salesive init
? Project name: my-store
? Build tool: Vite
? Framework: React
? Package manager: npm
This scaffolds a Vite + React project pre-wired with the Salesive config plugin, a salesive.config.json, and the dev/build scripts.
Prefer flags? Skip the prompts with salesive init --name my-store --build-tool vite --framework react. Use --current to scaffold into the current directory, or --force to overwrite an existing one. Vite is the only supported build tool for now.

Step 4 · Install dependencies and run locally

cd my-store

# install dependencies
npm install

# start the dev server
npm run dev
npm run dev runs salesive dev, which starts Vite with live salesive.config.json watching — it automatically restarts when your config changes. Press r to restart and q to quit. Open the dev server (default http://localhost:5173). The plugin injects your configuration into window.SALESIVE_CONFIG and exposes it through React hooks.

Step 5 · Build your storefront

Fetch data with salesive-api-axios and read theme config with useSalesiveConfig():
import { useEffect, useState } from "react";
import { products } from "salesive-api-axios";
import { useSalesiveConfig } from "salesive-dev-tools";

function App() {
    const appName = useSalesiveConfig("app-name");
    const brandColor = useSalesiveConfig("color-brand-primary");
    const [items, setItems] = useState([]);

    useEffect(() => {
        // The catalog adapts to the store type — read `catalogType`/`itemType`
        // to support ecommerce, restaurant, and business stores.
        products.list({ limit: 10 }).then(({ data }) => {
            setItems(data?.data?.products ?? []);
        });
    }, []);

    return (
        <div style={{ color: brandColor }}>
            <h1>{appName}</h1>
            <p>{items.length} catalog items</p>
        </div>
    );
}
See Store types to learn how the same endpoints serve products, foods, and services, and set shopTypes in salesive.config.json to declare which store types your theme supports.

Step 6 · Validate and publish (cook)

When your theme is ready, publish it to the Salesive Themes API. cook runs your build, packages the template, and uploads it — so make sure you completed Step 2 first.
# optional: catch config errors before publishing
salesive validate

# build, package, and upload to the Themes API
salesive cook
cook automatically runs your project’s build script, then packages all template files plus salesive.config.json (required) and salesive.form.json (optional, recommended), excluding node_modules/, .git/, and temp/log files.
# common options
salesive cook --no-build      # skip the automatic build
salesive cook --path ./theme  # publish from a specific directory
salesive cook --keep-temp     # keep the temp bundle for debugging
salesive cook --verbose       # detailed error output
Don’t have a salesive.form.json? Generate one at form.salesive.com.

Next steps

Theme development guide

Configure the Vite plugin, define salesive.config.json, and use the config hooks and CLI workflows.

Explore the Store API

Dive into authentication, products, cart, orders, shipping, and wishlist endpoints.

Master the Axios Client

Learn about typed API wrappers, environment detection, and token management with salesive-api-axios.

Store types & routing

Understand the storefront routes you implement and how the catalog adapts to each store type.
Need support? Email support@salesive.com or reach out via your Salesive onboarding channel.