Skip to content
Daras
All topics

Developing, validating, and publishing themes with Daras CLI

Theme commands (daras theme ...) delegate to @daras/theme-kit using your active CLI profile; a theme is a directory structure (layout, templates, sections, snippets, locales, assets, theme.json).

Steps

  1. Scaffold a new theme: daras theme init my-theme --name "My Store" --author "Team Name".
  2. Enter the directory and start the local development server: daras theme dev (default port 4477). If you want to work with real store data, add --api <url> --store <id>.
  3. When you save files and refresh the page in your browser, the preview re-renders with the updated files; the page does not auto-reload.
  4. Validate the package before publishing: daras theme validate — reports security, structure, schema, and syntax errors; pass --json for machine-readable output.
  5. Run daras theme css to compile the Tailwind source (assets/tailwind.css → assets/theme.css).
  6. Run daras theme push to upload the package to the store as a draft; this command automatically runs the CSS build and validate first, and aborts the upload if validation fails.
  7. Publish the draft live using the returned package ID: daras theme deploy <packageId>.
  8. If you want to download a published package back to your filesystem, run daras theme pull <packageId> --out <dir>; use --dry-run to preview the diff first, or --force to overwrite locally modified files.

Tips

  • The push/pull/deploy commands use the DARAS_API_URL, DARAS_API_TOKEN, and DARAS_STORE_ID environment variables or your active daras env profile.
  • Run daras theme docs to view the complete theme language reference.
Didn't find the answer?Open a request from the Daras support screen in your store panel.
Open a support request