@storifycli/cli
v0.5.1
Published
Storify theme development CLI — login, live dev preview, validate, build, pack, and upload themes.
Maintainers
Readme
Storify Theme CLI
Unified CLI for developing, validating, packaging, and uploading Storify themes.
Install
From npm (recommended for theme developers):
npm install -g @storifycli/cli
storify --helpOr run without global install:
npx @storifycli/cli theme devDo not use bare npx storify — it resolves to an unrelated legacy npm package.
From the Storify monorepo (platform team):
cd packages/storify-cli && npm install && npm run build
npm link # optional global `storify` commandTheme folders can also call the local build directly:
"dev": "node ../../packages/storify-cli/dist/cli.js theme dev"Authentication
storify loginInteractive flow:
- Password
- Pick store by name
Saves ~/.storify/config.json:
| Key | Default (local) | Production |
|-----|-----------------|------------|
| apiUrl | http://localhost:3001/api | https://app.storify.it.com/api |
| storefrontUrl | http://localhost:3004 | https://{subdomain}.storify.it.com |
| adminUrl | http://localhost:3003 | https://app.storify.it.com |
Requires backend LEGACY_TOKEN_RESPONSE=true for bearer token in login response.
Environment overrides: STORIFY_ENV=production, STORIFY_API_URL, STORIFY_AUTH_TOKEN, STORIFY_STORE_ID, STORIFY_STOREFRONT_URL, STORIFY_ADMIN_URL.
Commands
| Command | Description |
|---------|-------------|
| storify | Interactive menu |
| storify login | Save credentials |
| storify status | Config + theme folder |
| storify theme dev | Vite + live storefront preview (local/tunnel) |
| storify theme sync | Upload, link theme ID, activate, push updates |
| storify theme validate | Manifest + section checks |
| storify theme build | Vite build + generated manifest |
| storify theme pack | Upload-ready zip |
| storify theme upload | POST to /api/uploaded-themes |
| storify theme new <name> | Create theme from Srab starter (git clone) |
Aliases: storify theme check, storify theme zip.
storify theme dev
Starts Vite, registers dev theme link on the platform, prints preview URLs.
storify theme dev
storify theme dev --local # force localhost (no tunnel)
storify theme dev --production # production API + storefront + cloudflared
storify theme dev --remote # production storefront + cloudflared
storify theme dev --no-link-store # Vite only
storify theme dev --open-storefront
storify theme dev --port 3000Production workflow (recommended — stable upload sync):
storify login --production
cd themes/srab
npm run syncAfter upload, a menu lets you Push update, Open storefront, or go Back to main menu.
Dev tunnel preview (hot reload, less stable):
npm run dev:prodStartup order (dev): Vite starts first → dev-link PATCH → preview URLs printed.
storify theme sync
Uploads theme zip, saves linked ID in .storify/theme-link.json, activates on store, then loops on update-dist.
storify theme sync --production
storify theme sync --production --once
storify theme sync --production --theme-id th_xxxxx
storify theme sync --production --newupdate-dist keeps admin layout/settings — only dist + manifest change.
storify theme new
Scaffolds a new theme from the official Srab starter.
storify theme new my-store-theme
storify theme new my-store-theme --dir ~/projects
storify theme new my-store-theme --from https://github.com/yakotdev/srab.git --branch mainSource resolution:
--from <gitUrl>when provided- Else local
themes/srabwhen run inside the Storify monorepo - Else shallow
git cloneofhttps://github.com/yakotdev/srab.git(main)
The command removes the starter .git history and any existing .storify/theme-link.json, renames the theme in theme-manifest.json / package.json, then runs npm install.
Recommended workflow
storify login --production
cd themes/srab
storify theme sync --production # develop → push updates with U
storify theme validate
storify theme pack
storify theme upload --production # one-off upload without sync loop