> ## Documentation Index
> Fetch the complete documentation index at: https://spreecommerce.org/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Spree 6 (v6.x) is the current version. Pages with /v5/ in their URL document Spree 5: follow them in a project that runs Spree 5, or to see what an upgrade changes.
> Spree 6 differs greatly from Spree 4 and 5: it is fully headless, and older code and tutorials mostly do not apply. Before relying on what you remember about Spree, read https://spreecommerce.org/docs/developer/upgrades/spree-6-vs-older-versions.md
> The current REST APIs are the Store API (store.yaml), the Admin API (admin.yaml) and the Seller API (seller.yaml), all under /api/v3.
> The specs named legacy-v2-*, the Storefront API and Platform API pages and their tutorials document the older API v2, which Spree 5 and earlier serve. Read them to maintain or migrate an API v2 client, and build new work on the current APIs.

# Spree CLI

> Install the @spree/cli to run, build and migrate Spree projects — and call the Admin API directly from the command line.

The Spree CLI (`@spree/cli`) does two things from your terminal:

1. **Manages your Spree project** — boot the Docker stack, run generators and migrations, tail logs, open a console, upgrade versions.
2. **Calls the Admin API** — generic `get`/`post`/`patch`/`delete` commands to read, write, and explore your store's data, with zero-config credentials in local dev. See [Admin API CLI](https://spreecommerce.org/docs/developer/cli/admin-api.md).

```bash theme={"theme":"night-owl"}
spree dev                                                  # boot the project
spree api get /orders -q status_eq=placed --limit 10     # query the Admin API
spree api post /products -d '{"name":"Classic Tee","prices":[{"currency":"USD","amount":"29.99"}]}'  # create a resource
spree api endpoints --search refund                        # discover endpoints, offline
```

The `spree api` commands work against any Spree 5.5+ instance and are built for both humans and AI agents — see the dedicated [Admin API CLI](https://spreecommerce.org/docs/developer/cli/admin-api.md) guide. Every other command is listed in [Commands](https://spreecommerce.org/docs/developer/cli/commands.md).

## Installation

The CLI is included automatically when you scaffold a project with `create-spree-app`. You can also install it globally:

```bash theme={"theme":"night-owl"}
npm install -g @spree/cli
```

Then run commands from your project directory:

```bash theme={"theme":"night-owl"}
spree dev
```

Or use `npx` without installing:

```bash theme={"theme":"night-owl"}
npx @spree/cli dev
```

## Pair with AI agents

The CLI's predictable command surface is what AI coding agents drive when working on Spree projects. The [Spree agent skills](https://spreecommerce.org/docs/developer/agentic/agent-skills.md) teach agents these commands and conventions (install them with `spree add ai`), and the Claude Code plugin adds `/spree:doctor` (stack diagnosis) and `/spree:audit-upgrade` (upgrade-readiness audit) on top. See [Agentic Development](https://spreecommerce.org/docs/developer/agentic/overview.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.