simplified-shopify-cli 0.1.0 → 0.1.1

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 CHANGED
@@ -1,271 +1,162 @@
1
1
  # Simplified Shopify CLI
2
2
 
3
- Short Shopify theme commands with store aliases you configure in a JSON dotfile.
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.
6
4
 
7
- This is the **0.1.0 release**, licensed under MIT, with no runtime
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
- Install from npm using the instructions below. See [release notes and verification](docs/RELEASING.md).
7
+ ## 1. Install
11
8
 
12
- ## Install
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
- To install from a source checkout instead, run `npm install -g .` from the project directory.
15
+ Works on macOS, Linux, and Windows. No extra setup for macOS/zsh.
29
16
 
30
- Or try it without a global installation:
17
+ **PowerShell:** use `npm.cmd` and commands such as `si.cmd` and `sp.cmd`,
18
+ or enable [short commands](#shell-setup).
31
19
 
32
- ```sh
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
- sshop init --global
43
- sshop stores add demo example-store --global
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
- Store values accept Shopify store prefixes, full `myshopify.com` domains, or
67
- their HTTPS URLs. Custom storefront domains are not accepted. Config is data;
68
- it cannot contain shell commands. Keep authentication tokens in Shopify's normal
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
- Writes always target the current directory, or the personal file with `--global`,
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
- Add `.sshop.json` to each theme project's `.gitignore` if it contains personal
92
- store mappings. This package excludes local configuration and legacy source
93
- from its distributable archive.
33
+ ## 3. Start working
94
34
 
95
- ## Shopify command cheat sheet
35
+ Open your theme project folder in a terminal, then select your store:
96
36
 
97
- ### Rules
98
-
99
- - Run theme commands from your theme project folder.
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
- - `-g` = `--global` for `sinit`, `sstores add/remove`, and `simport`.
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
- ### Important
43
+ ```sh
44
+ sl
45
+ sd "My Theme"
46
+ ```
112
47
 
113
- - A configured `defaultStore` overrides the remembered Shopify store. `si` does not change `defaultStore`; clear it or set it to the intended store.
114
- - The selected store is not permanently bound to your project.
115
- - `si --dry-run` does not select a store.
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
- This follows Shopify's [connecting-to-a-store behavior](https://shopify.dev/docs/storefronts/themes/tools/cli#connecting-to-a-store).
52
+ ## Command cheat sheet
119
53
 
120
- ### Commands
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 the current Shopify store and show theme information; omit `<store_abr>` in later theme commands |
125
- | `sl` | List all themes |
126
- | `sd "Theme Name"` or `sd Theme_Name` | Start development on a named theme with editor sync |
127
- | `sd` | Start development using a Shopify development theme |
128
- | `sp "Theme Name"` or `sp theme_name` | Pull a named theme; preserve unmatched local files |
129
- | `sp` | Pull the live theme; preserve unmatched local files |
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 only template/config JSON from a named theme |
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
- | `sc` | Check theme code for issues |
135
- | `sf` | Automatically fix supported theme issues |
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
- ### Store aliases and setup
75
+ ### Options
139
76
 
140
- | Command | What it does |
141
- | --- | --- |
142
- | `sstores` | List available store aliases |
143
- | `sstores add <store_abr> example-store -g` | Add/update a personal store alias |
144
- | `sstores remove <store_abr> -g` | Remove a personal store alias |
145
- | `sconfig` | Show effective settings and config locations |
146
- | `sinit` | Create a project-specific config |
147
- | `sinit -g` | Create a personal config; refuses to overwrite |
148
- | `simport ./base_custom_cli.sh -g` | Import aliases from the original file |
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
- ## Shell setup
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
- ### macOS / Bash / Zsh
91
+ ## Manage your stores
194
92
 
195
- No shell setup is needed for the installed executable commands. If you still load
196
- old aliases/functions from `base_custom_cli.sh`, they take precedence over
197
- executables. Remove the old Shopify definitions, or load the compatibility
198
- functions after the old file using `eval "$(sshop shell)"` in your shell profile.
199
- Restart the shell. General helpers in the original file are unaffected.
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
- ### Windows Command Prompt and PowerShell
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
- Install with `npm.cmd install -g simplified-shopify-cli`. Command Prompt can use `sd`, `sp`, etc.
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
- ```powershell
208
- sinit.cmd --global
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
- For exactly `sd`, `sp`, `sl`, etc. in PowerShell, add this one-time setup to your
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
- It replaces matching PowerShell aliases with functions forwarding to the installed
221
- `.cmd` commands. This includes `sp`, `sl`, and `si`; their normal PowerShell
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
- Personal config on Windows is `%USERPROFILE%\.sshop.json`. Shopify CLI must be
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
- **Verification:** the [initial CI run](https://github.com/deanschulz4/Shopify-CLI-Simplified/actions/runs/34994515508)
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
- ## Migrate the original file
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 import ./base_custom_cli.sh --global
131
+ eval "$(sshop shell)"
239
132
  ```
240
133
 
241
- Import reads literal entries from `map_store()` without sourcing the shell file.
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
- The original file stays unchanged as a local reference. General terminal,
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
- ## Development and verification
138
+ ## Configuration
255
139
 
256
- ```sh
257
- npm run release:check
258
- npm pack
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
- Tests cover config resolution, migration, argument handling, shell forwarding,
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
- Shopify command behavior follows the official [theme pull](https://shopify.dev/docs/api/shopify-cli/theme/theme-pull)
268
- and [theme dev](https://shopify.dev/docs/api/shopify-cli/theme/theme-dev) documentation.
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 the optional shell startup line and restart your shell. Config files stay
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). The copyright attribution is public; personal store configuration is excluded from the npm package.
169
+ [MIT License](LICENSE)
package/docs/RELEASING.md CHANGED
@@ -1,3 +1,9 @@
1
+ # Release 0.1.1
2
+
3
+ Documentation update: simpler setup instructions, shorter command descriptions,
4
+ and a downloadable one-page PDF cheat sheet linked from the README.
5
+ CLI behavior is unchanged. The PDF is hosted in the GitHub repository.
6
+
1
7
  # Release 0.1.0
2
8
 
3
9
  Initial release: configurable store aliases, personal/project JSON configuration,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simplified-shopify-cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Configurable store aliases and shortcuts for Shopify theme development",
5
5
  "type": "module",
6
6
  "license": "MIT",