simplified-shopify-cli 0.1.0 → 0.1.2
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.
- package/README.md +105 -217
- package/docs/RELEASING.md +10 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,271 +1,162 @@
|
|
|
1
1
|
# Simplified Shopify CLI
|
|
2
2
|
|
|
3
|
-
Short Shopify
|
|
4
|
-
Installing the package provides **`sd`, `sp`, `sl`, `si`, `spl`, `spa`, `sc`, `sf`,
|
|
5
|
-
and `lo` directly**. The `sshop` command remains available for compatibility.
|
|
3
|
+
Short commands for Shopify themes: `sd` to develop, `sp` to pull, and `sl` to list themes. The customizable store abreviations mapping lets you assign short aliases to your Shopify stores for even quicker switching and command usage.
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
dependencies. Source: [deanschulz4/Shopify-CLI-Simplified](https://github.com/deanschulz4/Shopify-CLI-Simplified).
|
|
5
|
+
[Download the one-page cheat sheet (PDF)](https://github.com/deanschulz4/Shopify-CLI-Simplified/raw/refs/heads/main/output/pdf/shopify-command-cheat-sheet.pdf)
|
|
9
6
|
|
|
10
|
-
|
|
7
|
+
## 1. Install
|
|
11
8
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
Requires Node.js 22.12+ and Shopify CLI on your PATH. Authentication remains
|
|
15
|
-
managed by Shopify CLI. Install Shopify CLI if you do not already have it:
|
|
16
|
-
|
|
17
|
-
```sh
|
|
18
|
-
npm install -g @shopify/cli
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
Install the published package (including zsh on macOS):
|
|
9
|
+
Install **Node.js 22.12 or newer**, then run:
|
|
22
10
|
|
|
23
11
|
```sh
|
|
24
|
-
npm install -g simplified-shopify-cli
|
|
25
|
-
shelp
|
|
12
|
+
npm install -g @shopify/cli simplified-shopify-cli
|
|
26
13
|
```
|
|
27
14
|
|
|
28
|
-
|
|
15
|
+
Works on macOS, Linux, and Windows. No extra setup for macOS/zsh.
|
|
29
16
|
|
|
30
|
-
|
|
17
|
+
**PowerShell:** use `npm.cmd` and commands such as `si.cmd` and `sp.cmd`,
|
|
18
|
+
or enable [short commands](#shell-setup).
|
|
31
19
|
|
|
32
|
-
|
|
33
|
-
node bin/sshop.js --help
|
|
34
|
-
node bin/sshop.js --config examples/sshop.example.json sd demo "My Theme" --dry-run
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## Configure your stores
|
|
38
|
-
|
|
39
|
-
Create a personal config usable from any project:
|
|
20
|
+
## 2. Add your store
|
|
40
21
|
|
|
41
22
|
```sh
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
sshop stores add sandbox example-sandbox.myshopify.com --global
|
|
45
|
-
sshop stores
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
This creates `~/.sshop.json`. For project-specific configuration, run the same
|
|
49
|
-
commands without `--global` from the project root. Example:
|
|
50
|
-
|
|
51
|
-
```json
|
|
52
|
-
{
|
|
53
|
-
"version": 1,
|
|
54
|
-
"stores": {
|
|
55
|
-
"demo": "example-store.myshopify.com",
|
|
56
|
-
"sandbox": "example-sandbox.myshopify.com"
|
|
57
|
-
},
|
|
58
|
-
"defaultStore": "sandbox",
|
|
59
|
-
"defaults": {
|
|
60
|
-
"nodelete": true,
|
|
61
|
-
"themeEditorSync": true
|
|
62
|
-
}
|
|
63
|
-
}
|
|
23
|
+
sinit -g
|
|
24
|
+
sstores add demo example-store -g
|
|
64
25
|
```
|
|
65
26
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
authentication flow or environment variables, outside this file.
|
|
70
|
-
|
|
71
|
-
### Config precedence
|
|
72
|
-
|
|
73
|
-
1. Built-in defaults: preserve unmatched local files during pull; enable Theme Editor sync during dev.
|
|
74
|
-
2. Personal `~/.sshop.json`.
|
|
75
|
-
3. The nearest `.sshop.json`, searching upward from your current directory.
|
|
76
|
-
|
|
77
|
-
Project aliases override personal aliases with the same name. Other aliases
|
|
78
|
-
remain available. Set `defaultStore` to `null` to clear an inherited default.
|
|
79
|
-
With no configured default or explicit store, Shopify resolves its own store.
|
|
80
|
-
|
|
81
|
-
`sshop --config /path/to/config.json …` or `SSHOP_CONFIG` selects a single isolated
|
|
82
|
-
config instead of merging. An explicit missing config is an error.
|
|
83
|
-
`sshop config` shows the effective settings and exact source files.
|
|
27
|
+
- `demo`: your chosen store abbreviation.
|
|
28
|
+
- `example-store`: the prefix of your `example-store.myshopify.com` address.
|
|
29
|
+
- Repeat `sstores add` for each store.
|
|
84
30
|
|
|
85
|
-
|
|
86
|
-
or the explicitly selected file. They never silently modify an ancestor's config.
|
|
87
|
-
`init` refuses to overwrite an existing file. `stores add` explicitly replaces
|
|
88
|
-
an existing alias; `stores remove ALIAS` removes it only from the selected file.
|
|
89
|
-
Removing a project override can expose the personal alias again.
|
|
31
|
+
`-g` saves settings for all projects. Skip `sinit -g` if already configured.
|
|
90
32
|
|
|
91
|
-
|
|
92
|
-
store mappings. This package excludes local configuration and legacy source
|
|
93
|
-
from its distributable archive.
|
|
33
|
+
## 3. Start working
|
|
94
34
|
|
|
95
|
-
|
|
35
|
+
Open your theme project folder in a terminal, then select your store:
|
|
96
36
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
- Replace `<store_abr>` with your configured store abbreviation.
|
|
101
|
-
- Select the current store once with `si <store_abr>`. After it succeeds, omit `<store_abr>` in commands such as `sl`, `sd "My Theme"`, `sp -p`, `sp -d`, and `si -j`.
|
|
102
|
-
- Run `si` to check the current store; specify another abbreviation to switch.
|
|
103
|
-
- Store aliases are still required when adding or removing aliases.
|
|
104
|
-
|
|
105
|
-
### Flags
|
|
37
|
+
```sh
|
|
38
|
+
si demo
|
|
39
|
+
```
|
|
106
40
|
|
|
107
|
-
|
|
108
|
-
- `-d` = `--development` for `sp`, `spl`, `spa`, and `si`.
|
|
109
|
-
- Both long and short forms work.
|
|
41
|
+
Log in if prompted. Then omit the store abbreviation:
|
|
110
42
|
|
|
111
|
-
|
|
43
|
+
```sh
|
|
44
|
+
sl
|
|
45
|
+
sd "My Theme"
|
|
46
|
+
```
|
|
112
47
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
- `sinit` creates configuration only.
|
|
48
|
+
Use `si` to check the store or `si another-alias` to switch.
|
|
49
|
+
**Check the store when switching projects.** A configured `defaultStore` overrides
|
|
50
|
+
the remembered store; see [configuration](#configuration).
|
|
117
51
|
|
|
118
|
-
|
|
52
|
+
## Command cheat sheet
|
|
119
53
|
|
|
120
|
-
|
|
54
|
+
Run theme commands from your theme project folder. Put quotes around theme names
|
|
55
|
+
with spaces. `<store_abr>` means the short name you configured, such as `demo`.
|
|
121
56
|
|
|
122
57
|
| Command | What it does |
|
|
123
58
|
| --- | --- |
|
|
124
|
-
| `si <store_abr>` | Select
|
|
125
|
-
| `
|
|
126
|
-
| `
|
|
127
|
-
| `sd` | Start
|
|
128
|
-
| `
|
|
129
|
-
| `sp` | Pull the live theme
|
|
59
|
+
| `si <store_abr>` | Select a store |
|
|
60
|
+
| `si` | Show current store and theme |
|
|
61
|
+
| `sl` | List themes |
|
|
62
|
+
| `sd` | Start a development theme |
|
|
63
|
+
| `sd "My Theme"` | Develop a named theme with editor sync |
|
|
64
|
+
| `sp` | Pull the live theme |
|
|
65
|
+
| `sp "My Theme"` | Pull a named theme |
|
|
130
66
|
| `sp -p` | Pull only live template/config JSON |
|
|
131
|
-
| `spl "My Theme"` | Pull
|
|
132
|
-
| `spa` | Pull the live theme; may delete unmatched local files |
|
|
67
|
+
| `spl "My Theme"` | Pull named theme template/config JSON |
|
|
133
68
|
| `sp -d` | Pull the development theme |
|
|
134
|
-
| `
|
|
135
|
-
| `
|
|
69
|
+
| `spa` | Pull live; may delete unmatched local files |
|
|
70
|
+
| `sc` | Check theme code |
|
|
71
|
+
| `sf` | Fix supported code issues |
|
|
136
72
|
| `lo` | Log out of Shopify |
|
|
73
|
+
| `shelp` | Show help |
|
|
137
74
|
|
|
138
|
-
###
|
|
75
|
+
### Options
|
|
139
76
|
|
|
140
|
-
|
|
|
141
|
-
| --- | --- |
|
|
142
|
-
| `
|
|
143
|
-
| `
|
|
144
|
-
| `
|
|
145
|
-
| `
|
|
146
|
-
| `
|
|
147
|
-
|
|
|
148
|
-
| `
|
|
149
|
-
| `shelp` | Show command help |
|
|
150
|
-
|
|
151
|
-
### Useful options
|
|
152
|
-
|
|
153
|
-
| Example | What it does |
|
|
154
|
-
| --- | --- |
|
|
155
|
-
| `sd "My Theme" --dry-run` | Preview the command without running Shopify |
|
|
156
|
-
| `sd -s <store_abr> -t "My Theme"` | Explicitly select store and theme |
|
|
157
|
-
| `sd -p 9293` | Use a different development port |
|
|
158
|
-
| `sl -j` | Return the theme list as JSON |
|
|
159
|
-
| `sd --config "./custom.json"` | Use a specific configuration file |
|
|
160
|
-
|
|
161
|
-
### Remember
|
|
162
|
-
|
|
163
|
-
- Quotes are required for theme names containing spaces. Use straight quotes (`"`) when copying commands into your terminal.
|
|
164
|
-
- Pull (`sp`) overwrites matching local files. Preserving unmatched files does not prevent existing files from being overwritten.
|
|
165
|
-
- Dev (`sd`) uploads and continuously syncs changes to the selected remote theme.
|
|
166
|
-
- `sd <store_abr> -p 9293` sets the development port; `sp <store_abr> -p` pulls only template/config JSON.
|
|
167
|
-
- `si <store_abr> -j` returns theme information as JSON; `sl <store_abr> -j` returns the theme list as JSON.
|
|
168
|
-
- `sf` modifies local files. Use `--dry-run` to inspect command targeting before running Shopify.
|
|
169
|
-
|
|
170
|
-
### Argument handling and compatibility
|
|
171
|
-
|
|
172
|
-
All commands above work without an `sshop` prefix. The prefixed equivalents
|
|
173
|
-
remain supported, for example `sshop dev`, `sshop pull`, and `sshop sd`.
|
|
174
|
-
|
|
175
|
-
A single positional argument to `sd`/`sp` is a store if it matches a configured
|
|
176
|
-
alias or looks like a URL/domain; otherwise it is a theme. With two positional
|
|
177
|
-
arguments, they mean store and theme. Use `--store` for an unmapped prefix with
|
|
178
|
-
no theme; use `--theme` when a theme name matches an alias.
|
|
179
|
-
|
|
180
|
-
Wrapper flags use separate values (`--store demo`, not `--store=demo`). Additional
|
|
181
|
-
Shopify flags go after `--`. Put targeting flags and `--dry-run` before `--`.
|
|
182
|
-
The original `sd -- --port 9293` and `sl -- --json` forms remain supported;
|
|
183
|
-
`--port` and `--json` also work directly. Nodelete/editor-sync defaults are
|
|
184
|
-
configured in the dotfile.
|
|
185
|
-
|
|
186
|
-
`--dry-run` prints the command without starting Shopify and redacts password
|
|
187
|
-
values. Arguments are forwarded as an array, without `eval` or shell expansion.
|
|
188
|
-
Normal commands inherit Shopify's interactive terminal and exit code.
|
|
189
|
-
Shopify's live-theme protections remain in place.
|
|
77
|
+
| Option | Example | Meaning |
|
|
78
|
+
| --- | --- | --- |
|
|
79
|
+
| `-g` / `--global` | `sinit -g` | Personal config (setup commands) |
|
|
80
|
+
| `-d` / `--development` | `sp -d` | Development theme (`sp`, `spl`, `spa`, `si`) |
|
|
81
|
+
| `-p PORT` / `--port PORT` | `sd -p 9293` | Change the development port |
|
|
82
|
+
| `-p` / `--json-only` | `sp -p` | Pull only template/config JSON |
|
|
83
|
+
| `-j` / `--json` | `sl -j` | JSON output (`sl`, `si`) |
|
|
84
|
+
| `--dry-run` | `sd "My Theme" --dry-run` | Preview without running |
|
|
85
|
+
| `-s` and `-t` | `sd -s demo -t "My Theme"` | Choose store and theme |
|
|
190
86
|
|
|
191
|
-
|
|
87
|
+
**Before running commands:** `sp` overwrites matching local files; `spa` can also
|
|
88
|
+
delete unmatched files. `sd` uploads and continuously syncs changes to the selected
|
|
89
|
+
remote theme. `sf` changes local code. Use `--dry-run` to check your target first.
|
|
192
90
|
|
|
193
|
-
|
|
91
|
+
## Manage your stores
|
|
194
92
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
93
|
+
| Command | What it does |
|
|
94
|
+
| --- | --- |
|
|
95
|
+
| `sstores` | List store aliases |
|
|
96
|
+
| `sstores add <store_abr> example-store -g` | Add or update an alias |
|
|
97
|
+
| `sstores remove <store_abr> -g` | Remove an alias |
|
|
98
|
+
| `sconfig` | Show settings and config locations |
|
|
99
|
+
| `sinit` | Create a project config |
|
|
100
|
+
| `sinit -g` | Create personal config (never overwrites) |
|
|
101
|
+
| `simport ./base_custom_cli.sh -g` | Import legacy store aliases |
|
|
200
102
|
|
|
201
|
-
|
|
103
|
+
`sinit` creates config. `si` selects a store.
|
|
104
|
+
Keep credentials out of `.sshop.json`. Keep personal project configs out of Git.
|
|
202
105
|
|
|
203
|
-
|
|
204
|
-
In PowerShell, use `sd.cmd`, `sp.cmd`, `sl.cmd`, etc. to avoid conflicts with
|
|
205
|
-
built-in aliases and npm PowerShell script execution policy restrictions:
|
|
106
|
+
## Shell setup
|
|
206
107
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
sstores.cmd add demo example-store --global
|
|
210
|
-
sd.cmd demo "My Theme" --dry-run
|
|
211
|
-
```
|
|
108
|
+
<details>
|
|
109
|
+
<summary>Windows PowerShell: use commands without .cmd</summary>
|
|
212
110
|
|
|
213
|
-
|
|
214
|
-
PowerShell profile (provided profile scripts are permitted in your environment):
|
|
111
|
+
If your PowerShell profile allows scripts, add:
|
|
215
112
|
|
|
216
113
|
```powershell
|
|
217
114
|
. ([scriptblock]::Create((sshop.cmd shell powershell | Out-String)))
|
|
218
115
|
```
|
|
219
116
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
meanings will change in that session. Remove the profile line and restart to
|
|
223
|
-
restore the original behavior. No execution-policy changes are made by this package.
|
|
117
|
+
This replaces PowerShell aliases such as `sp`, `sl`, and `si`.
|
|
118
|
+
To undo, remove the line and restart PowerShell.
|
|
224
119
|
|
|
225
|
-
|
|
226
|
-
installed globally with npm. In WSL, install Node and both CLIs inside WSL and
|
|
227
|
-
follow the Bash instructions.
|
|
120
|
+
Command Prompt needs no setup. For WSL, install Node and both CLIs inside WSL.
|
|
228
121
|
|
|
229
|
-
|
|
230
|
-
passed the Node 22/24 matrix on macOS, Linux, and Windows, including installed
|
|
231
|
-
commands, real Shopify CLI help invocation, and Windows PowerShell shortcuts.
|
|
232
|
-
Each subsequent change must pass its own CI run. Live Shopify login/pull/dev
|
|
233
|
-
workflows remain a separate pre-release check.
|
|
122
|
+
</details>
|
|
234
123
|
|
|
235
|
-
|
|
124
|
+
<details>
|
|
125
|
+
<summary>macOS/zsh or Bash: replace older Shopify aliases</summary>
|
|
126
|
+
|
|
127
|
+
If old Shopify aliases override these commands, remove them or add this
|
|
128
|
+
after them in your shell profile:
|
|
236
129
|
|
|
237
130
|
```sh
|
|
238
|
-
sshop
|
|
131
|
+
eval "$(sshop shell)"
|
|
239
132
|
```
|
|
240
133
|
|
|
241
|
-
|
|
242
|
-
Identical duplicate mappings are collapsed; conflicting duplicates or existing
|
|
243
|
-
aliases with different destinations stop the import. Other shell logic is ignored.
|
|
244
|
-
Use a local import first if you want to inspect the result before changing your
|
|
245
|
-
personal config.
|
|
134
|
+
Restart your terminal.
|
|
246
135
|
|
|
247
|
-
|
|
248
|
-
Node/nvm, BigCommerce, and NopCommerce helpers remain there; this first package
|
|
249
|
-
focuses on Shopify. The old `sync` helper remains there too: its hard-coded
|
|
250
|
-
`origin/master` merge and checkout behavior needs a separate configurable design.
|
|
251
|
-
It is not installed by this package. The old `fix` permissions alias and `gitfix`
|
|
252
|
-
are also not exported. `clis` is still the ordinary Shopify installation command.
|
|
136
|
+
</details>
|
|
253
137
|
|
|
254
|
-
##
|
|
138
|
+
## Configuration
|
|
255
139
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
140
|
+
<details>
|
|
141
|
+
<summary>Optional settings</summary>
|
|
142
|
+
|
|
143
|
+
- Personal config: `~/.sshop.json` (macOS/Linux) or `%USERPROFILE%\.sshop.json` (Windows).
|
|
144
|
+
- Project config: `.sshop.json`; overrides personal settings. Omit `-g` to edit it.
|
|
145
|
+
- Run `sconfig` to see your settings.
|
|
146
|
+
|
|
147
|
+
Set `defaultStore` to an alias for a fixed store, or `null` to use the remembered
|
|
148
|
+
store. `si` does not change this setting. [Example config](examples/sshop.example.json).
|
|
260
149
|
|
|
261
|
-
|
|
262
|
-
and subprocess exit codes using a fake Shopify executable. They do not contact
|
|
263
|
-
stores. The CI workflow checks Node 22/24 on macOS, Linux, and Windows and runs
|
|
264
|
-
`npm run release:check` to inspect and install the actual npm archive.
|
|
265
|
-
Native Windows dispatch supports the global npm installation of Shopify CLI.
|
|
150
|
+
Use `sd --config "./custom.json"` to load a specific config file.
|
|
266
151
|
|
|
267
|
-
|
|
268
|
-
|
|
152
|
+
If a theme name matches a store alias, use `-t "Theme Name"`.
|
|
153
|
+
Use `-s STORE` for an unconfigured store prefix.
|
|
154
|
+
|
|
155
|
+
Put extra Shopify options after `--`: `sd -- --verbose`.
|
|
156
|
+
Keep store/theme options and `--dry-run` before `--`.
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
</details>
|
|
269
160
|
|
|
270
161
|
## Uninstall
|
|
271
162
|
|
|
@@ -273,9 +164,6 @@ and [theme dev](https://shopify.dev/docs/api/shopify-cli/theme/theme-dev) docume
|
|
|
273
164
|
npm uninstall -g simplified-shopify-cli
|
|
274
165
|
```
|
|
275
166
|
|
|
276
|
-
Remove
|
|
277
|
-
in place for reuse; remove them yourself when no longer needed.
|
|
278
|
-
|
|
279
|
-
## License
|
|
167
|
+
Remove any optional shell profile line too. Your config files are kept.
|
|
280
168
|
|
|
281
|
-
[MIT](LICENSE)
|
|
169
|
+
[MIT License](LICENSE)
|
package/docs/RELEASING.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
# Release 0.1.2
|
|
2
|
+
|
|
3
|
+
README update
|
|
4
|
+
|
|
5
|
+
# Release 0.1.1
|
|
6
|
+
|
|
7
|
+
Documentation update: simpler setup instructions, shorter command descriptions,
|
|
8
|
+
and a downloadable one-page PDF cheat sheet linked from the README.
|
|
9
|
+
CLI behavior is unchanged. The PDF is hosted in the GitHub repository.
|
|
10
|
+
|
|
1
11
|
# Release 0.1.0
|
|
2
12
|
|
|
3
13
|
Initial release: configurable store aliases, personal/project JSON configuration,
|