Skip to content
Guides

CLI

Run, build, deploy, and clean an Ecomiq store.

The package installs the ecomiq binary. Run it from the project root, where ecomiq.config.js and pages/ are located.

CommandWhat it does
ecomiq devGenerates the internal app and starts SSR with HMR.
ecomiq buildBuilds for Cloudflare Workers in .ecomiq/dist.
ecomiq deployBuilds again and publishes the Worker with Wrangler.
ecomiq cleanDeletes only the generated .ecomiq directory.

With the recommended scripts:

pnpm dev
pnpm build
pnpm deploy
pnpm clean

You can also invoke the binary directly:

pnpm exec ecomiq dev

Development

ecomiq dev uses Node, port 3000, and HTTP by default. Change those values in ecomiq.config.js, not with flags:

dev: {
  port: 3100,
  runtime: "workerd",
  https: true,
}

The CLI watches pages/ and regenerates routes when files are created, renamed, or deleted. It ignores hidden files, __tests__, and *.test.* or *.spec.* files.

Generated files

.ecomiq/ contains the router, server entry, styles, route manifest, and Wrangler configuration. It is a disposable build artifact.

If it becomes stale after a version change:

pnpm clean
pnpm dev

No scaffolding commands

The current CLI has no init, create, or flags such as --port or --name. Configure the project in ecomiq.config.js.

On this page