@blueprintitai/shop-os-install 0.5.15

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 ADDED
@@ -0,0 +1,156 @@
1
+ # @blueprintitai/shop-os-install
2
+
3
+ One-command installer for **Shop OS**: Blueprint IT's AI Operating System for small businesses.
4
+
5
+ ## Setup scripts (run on the onboarding call)
6
+
7
+ Run **one** of these on the customer's machine. Everything installs automatically:
8
+
9
+ **Mac** (in Terminal):
10
+ ```sh
11
+ curl -fsSL https://raw.githubusercontent.com/blueprintit-ai/shop-os-installer/main/scripts/setup-macos.sh -o setup.sh
12
+ chmod +x setup.sh
13
+ ./setup.sh
14
+ ```
15
+
16
+ **Windows** (in PowerShell as Administrator):
17
+ ```powershell
18
+ irm https://raw.githubusercontent.com/blueprintit-ai/shop-os-installer/main/scripts/setup-windows.ps1 -o setup.ps1
19
+ Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
20
+ .\setup.ps1
21
+ ```
22
+
23
+ This installs Node.js, Claude Code, Obsidian, and Shop OS in one go. You'll be prompted for your license key and vault location.
24
+
25
+ ---
26
+
27
+ ## Manual Install
28
+
29
+ If you prefer to install prerequisites yourself, run:
30
+
31
+ ```sh
32
+ npx @blueprintitai/shop-os-install
33
+ ```
34
+
35
+ The installer (run directly or via the setup scripts above):
36
+
37
+ 1. **Pre-flight**: verifies Node 18+ and Claude Code is installed
38
+ 2. **License validation**: prompts for the license key, validates against `https://shop-os-license-server.glenn-15d.workers.dev/validate`
39
+ 3. **Marketplaces**: registers `blueprintit-ai/blueprint-skills` and `anthropics/claude-plugins-official` in `~/.claude/plugins/known_marketplaces.json`
40
+ 4. **Plugins**: queues `obsidian@blueprint-skills` and `superpowers@claude-plugins-official` in `~/.claude/plugins/installed_plugins.json` (Claude Code does the actual fetch on next launch)
41
+ 5. **Vault**: creates a Shop OS vault folder (default `~/Shop OS Vault`) with a starter `CLAUDE.md`
42
+ 6. **Per-vault config**: writes `<vault>/.claude/settings.json` with `enabledPlugins` set for obsidian + superpowers
43
+ 7. **License record**: saves `~/.shopos/license.json` (chmod 600) for downstream skill validation
44
+ 8. **Next steps**: prints `cd` command and the `/bp-setup` slash command to run
45
+
46
+ Zero npm dependencies. Uses only Node 18+ built-ins (`fetch`, `readline`, `fs`).
47
+
48
+ ## How customers get installed
49
+
50
+ Shop OS Foundation is set up **with** the customer on a one-hour screen-share
51
+ (30 min setup + 30 min training), booked from the welcome email. The welcome
52
+ email deliberately contains **no install commands**: Blueprint IT runs the
53
+ setup script above on the call and enters the license key. See
54
+ `welcome-email-template.md` (source of truth:
55
+ `Projects/shop-os-license-server/src/email/welcome-template.ts`).
56
+
57
+ ## Local development
58
+
59
+ ```sh
60
+ # Test the installer against the live license server with a test key
61
+ # (issue one from the admin dashboard first):
62
+ node bin/shop-os-install.js
63
+ ```
64
+
65
+ The script reads from stdin so you can also drive it via heredoc for testing:
66
+
67
+ ```sh
68
+ printf 'SHOP-XXXX-YYYY-ZZZZ\n/tmp/test-vault\ny\n' | node bin/shop-os-install.js
69
+ ```
70
+
71
+ ## Publishing to npm
72
+
73
+ The package is scoped under `@blueprintit`. You need an npm org named `blueprintit` (or change the scope to your personal username).
74
+
75
+ ```sh
76
+ # One-time: create the @blueprintit npm org if it doesn't exist
77
+ # - go to https://www.npmjs.com/org/create
78
+ # - choose Free plan (limited to public packages, fine for an installer)
79
+
80
+ # One-time: log in to npm
81
+ npm login
82
+
83
+ # Publish
84
+ cd "Projects/shop-os-installer"
85
+ npm publish --access public
86
+ ```
87
+
88
+ After publish, the install command works for any customer worldwide:
89
+
90
+ ```sh
91
+ npx @blueprintitai/shop-os-install
92
+ ```
93
+
94
+ `npx` always fetches the latest published version, so customers get bug fixes automatically.
95
+
96
+ ## Versioning
97
+
98
+ Bump `version` in `package.json` before each publish:
99
+
100
+ - Patch (`0.1.0` → `0.1.1`): bug fixes
101
+ - Minor (`0.1.0` → `0.2.0`): new install steps or behavior changes
102
+ - Major (`0.1.0` → `1.0.0`): breaking changes (e.g. license server URL change)
103
+
104
+ Then:
105
+
106
+ ```sh
107
+ npm publish --access public
108
+ ```
109
+
110
+ ## Files
111
+
112
+ ```
113
+ shop-os-installer/
114
+ ├── package.json
115
+ ├── README.md (this file)
116
+ ├── .gitignore
117
+ └── bin/
118
+ └── shop-os-install.js (~380 lines, single-file installer)
119
+ ```
120
+
121
+ ## Architecture notes
122
+
123
+ ### Why no dependencies
124
+
125
+ Every transitive dependency in `npx` is fetched fresh each run. Heavy deps make the install feel slow. Node 18+ ships `fetch`, `readline/promises`, and `fs/promises`, which is everything we need. The whole installer downloads in well under a second.
126
+
127
+ ### Why we write to Claude Code config files directly
128
+
129
+ The alternative was to spawn `claude plugin marketplace add ...` and `claude plugin install ...` subprocesses. We chose direct file writes because:
130
+
131
+ - The config file formats are well-known and stable
132
+ - Direct writes are atomic and deterministic
133
+ - We don't have to depend on the `claude` CLI being on the customer's PATH
134
+ - The customer's next Claude Code session will sync the marketplaces and fetch the actual plugin files, the same as if they'd run the commands
135
+
136
+ If a customer's `claude` CLI is broken (PATH issues, version mismatch), our installer still works. We just stage the right config and let Claude Code finish the job.
137
+
138
+ ### What we never touch
139
+
140
+ We never modify:
141
+
142
+ - The customer's existing `enabledPlugins` for other projects (we only write per-vault settings)
143
+ - Other entries in `installed_plugins.json` (we merge, never replace)
144
+ - Other entries in `known_marketplaces.json` (we merge, never replace)
145
+ - Anthropic API keys, Claude Code auth, or any subscription/billing config
146
+
147
+ ## Future enhancements (post-MVP)
148
+
149
+ | Feature | Why |
150
+ |---|---|
151
+ | `--vault <path>` flag | Skip the prompt for scripted installs |
152
+ | `--license <key>` flag | Same, for testing or scripted reinstalls |
153
+ | Update detection | Tell the customer if a newer Shop OS version is available |
154
+ | Telemetry opt-in | Phone home install success/failure counts (anonymous) for product analytics |
155
+ | Uninstall command | `npx @blueprintit/shop-os-uninstall` |
156
+ | Multi-vault mode | Add Shop OS to an existing vault rather than creating a new one |