# clone your project or initialize a new onegit clone <your-salesive-repo>cd <your-salesive-repo># install dependenciesnpm install# install Salesive packagesnpm install salesive-api-axiosnpm install salesive-dev-tools --save-dev# optional: install CLI globally for easier accessnpm install -g salesive-dev-tools
Create a .env file with your Salesive credentials:
Copy
# Vite projects use VITE_ prefixVITE_SALESIVE_SHOP_ID=your_shop_idVITE_SALESIVE_API_KEY=your_api_key# For Next.js, use NEXT_PUBLIC_ prefix# NEXT_PUBLIC_SALESIVE_SHOP_ID=your_shop_id# NEXT_PUBLIC_SALESIVE_API_KEY=your_api_key
Create salesive.config.json for template configuration:
# start your Vite dev servernpm run dev# or use salesive CLI for config-watchingsalesive dev --config ./salesive.config.json
Visit the dev server (default http://localhost:5173) to interact with your storefront. The Vite plugin automatically injects configuration from salesive.config.json into window.SALESIVE_CONFIG and makes it available via React hooks.
# validate your configurationsalesive validate# deploy your template to Salesive Themes APIsalesive cook# or specify custom pathssalesive cook --path ./my-template --config ./salesive.config.json# keep temp files for debuggingsalesive cook --keep-temp --verbose
The cook command packages all template files, validates the configuration, and uploads to the Salesive Themes API. Monitor deployment status from your Salesive dashboard.
Tip: Run salesive validate before salesive cook to catch configuration errors early.