@spree/docs 0.1.94 → 0.1.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -73,6 +73,26 @@ Upon successful authentication, you should see the admin screen:
|
|
|
73
73
|
|
|
74
74
|
<img src="/images/spree_admin_dashboard.png" />
|
|
75
75
|
|
|
76
|
+
## Using the Spree CLI
|
|
77
|
+
|
|
78
|
+
Projects scaffolded with `create-spree-app` include [`@spree/cli`](../cli/quickstart.md) for managing the backend and calling the Admin API. Because it's a project dependency, run it with `npx` (or any package-manager script):
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
npx spree dev # boot the Docker stack
|
|
82
|
+
npx spree api get products # query the Admin API (read-only key preconfigured)
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Project setup mints a read-only Admin API key into `.spree/credentials.json` (and `spree api` mints it on first use if you skipped setup), so `spree api` works without any extra configuration.
|
|
86
|
+
|
|
87
|
+
To call `spree` directly without the `npx` prefix, install the CLI globally:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
npm install -g @spree/cli
|
|
91
|
+
spree api get products
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
See the [Spree CLI guide](../cli/quickstart.md) for all commands and the [Admin API from the CLI](../cli/admin-api.md) for querying your store's data.
|
|
95
|
+
|
|
76
96
|
## Next Steps
|
|
77
97
|
|
|
78
98
|
|