Back to Spree

@spree/cli

packages/cli/README.md

5.6.02.1 KB
Original Source

@spree/cli

CLI for managing Spree Commerce projects — Docker-based dev stack, generators, API keys, and a gh-style Admin API client.

Automatically included in projects created with create-spree-app. Can also be installed standalone:

bash
npm install -g @spree/cli
spree <command>

Commands

Run from your Spree project directory:

CommandDescription
spree devRun the app in the foreground — streams logs, Ctrl+C stops it. First run completes setup automatically; co-runs the React Dashboard dev server when apps/dashboard exists
spree stopStop backend services
spree updatePull the latest Spree image and restart (runs migrations automatically)
spree ejectSwitch from the prebuilt image to building from backend/
spree add dashboardAdd the React Dashboard (Developer Preview) to an existing project
spree build --productionBuild the production image — the Spree API plus your dashboard, in one
spree console / spree shell / spree logsRails console, container shell, log tailing
spree migrate / spree seed / spree sample-dataDatabase tasks
spree generate …Spree generators (models, API resources, subscribers, migrations)
spree user create / spree api-key …Admin users and scoped API keys
spree api get/post/patch/delete <path>Call the Admin API directly (spree api endpoints lists routes + scopes)
spree rspecRun the backend test suite inside the container

Documentation

The full command reference lives on the docs site — this README intentionally stays short:

License

MIT