create and migrate.
Installation & Usage
You can run the CLI directly usingnpx to ensure you’re always using the latest version:
data-line-numbers=false
data-line-numbers=false
Available Commands
create
The create command starts a new Weaverse storefront. It:
- Creates a new project directory
- Downloads and extracts the selected template
- Sets up environment variables, including your
WEAVERSE_PROJECT_IDand, for Hydrogen templates, a generatedSESSION_SECRET - Installs necessary dependencies (optional)
- Starts the development server (optional — prompted interactively, opt-in with
--devin non-interactive runs)
Available Templates
Weaverse CLI currently supports the following templates:
The
forward template needs Bun. When Bun is missing, an interactive run offers to install it with npm install -g bun; a non-interactive run stops with install instructions instead. Pass --no-install to download the template without installing dependencies.
Options
The CLI also runs non-interactively on its own when stdin isn’t a TTY (piped
input, CI, or a coding agent), or when
CI=true is set — --yes/--ci just
force that mode explicitly.Usage Examples
Basic usage with the Pilot template:data-line-numbers=false
data-line-numbers=false
data-line-numbers=false
data-line-numbers=false
data-line-numbers=false
data-line-numbers=false
--project-name, the folder is named after the theme.
Agent/CI-friendly setup:
data-line-numbers=false
data-line-numbers=false
migrate
migrate v6 rewrites an existing theme’s source for @weaverse/hydrogen 6. It moves imports from @weaverse/hydrogen to @weaverse/hydrogen/react-router (and from @weaverse/next to @weaverse/hydrogen/next), and renames the public Hydrogen* types to their Weaverse* names, such as HydrogenComponentProps to WeaverseComponentProps. Only files that import Weaverse are changed; node_modules, dist, build, .git, .react-router, .next and .cache are skipped.
data-line-numbers=false
It doesn’t upgrade packages: afterwards, upgrade
@shopify/hydrogen to 2026.10 or later and @weaverse/hydrogen to 6, then run your typecheck. See the v6 migration guide.
Workflow
When you run thecreate command, the CLI will:
- Download the selected template from GitHub
- Extract the template to your specified project directory
- Configure environment variables (including your Weaverse project ID)
- Generate a secure local
SESSION_SECRET(Hydrogen templates) - Install dependencies with the template’s package manager, npm or Bun (unless
--no-installis specified) - Start the development server — in interactive mode the CLI asks first; in
non-interactive mode it only starts when
--devis passed, so agent and CI runs return instead of hanging on a blocking server
Best Practices
It is recommended to create your project within the Weaverse app first. Doing so will allow you to copy the full command, complete with the project ID and project name, ensuring accuracy.
Troubleshooting
Common Issues
Template Download Fails- Check your internet connection
- Verify that the specified commit hash is valid (if using
--commit) - Try again with the default template without specifying a commit
- Try running
npm install --legacy-peer-deps(Hydrogen templates) orbun install(forward) manually in the project directory - Ensure you have a supported version of Node.js installed. The current Pilot template declares Node.js
^22.18.0 || ^24.11.0; the@weaverse/hydrogenpackage itself declares Node.js>=20 - Check for errors in your project’s package.json
- Make sure all required environment variables are set
- Stores on a Shopify plan: install the Hydrogen sales channel (https://apps.shopify.com/hydrogen), create one Hydrogen storefront project, then run
npx shopify hydrogen env pull. If needed, copy values from Hydrogen sales channel → Storefront Settings → Environments and variables. - Development stores or stores without a Shopify plan: install the Headless sales channel (https://apps.shopify.com/headless), then copy the Storefront API values into
.env. - Verify the dev port is available on your system: 3456 for Hydrogen templates, 3333 for
forward