Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Release `@spree/cli` and `create-spree-app` (#14151)
Damian Legawiecf8685961bf75
diff --git a/README.md b/README.mdindex ff590a34dc..59e90aabb2 100755--- a/README.md+++ b/README.md@@ -46,6 +46,14 @@ Or deploy directly to the cloud:> **Note**> This uses Render's free plan for quick evaluation. Free instances spin down after inactivity and may take 30-60s to wake up. For production, see [recommended sizing](https://spreecommerce.org/docs/developer/deployment/render#production-sizing).+Building with an AI coding agent? Install the [Spree agent skills](https://github.com/spree/agent-skills) — they teach Claude Code, Cursor, Copilot, and 60+ other tools Spree's conventions, customization patterns, and upgrade flows:++```bash+npx skills add spree/agent-skills+```++Then connect the [docs MCP server](https://spreecommerce.org/docs/developer/agentic/mcp) and let your agent build with you. Learn more in the [Agentic Development docs](https://spreecommerce.org/docs/developer/agentic/overview).+If you prefer to install Spree manually, you may follow the [Quickstart Guide](https://spreecommerce.org/docs/developer/getting-started/quickstart).If you like what you see, consider giving Spree a GitHub star ⭐@@ -67,7 +75,7 @@ Everything below ships in this repository under the BSD 3-Clause license.* **[MeiliSearch Integration](https://spreecommerce.org/docs/integrations/search/meilisearch)** — typo-tolerant product search and faceted filtering.* **Admin Dashboard** — built with [Tailwind CSS](https://spreecommerce.org/docs/developer/admin/custom-css), [Tables DSL](https://spreecommerce.org/docs/developer/admin/tables), and [role-based permissions](https://spreecommerce.org/docs/developer/customization/permissions).* **Integrations & Extensibility** — [Event Bus](https://spreecommerce.org/docs/developer/core-concepts/events), [Webhooks 2.0](https://spreecommerce.org/docs/developer/core-concepts/webhooks), native integrations ([GA4](https://spreecommerce.org/docs/integrations/analytics/google-analytics), [GTM](https://spreecommerce.org/docs/integrations/analytics/google-tag-manager), [Klaviyo](https://spreecommerce.org/docs/integrations/marketing/klaviyo)).-* **AI-Ready Development** — AGENTS.md and bundled offline docs ship with every scaffolded project.+* **[Agentic Development](https://spreecommerce.org/docs/developer/agentic/overview)** — [25 agent skills](https://github.com/spree/agent-skills) (`npx skills add spree/agent-skills`) teaching AI coding agents Spree's conventions, a [docs MCP server](https://spreecommerce.org/docs/developer/agentic/mcp), [LLM-ready documentation](https://spreecommerce.org/docs/developer/agentic/llm-docs) (llms.txt, per-page Markdown, offline npm package), and a generated AGENTS.md/CLAUDE.md in every scaffolded project.## Screenshotsdiff --git a/docs/developer/agentic/mcp.mdx b/docs/developer/agentic/mcp.mdxindex 159d3978ab..6dbdc1b1ff 100644--- a/docs/developer/agentic/mcp.mdx+++ b/docs/developer/agentic/mcp.mdx@@ -70,5 +70,5 @@ The server exposes two tools: full-text **search** across the documentation, and| **[Agent skills](/developer/agentic/agent-skills)** | Conventions and how-to knowledge the agent should apply without searching at all |<Note>- In create-spree-app projects the generated `CLAUDE.md` already points agents at the local `@spree/docs` package first — MCP complements it for anything newer than your installed docs version.+ In create-spree-app projects the generated `AGENTS.md` and `CLAUDE.md` already points agents at the local `@spree/docs` package first — MCP complements it for anything newer than your installed docs version.</Note>diff --git a/docs/developer/agentic/overview.mdx b/docs/developer/agentic/overview.mdxindex 924fdb4e53..fce328fcbd 100644--- a/docs/developer/agentic/overview.mdx+++ b/docs/developer/agentic/overview.mdx@@ -8,9 +8,10 @@ Spree ships first-class tooling for AI-assisted development. Whether you use Cla## Why Spree works well with AI agents-- **Strong conventions** — everything is namespaced under `Spree::`, models follow predictable patterns (prefixed IDs, `Spree.base_class`, service objects, events), and the v3 REST API uses flat request/response shapes. Conventions are what agents are best at following.+- **Strong conventions** — everything is namespaced under `Spree`, models follow predictable patterns (prefixed IDs, `Spree.base_class`, service objects, events), and the v3 REST API uses simple response/request shapes. Conventions are what agents are best at following.+- **Fully Typed APIs** — both Store API and Admin API have OpenAPI specs and official TypeScript SDKs, so agents can generate code with confidence instead of guessing from training data.- **Docs designed for machine consumption** — the full documentation is available as [llms.txt, per-page Markdown, and a local npm package](/developer/agentic/llm-docs), so agents read authoritative content instead of guessing from training data.-- **A guided project workflow** — [create-spree-app](/developer/create-spree-app/quickstart) scaffolds projects with a generated `CLAUDE.md`, local docs, and the [Spree CLI](/developer/cli/quickstart), so an agent can boot, migrate, generate code, and run tests without bespoke setup.+- **A guided project workflow** — [create-spree-app](/developer/create-spree-app/quickstart) scaffolds projects with a generated `AGENTS.md` and `CLAUDE.md`, local docs, and the [Spree CLI](/developer/cli/quickstart), so an agent can boot, migrate, generate code, and run tests without bespoke setup.## The toolboxdiff --git a/packages/cli/.changeset/cli-dev-foreground-and-resilience.md b/packages/cli/.changeset/cli-dev-foreground-and-resilience.mddeleted file mode 100644index 9f47b36e2e..0000000000--- a/packages/cli/.changeset/cli-dev-foreground-and-resilience.md+++ /dev/null@@ -1,15 +0,0 @@-----"@spree/cli": minor------`spree dev` now runs the app in the foreground like every other dev server (`vite dev`, `bin/dev`): it streams web + worker logs and `Ctrl+C` stops them, while the database containers keep running for a fast next boot — `spree stop` remains the full shutdown. Previously `Ctrl+C` only detached from the logs and left everything running. Real compose failures (daemon down, port conflict, bad config) now exit with the underlying code instead of printing a clean shutdown message; a `Ctrl+C` stop still ends cleanly.--Add `spree restart` — restarts `web` + `worker` in place (same image, same volumes, fresh Rails process). For `config/initializers` changes and anything Zeitwerk doesn't reload; it does not pick up Gemfile or compose changes.--`spree bundle` now works when the stack is down: if the `web` container isn't running — for example after a `Gemfile.lock` change crash-loops the boot, which is exactly when bundler is needed — it runs bundler in a one-off container against the same `bundle_cache` volume instead of failing on `exec`.--`spree dev` and `spree build` detect monorepo edge projects (`SPREE_PATH` in `.env`) and refuse with a pointer to the matching `pnpm server:*` script, instead of materializing the wrong compose config against the running edge stack.--`spree migrate` prints a header for each step and a completion note — previously a fully up-to-date run produced no output at all, leaving no signal that anything ran.--`spree upgrade`'s closing "Next steps" panel now includes the SDK side of the upgrade: when the project has the conventional `apps/storefront` consuming `@spree/sdk`, it names the currently-declared version and reminds you to bump it to the release matching the new Spree version.diff --git a/packages/cli/.changeset/cli-hot-path-wrappers.md b/packages/cli/.changeset/cli-hot-path-wrappers.mddeleted file mode 100644index 9b751a8153..0000000000--- a/packages/cli/.changeset/cli-hot-path-wrappers.md+++ /dev/null@@ -1,7 +0,0 @@-----"@spree/cli": minor------Add `spree generate`, `spree migrate` (+ `migrate:rollback`, `migrate:status`), `spree build`, `spree db:reset`, `spree db:console`, and `spree routes`. `spree generate` auto-prefixes `spree:` so `spree generate model Brand name:string` invokes the Spree generator. `spree db:reset` and `spree build --reset-bundle` are destructive and prompt by default; pass `--yes` to skip the prompt in CI. `spree build` targets the active `docker-compose.yml` (the same file `spree dev` runs) and refuses with a pointer to `spree eject` when it has no `build:` section; in monorepo edge projects it points at `pnpm server:build`.--`spree eject` no longer runs a separate `docker compose build` step (the dev compose builds on first `up -d` automatically). Its description and post-eject hints now point at `spree bundle add` for gems and `spree build` for Dockerfile / `.ruby-version` changes.diff --git a/packages/cli/.changeset/cli-passthrough-commands.md b/packages/cli/.changeset/cli-passthrough-commands.mddeleted file mode 100644index 970a84e4b6..0000000000--- a/packages/cli/.changeset/cli-passthrough-commands.md+++ /dev/null@@ -1,5 +0,0 @@-----"@spree/cli": minor------Add `spree exec`, `spree rails`, `spree bundle`, `spree rake`, and `spree task` as generic passthrough commands so any Rails / bundler / rake invocation is reachable through `spree` without `docker compose exec` incantations. `spree task <name>` auto-prefixes `spree:` to save the namespace prefix on the common path. `spree console` is rewired onto the same helper.diff --git a/packages/cli/.changeset/cli-upgrade-command.md b/packages/cli/.changeset/cli-upgrade-command.mddeleted file mode 100644index 969dd6979a..0000000000--- a/packages/cli/.changeset/cli-upgrade-command.md+++ /dev/null@@ -1,5 +0,0 @@-----"@spree/cli": minor------Add `spree upgrade` — sequencer around the dev upgrade flow. Runs `bundle update`, applies pending migrations, then delegates to `bin/rake spree:upgrade` (which executes the version-specific data backfills from a manifest shipped inside `spree_core`). On production, only the rake task runs — your deploy pipeline handles `bundle install` and `db:migrate`. Flags `--plan`, `--step <id>`, `--to <version>`, `--yes` map to env vars (`DRY_RUN`, `STEP`, `TO`) on the rake task so the same arguments work on both surfaces.diff --git a/packages/cli/.changeset/reindex-on-init.md b/packages/cli/.changeset/reindex-on-init.mddeleted file mode 100644index f76e514948..0000000000--- a/packages/cli/.changeset/reindex-on-init.md+++ /dev/null@@ -1,5 +0,0 @@-----"@spree/cli": patch------Run `spree:search:reindex` during `spree init` after sample data is loaded. This initializes the Meilisearch search index so product search works immediately after setup.diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.mdindex 375ddb4332..fef87963fd 100644--- a/packages/cli/CHANGELOG.md+++ b/packages/cli/CHANGELOG.md@@ -1,5 +1,33 @@# @spree/cli+## 2.1.0++### Minor Changes++- `spree dev` now runs the app in the foreground like every other dev server (`vite dev`, `bin/dev`): it streams web + worker logs and `Ctrl+C` stops them, while the database containers keep running for a fast next boot — `spree stop` remains the full shutdown. Previously `Ctrl+C` only detached from the logs and left everything running. Real compose failures (daemon down, port conflict, bad config) now exit with the underlying code instead of printing a clean shutdown message; a `Ctrl+C` stop still ends cleanly.++ Add `spree restart` — restarts `web` + `worker` in place (same image, same volumes, fresh Rails process). For `config/initializers` changes and anything Zeitwerk doesn't reload; it does not pick up Gemfile or compose changes.++ `spree bundle` now works when the stack is down: if the `web` container isn't running — for example after a `Gemfile.lock` change crash-loops the boot, which is exactly when bundler is needed — it runs bundler in a one-off container against the same `bundle_cache` volume instead of failing on `exec`.++ `spree dev` and `spree build` detect monorepo edge projects (`SPREE_PATH` in `.env`) and refuse with a pointer to the matching `pnpm server:*` script, instead of materializing the wrong compose config against the running edge stack.++ `spree migrate` prints a header for each step and a completion note — previously a fully up-to-date run produced no output at all, leaving no signal that anything ran.++ `spree upgrade`'s closing "Next steps" panel now includes the SDK side of the upgrade: when the project has the conventional `apps/storefront` consuming `@spree/sdk`, it names the currently-declared version and reminds you to bump it to the release matching the new Spree version.++- Add `spree generate`, `spree migrate` (+ `migrate:rollback`, `migrate:status`), `spree build`, `spree db:reset`, `spree db:console`, and `spree routes`. `spree generate` auto-prefixes `spree:` so `spree generate model Brand name:string` invokes the Spree generator. `spree db:reset` and `spree build --reset-bundle` are destructive and prompt by default; pass `--yes` to skip the prompt in CI. `spree build` targets the active `docker-compose.yml` (the same file `spree dev` runs) and refuses with a pointer to `spree eject` when it has no `build:` section; in monorepo edge projects it points at `pnpm server:build`.++ `spree eject` no longer runs a separate `docker compose build` step (the dev compose builds on first `up -d` automatically). Its description and post-eject hints now point at `spree bundle add` for gems and `spree build` for Dockerfile / `.ruby-version` changes.++- Add `spree exec`, `spree rails`, `spree bundle`, `spree rake`, and `spree task` as generic passthrough commands so any Rails / bundler / rake invocation is reachable through `spree` without `docker compose exec` incantations. `spree task <name>` auto-prefixes `spree:` to save the namespace prefix on the common path. `spree console` is rewired onto the same helper.++- Add `spree upgrade` — sequencer around the dev upgrade flow. Runs `bundle update`, applies pending migrations, then delegates to `bin/rake spree:upgrade` (which executes the version-specific data backfills from a manifest shipped inside `spree_core`). On production, only the rake task runs — your deploy pipeline handles `bundle install` and `db:migrate`. Flags `--plan`, `--step <id>`, `--to <version>`, `--yes` map to env vars (`DRY_RUN`, `STEP`, `TO`) on the rake task so the same arguments work on both surfaces.++### Patch Changes++- Run `spree:search:reindex` during `spree init` after sample data is loaded. This initializes the Meilisearch search index so product search works immediately after setup.+## 2.0.0### Major Releasediff --git a/packages/cli/package.json b/packages/cli/package.jsonindex ee31e62309..7c0a7def9e 100644--- a/packages/cli/package.json+++ b/packages/cli/package.json@@ -1,6 +1,6 @@{"name": "@spree/cli",- "version": "2.0.0",+ "version": "2.1.0","description": "CLI for managing Spree Commerce projects","type": "module","bin": {diff --git a/packages/create-spree-app/CHANGELOG.md b/packages/create-spree-app/CHANGELOG.mdindex 8aac407688..3e33766f3b 100644--- a/packages/create-spree-app/CHANGELOG.md+++ b/packages/create-spree-app/CHANGELOG.md@@ -1,5 +1,11 @@# create-spree-app+## 1.0.2++### Patch Changes++- Scaffolded projects now reference the Spree agent skills (`npx skills add spree/agent-skills`) in the generated AGENTS.md/CLAUDE.md and post-create next steps, and the generated README documents the new `spree dev` foreground behavior (streams logs, Ctrl+C stops the app).+## 1.0.1### Patch Changesdiff --git a/packages/create-spree-app/package.json b/packages/create-spree-app/package.jsonindex 7ad471bcb7..27d444faa3 100644--- a/packages/create-spree-app/package.json+++ b/packages/create-spree-app/package.json@@ -1,6 +1,6 @@{"name": "create-spree-app",- "version": "1.0.1",+ "version": "1.0.2","description": "Create a new Spree Commerce project with a single command","type": "module","bin": "./dist/index.js",