slidemind 0.1.1 → 0.1.3
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/CLAUDE.md +1 -1
- package/README.md +229 -64
- package/bin/slidemind.mjs +19 -5
- package/package.json +2 -2
- package/src/bridge/config.mjs +8 -2
- package/src/installers/lib.mjs +17 -3
package/CLAUDE.md
CHANGED
|
@@ -140,4 +140,4 @@ slidemind search "<query>" # search the brand engine for imagery (host re
|
|
|
140
140
|
npm run lint:parity # assert the skill carries no brand rules (CI guard)
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
-
No linter beyond the parity guard, `node --test` for the suite, no package manager beyond npm itself. The HTML preview is self-contained except for React + Babel-standalone pulled from a CDN on first load.
|
|
143
|
+
No linter beyond the parity guard, `node --test` for the suite, no package manager beyond npm itself. CI (`.github/workflows/test.yml`) runs the suite + parity guard on Linux, **Windows**, and macOS (Node 18 + 22) — the CLI promises native-Windows support, so keep it green there. The HTML preview is self-contained except for React + Babel-standalone pulled from a CDN on first load.
|
package/README.md
CHANGED
|
@@ -1,127 +1,292 @@
|
|
|
1
1
|
# slidemind
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/slidemind)
|
|
4
|
+
[](https://nodejs.org)
|
|
5
|
+
[](#install)
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
Connect **Claude Code, Codex, and opencode** to the **slidemind PowerPoint add-in** — so your coding agent (or you, from the terminal) can build and edit **native, on-brand PowerPoint decks** against your active corporate design, without leaving the editor.
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
> **Preview.** slidemind is in early access while the PowerPoint add-in makes its way to the Microsoft Office Store. The CLI is functional and published, but expect rough edges and breaking changes between releases. You need access to the slidemind add-in to use it.
|
|
10
|
+
|
|
11
|
+
slidemind is a **thin client**. The corporate design, the layout palette, and the native `.pptx` render all live in the **slidemind PowerPoint add-in** — this package is the bridge that lets a coding agent drive it. It ships two things:
|
|
12
|
+
|
|
13
|
+
1. **A CLI + MCP server** that talks to a running PowerPoint over the add-in's cloud bridge — render native `.pptx`, push slides straight into an open window, and search the active design's brand engine for imagery.
|
|
14
|
+
2. **An installable skill** for Claude Code, Codex, and opencode — so the agent in your editor knows how to plan, compose, and review slides on-brand from the design bundle the add-in serves.
|
|
15
|
+
|
|
16
|
+
Both drive the same add-in bridge, so an agent and a human end up producing the same artefact: native PowerPoint slides on the active corporate design.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Contents
|
|
21
|
+
|
|
22
|
+
- [Requirements](#requirements)
|
|
23
|
+
- [Install](#install)
|
|
24
|
+
- [Windows](#windows)
|
|
25
|
+
- [macOS](#macos)
|
|
26
|
+
- [Linux](#linux)
|
|
27
|
+
- [Without a global install (npx)](#without-a-global-install-npx)
|
|
28
|
+
- [Connect to PowerPoint](#connect-to-powerpoint)
|
|
29
|
+
- [Quick start](#quick-start)
|
|
30
|
+
- [Using it with a coding agent](#using-it-with-a-coding-agent)
|
|
31
|
+
- [Command reference](#command-reference)
|
|
32
|
+
- [Pushing slides into an open PowerPoint](#pushing-slides-into-an-open-powerpoint)
|
|
33
|
+
- [Multiple environments (for slidemind developers)](#multiple-environments-for-slidemind-developers)
|
|
34
|
+
- [Updating](#updating)
|
|
35
|
+
- [Troubleshooting](#troubleshooting)
|
|
36
|
+
- [Uninstall](#uninstall)
|
|
37
|
+
- [How it works](#how-it-works)
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Requirements
|
|
42
|
+
|
|
43
|
+
| | |
|
|
44
|
+
|---|---|
|
|
45
|
+
| **Node.js** | **18 or newer** (`node --version`). Ships with npm. |
|
|
46
|
+
| **slidemind PowerPoint add-in** | Installed in PowerPoint, with a presentation open and a **corporate design active**. The design and the `.pptx` render live here — the CLI cannot work without it. |
|
|
47
|
+
| **PowerPoint** | Microsoft 365, PowerPoint 2021/2019/2016, or PowerPoint on the web — anything that loads Office Add-ins. |
|
|
48
|
+
| **OS** | Windows, macOS, or Linux. See per-OS notes below. |
|
|
49
|
+
|
|
50
|
+
The CLI reaches PowerPoint through the add-in's **cloud relay** (no localhost, no certificates). Because of that, the machine running the CLI **does not have to be the same machine running PowerPoint** — pair once and commands route to wherever your add-in is registered.
|
|
51
|
+
|
|
52
|
+
Commands that read the design, render, or push (`download-bundle`, `build-pptx`, `push`, `search`) **require an open PowerPoint host with the add-in and an active corporate design.** Only `new` and `build` (HTML preview) work fully offline.
|
|
53
|
+
|
|
54
|
+
---
|
|
9
55
|
|
|
10
56
|
## Install
|
|
11
57
|
|
|
12
|
-
|
|
58
|
+
The package is published to **public npm** as [`slidemind`](https://www.npmjs.com/package/slidemind). The same two commands work on every platform:
|
|
13
59
|
|
|
14
60
|
```bash
|
|
15
61
|
npm install -g slidemind
|
|
16
62
|
slidemind init --for all # register the MCP server + skill into Claude Code / Codex / opencode
|
|
17
63
|
```
|
|
18
64
|
|
|
19
|
-
|
|
65
|
+
Then confirm it's on your `PATH`:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
slidemind --version
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
`slidemind init --for <claude|codex|opencode|all|none>` scopes the harness deployment. Use `none` to install the CLI only.
|
|
72
|
+
|
|
73
|
+
### Windows
|
|
74
|
+
|
|
75
|
+
slidemind runs on native Windows (PowerShell, Windows Terminal, or cmd) — no WSL or Git Bash required.
|
|
76
|
+
|
|
77
|
+
1. Install **Node 18+** from [nodejs.org](https://nodejs.org) (the LTS installer adds Node + npm to your `PATH` and ticks the right boxes by default).
|
|
78
|
+
2. Open **Windows Terminal** or **PowerShell** and run:
|
|
20
79
|
|
|
21
|
-
|
|
80
|
+
```powershell
|
|
81
|
+
npm install -g slidemind
|
|
82
|
+
slidemind init --for all
|
|
83
|
+
slidemind --version
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
The global install lands in `%APPDATA%\npm`, which the Node installer puts on your `PATH`. Your pairing credentials are stored under `%APPDATA%\slidemind\`.
|
|
87
|
+
|
|
88
|
+
> **If PowerShell blocks the command** with an execution-policy error, that's the `.ps1` shim npm generates — run `slidemind.cmd <command>` instead, or use a cmd.exe tab in Windows Terminal. (To permanently allow local scripts — downloaded ones still need a signature: `Set-ExecutionPolicy -Scope CurrentUser RemoteSigned`.)
|
|
89
|
+
|
|
90
|
+
### macOS
|
|
91
|
+
|
|
92
|
+
1. Install **Node 18+** — the [nodejs.org](https://nodejs.org) installer, or `brew install node`.
|
|
93
|
+
2. In Terminal (or iTerm):
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
npm install -g slidemind
|
|
97
|
+
slidemind init --for all
|
|
98
|
+
slidemind --version
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
If `npm install -g` fails with `EACCES`, you've hit a permissions issue with a system-owned npm prefix — the cleanest fix is a user-owned Node from [Homebrew](https://brew.sh) or [nvm](https://github.com/nvm-sh/nvm) (avoid `sudo npm`). Credentials are stored under `~/.config/slidemind/`.
|
|
102
|
+
|
|
103
|
+
### Linux
|
|
104
|
+
|
|
105
|
+
The CLI runs fine on Linux. There's no PowerPoint desktop on Linux, so you'll connect to a PowerPoint host elsewhere — a Windows/Mac desktop, or PowerPoint on the web — over the cloud relay.
|
|
22
106
|
|
|
23
107
|
```bash
|
|
24
|
-
|
|
108
|
+
npm install -g slidemind
|
|
109
|
+
slidemind init --for all
|
|
110
|
+
slidemind --version
|
|
25
111
|
```
|
|
26
112
|
|
|
27
|
-
|
|
113
|
+
If a system Node gives you `EACCES` on global installs, use [nvm](https://github.com/nvm-sh/nvm) or set a user-writable npm prefix rather than `sudo`. Credentials honor `XDG_CONFIG_HOME` (default `~/.config/slidemind/`).
|
|
114
|
+
|
|
115
|
+
### Without a global install (npx)
|
|
116
|
+
|
|
117
|
+
Run any command without installing globally:
|
|
28
118
|
|
|
29
119
|
```bash
|
|
30
|
-
|
|
31
|
-
slidemind update --ref 0.1.0 # pin a specific version
|
|
32
|
-
slidemind update --for codex # redeploy into one harness (or --for none to skip)
|
|
120
|
+
npx slidemind <command>
|
|
33
121
|
```
|
|
34
122
|
|
|
35
|
-
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Connect to PowerPoint
|
|
126
|
+
|
|
127
|
+
The CLI talks to PowerPoint through the add-in's cloud relay, so you pair once per machine.
|
|
36
128
|
|
|
37
|
-
|
|
129
|
+
1. In PowerPoint, open the **slidemind add-in** task pane and click **"Connect CLI"**.
|
|
130
|
+
2. It shows a one-time command. Copy and run it:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
slidemind pair <code>
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
3. Verify the link:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
slidemind whoami # lists the paired environment(s)
|
|
140
|
+
slidemind presentations # lists open PowerPoint windows the add-in sees
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
If `slidemind presentations` is empty, the add-in isn't reachable — open PowerPoint with the slidemind add-in and an active corporate design, then retry.
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
slidemind logout # unpair this machine
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
---
|
|
38
150
|
|
|
39
151
|
## Quick start
|
|
40
152
|
|
|
41
153
|
```bash
|
|
42
154
|
slidemind new my-deck # scaffold ./decks/my-deck/
|
|
43
|
-
slidemind build my-deck # build self-contained HTML
|
|
44
|
-
slidemind build-pptx my-deck # render native .pptx via the add-in (host required)
|
|
45
|
-
slidemind
|
|
155
|
+
slidemind build my-deck # build a self-contained HTML preview (offline)
|
|
156
|
+
slidemind build-pptx my-deck # render a native .pptx via the add-in (host required)
|
|
157
|
+
slidemind push my-deck # stream slides straight into an open PowerPoint (host required)
|
|
158
|
+
slidemind search "shield" # search the active design's brand engine (host required)
|
|
46
159
|
```
|
|
47
160
|
|
|
48
|
-
Decks live under `./decks/` in your current working directory
|
|
161
|
+
Decks live under `./decks/` in your current working directory — one folder per deck: `decks/<name>/slides/*.jsx`. Override the location with `SLIDEMIND_DECKS=/abs/path`.
|
|
49
162
|
|
|
50
|
-
|
|
163
|
+
You don't hand-write OOXML or hardcode brand colors — slides are small `.jsx` files that compose the layouts and tokens the add-in serves. The render happens server-side in PowerPoint; `slidemind build` gives you a quick HTML preview while you iterate.
|
|
51
164
|
|
|
52
|
-
|
|
165
|
+
---
|
|
53
166
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
slidemind
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
167
|
+
## Using it with a coding agent
|
|
168
|
+
|
|
169
|
+
`slidemind init` installs a **skill** into your coding agent. After that, just ask:
|
|
170
|
+
|
|
171
|
+
> "Make me a 5-slide deck introducing our Q3 roadmap."
|
|
172
|
+
|
|
173
|
+
Your agent (Claude Code, Codex, or opencode) auto-discovers the `slidemind-create-slides` skill, reads the active corporate design's rules from the add-in, writes the slide files, and renders + pushes them into PowerPoint for you. The skill owns the whole **plan → create → edit → render** workflow — there are no slash commands to memorize.
|
|
174
|
+
|
|
175
|
+
The MCP server registered by `slidemind init` gives the agent direct tools to list open presentations, push decks, and search brand imagery.
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Command reference
|
|
180
|
+
|
|
181
|
+
```text
|
|
182
|
+
slidemind new <name> Scaffold ./decks/<name>/
|
|
183
|
+
slidemind build <deck> Build a self-contained HTML preview (offline)
|
|
184
|
+
slidemind build-pptx <deck> Render a native .pptx via the add-in (host required)
|
|
185
|
+
slidemind push <deck> Build + push slides into an open PowerPoint (host required)
|
|
186
|
+
slidemind search "<query>" Search the active design's brand engine (host required)
|
|
187
|
+
slidemind download-bundle [deck] Materialize the active corporate design locally (host required)
|
|
188
|
+
slidemind presentations List PowerPoint windows registered with the add-in
|
|
189
|
+
slidemind pair <code> Pair with an add-in (copy the code from "Connect CLI")
|
|
190
|
+
slidemind whoami Show paired environment(s)
|
|
191
|
+
slidemind use <url|env> Set the default environment
|
|
192
|
+
slidemind logout [url|env] Unpair an environment (--all unpairs every one)
|
|
193
|
+
slidemind init --for <target> Install the skill + MCP server into a harness
|
|
194
|
+
slidemind uninstall --for <t> Remove a previously-installed skill
|
|
195
|
+
slidemind update [--for <t>] Fetch the latest release and redeploy
|
|
196
|
+
slidemind --help Full usage
|
|
197
|
+
slidemind --version Print version
|
|
61
198
|
```
|
|
62
199
|
|
|
63
|
-
|
|
200
|
+
`<target>` is `claude | codex | opencode | all | none`. `<deck>` resolves as: absolute path → `./<arg>` if it exists → `./decks/<arg>`.
|
|
201
|
+
|
|
202
|
+
### Export formats at a glance
|
|
203
|
+
|
|
204
|
+
| Command | Output | When to use |
|
|
205
|
+
|---|---|---|
|
|
206
|
+
| `slidemind build <deck>` | `decks/<deck>/presentation.html` | Self-contained HTML preview in a browser (offline) |
|
|
207
|
+
| `slidemind build-pptx <deck>` | `decks/<deck>/<deck>.pptx` | An editable native PowerPoint file |
|
|
208
|
+
| `slidemind push <deck>` | (streamed via the add-in) | Live insertion into an open PowerPoint window |
|
|
64
209
|
|
|
65
|
-
|
|
210
|
+
---
|
|
66
211
|
|
|
67
|
-
|
|
212
|
+
## Pushing slides into an open PowerPoint
|
|
213
|
+
|
|
214
|
+
With PowerPoint open and the slidemind add-in loaded, stream a deck's slides straight into the running window — no `.pptx` written to disk:
|
|
68
215
|
|
|
69
216
|
```bash
|
|
70
|
-
slidemind
|
|
71
|
-
slidemind
|
|
72
|
-
slidemind
|
|
217
|
+
slidemind presentations # list windows (presId, env, title)
|
|
218
|
+
slidemind push my-deck # append after the current slides
|
|
219
|
+
slidemind push my-deck --to <presId> # required if more than one window is open
|
|
220
|
+
slidemind push my-deck --at 0 # insert after slide 1 (0-based index)
|
|
221
|
+
slidemind push my-deck --replace # delete every existing slide first (destructive — confirm!)
|
|
222
|
+
slidemind push my-deck --slides 02,05,07 # push only a subset of source slides
|
|
73
223
|
```
|
|
74
224
|
|
|
75
|
-
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## Multiple environments (for slidemind developers)
|
|
76
228
|
|
|
77
|
-
|
|
229
|
+
If you run the add-in against more than one backend (local / dev / prod), the CLI is **multi-environment**: pair once per backend and every command automatically discovers your open PowerPoint across all of them, tags each window with its environment, and routes to the right one — no manual switching.
|
|
78
230
|
|
|
79
231
|
```bash
|
|
80
232
|
slidemind pair <local-code> --label local
|
|
81
233
|
slidemind pair <dev-code> --label dev
|
|
82
|
-
slidemind whoami
|
|
83
|
-
slidemind presentations
|
|
84
|
-
slidemind push my-deck --to <presId>
|
|
85
|
-
slidemind use dev
|
|
86
|
-
slidemind logout dev
|
|
87
|
-
slidemind --backend local presentations
|
|
234
|
+
slidemind whoami # lists every paired environment (* = default)
|
|
235
|
+
slidemind presentations # windows from all environments, each tagged [env]
|
|
236
|
+
slidemind push my-deck --to <presId> # routed to whichever environment owns that window
|
|
237
|
+
slidemind use dev # set the default environment
|
|
238
|
+
slidemind logout dev # unpair one (or --all to unpair every one)
|
|
239
|
+
slidemind --backend local presentations # scope a single command to one environment
|
|
88
240
|
```
|
|
89
241
|
|
|
90
|
-
Each "Connect CLI" code carries its own backend
|
|
242
|
+
Each "Connect CLI" code carries its own backend and session token, so pairing is per-environment and routing is automatic. A normal user just pairs one.
|
|
91
243
|
|
|
92
|
-
|
|
244
|
+
---
|
|
93
245
|
|
|
94
|
-
|
|
95
|
-
|---|---|---|
|
|
96
|
-
| `slidemind build <deck>` | `decks/<deck>/presentation.html` | Self-contained HTML (browser) |
|
|
97
|
-
| `slidemind build-pptx <deck>` | `decks/<deck>/<deck>.pptx` | Editable PowerPoint file |
|
|
98
|
-
| `slidemind push <deck>` | (streamed via add-in) | Live insertion into an open PowerPoint window |
|
|
246
|
+
## Updating
|
|
99
247
|
|
|
100
|
-
|
|
248
|
+
```bash
|
|
249
|
+
slidemind update # = npm install -g slidemind@latest, then redeploy the skill
|
|
250
|
+
slidemind update --ref 0.1.0 # pin a specific version
|
|
251
|
+
slidemind update --for codex # redeploy into one harness (--for none to skip)
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
Equivalently: `npm install -g slidemind@latest && slidemind init --for all`.
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## Troubleshooting
|
|
101
259
|
|
|
102
|
-
|
|
260
|
+
| Symptom | Fix |
|
|
261
|
+
|---|---|
|
|
262
|
+
| `slidemind: command not found` (or not recognized) | The npm global bin isn't on your `PATH`. Run `npm prefix -g` and add its `bin` (Windows: `%APPDATA%\npm`) to `PATH`, or use `npx slidemind`. |
|
|
263
|
+
| PowerShell: *running scripts is disabled* | npm's `.ps1` shim hit the execution policy. Use `slidemind.cmd <command>`, or `Set-ExecutionPolicy -Scope CurrentUser RemoteSigned`. |
|
|
264
|
+
| `slidemind presentations` is empty | The add-in isn't reachable. Open PowerPoint with the slidemind add-in and an active corporate design; click the task pane once to re-register, then retry. |
|
|
265
|
+
| `Not paired` | Run `slidemind pair <code>` using the code from the add-in's **"Connect CLI"**. Codes are one-time and expire — generate a fresh one if it's stale. |
|
|
266
|
+
| `build-pptx` / `push` / `search` error about no host | These require an open PowerPoint host with an active corporate design. `slidemind build` (HTML) is the only fully-offline preview. |
|
|
267
|
+
| `EACCES` on `npm install -g` (macOS/Linux) | Don't `sudo npm`. Use a user-owned Node via [nvm](https://github.com/nvm-sh/nvm) or Homebrew, or set a user-writable npm prefix. |
|
|
103
268
|
|
|
104
|
-
|
|
269
|
+
---
|
|
105
270
|
|
|
106
|
-
|
|
271
|
+
## Uninstall
|
|
107
272
|
|
|
108
273
|
```bash
|
|
109
|
-
slidemind
|
|
110
|
-
|
|
111
|
-
slidemind init --for opencode # ~/.config/opencode/{agent,slidemind}/
|
|
112
|
-
slidemind init --for all
|
|
274
|
+
slidemind uninstall --for all # remove the skill + MCP registration from each harness
|
|
275
|
+
npm uninstall -g slidemind # remove the CLI
|
|
113
276
|
```
|
|
114
277
|
|
|
115
|
-
|
|
278
|
+
---
|
|
116
279
|
|
|
117
|
-
|
|
280
|
+
## How it works
|
|
118
281
|
|
|
119
|
-
|
|
282
|
+
The design truth lives in the **add-in**, not the CLI:
|
|
120
283
|
|
|
121
|
-
|
|
122
|
-
slidemind
|
|
123
|
-
|
|
284
|
+
- The `.pptx` is **rendered server-side** over the bridge — there's no local exporter.
|
|
285
|
+
- The corporate design is fetched as a **bundle** (`slidemind download-bundle`) — tokens, layout palette, brand rules, assets — keyed to the active presentation.
|
|
286
|
+
- Brand imagery comes from the add-in's **engine** (`slidemind search` → the agent downloads a result into the deck's `assets/`).
|
|
287
|
+
|
|
288
|
+
So an open PowerPoint host with the slidemind add-in and an active corporate design is required for everything except the offline HTML preview. The CLI ships no brand and no exporter of its own — it's deliberately brand-agnostic, working against whatever corporate design the add-in has loaded.
|
|
124
289
|
|
|
125
|
-
|
|
290
|
+
---
|
|
126
291
|
|
|
127
|
-
|
|
292
|
+
slidemind is published by **statworx**. Source lives in a private repository; the npm tarball is the install artifact. License: `UNLICENSED` (publicly installable, proprietary).
|
package/bin/slidemind.mjs
CHANGED
|
@@ -646,13 +646,27 @@ async function cmdUninstall(rest) {
|
|
|
646
646
|
ui.done(target === "all" ? "removed from all harnesses" : `removed from ${target}`);
|
|
647
647
|
}
|
|
648
648
|
|
|
649
|
+
// On Windows we must spawn through the shell (Node refuses to exec .cmd
|
|
650
|
+
// shims directly since CVE-2024-27980), and `shell: true` joins file + args
|
|
651
|
+
// into one cmd.exe command string WITHOUT quoting — so an unquoted
|
|
652
|
+
// `C:\Program Files\nodejs\npm.cmd` splits at the space and cmd tries to run
|
|
653
|
+
// `C:\Program`. Quote anything containing whitespace before handing it over.
|
|
654
|
+
function cmdQuote(s) {
|
|
655
|
+
return /\s/.test(s) ? `"${s}"` : s;
|
|
656
|
+
}
|
|
657
|
+
|
|
649
658
|
function spawnInherit(file, args) {
|
|
659
|
+
const useShell = process.platform === "win32";
|
|
650
660
|
return new Promise((resolve, reject) => {
|
|
651
|
-
const child = spawn(
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
661
|
+
const child = spawn(
|
|
662
|
+
useShell ? cmdQuote(file) : file,
|
|
663
|
+
useShell ? args.map(cmdQuote) : args,
|
|
664
|
+
{
|
|
665
|
+
stdio: "inherit",
|
|
666
|
+
env: process.env,
|
|
667
|
+
shell: useShell,
|
|
668
|
+
},
|
|
669
|
+
);
|
|
656
670
|
child.on("error", reject);
|
|
657
671
|
child.on("exit", (code) => {
|
|
658
672
|
if (code === 0) resolve();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "slidemind",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Connect Claude Code, Codex & opencode to the slidemind PowerPoint add-in — let your coding agent build and edit native, on-brand PowerPoint decks against your active corporate design, from the terminal.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"build-pptx": "node bin/slidemind.mjs build-pptx",
|
|
28
28
|
"lint:parity": "node scripts/check-skill-parity.mjs",
|
|
29
29
|
"release": "node scripts/release.mjs",
|
|
30
|
-
"test": "node --test
|
|
30
|
+
"test": "node --test"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@babel/parser": "^7.26.5",
|
package/src/bridge/config.mjs
CHANGED
|
@@ -22,13 +22,19 @@ import os from "node:os";
|
|
|
22
22
|
import path from "node:path";
|
|
23
23
|
|
|
24
24
|
export function sessionConfigDir() {
|
|
25
|
+
// An explicitly set XDG_CONFIG_HOME wins on EVERY platform — it's a
|
|
26
|
+
// deliberate override (and how the test suite isolates the store, also on
|
|
27
|
+
// Windows). The platform default below is %APPDATA% on Windows, ~/.config
|
|
28
|
+
// elsewhere.
|
|
29
|
+
if (process.env.XDG_CONFIG_HOME) {
|
|
30
|
+
return path.join(process.env.XDG_CONFIG_HOME, "slidemind");
|
|
31
|
+
}
|
|
25
32
|
if (process.platform === "win32") {
|
|
26
33
|
const base =
|
|
27
34
|
process.env.APPDATA || path.join(os.homedir(), "AppData", "Roaming");
|
|
28
35
|
return path.join(base, "slidemind");
|
|
29
36
|
}
|
|
30
|
-
|
|
31
|
-
return path.join(base, "slidemind");
|
|
37
|
+
return path.join(os.homedir(), ".config", "slidemind");
|
|
32
38
|
}
|
|
33
39
|
|
|
34
40
|
export function sessionConfigPath() {
|
package/src/installers/lib.mjs
CHANGED
|
@@ -8,9 +8,19 @@
|
|
|
8
8
|
|
|
9
9
|
import { brand, ANIMATE } from "./brand-theme.mjs";
|
|
10
10
|
import fs from "node:fs";
|
|
11
|
+
import os from "node:os";
|
|
11
12
|
import path from "node:path";
|
|
12
13
|
import * as tui from "./tui.mjs";
|
|
13
14
|
|
|
15
|
+
// The user's home directory, cross-platform. `process.env.HOME` is set on
|
|
16
|
+
// macOS/Linux (and in Git Bash/WSL) but NOT by native Windows Node, which
|
|
17
|
+
// exposes the home via USERPROFILE — `os.homedir()` reads the right one on
|
|
18
|
+
// every platform. We still honour an explicit HOME override (tests, custom
|
|
19
|
+
// setups) when present.
|
|
20
|
+
function homeDir() {
|
|
21
|
+
return process.env.HOME || os.homedir();
|
|
22
|
+
}
|
|
23
|
+
|
|
14
24
|
// Brand-colored glyphs injected into clack's log.message via the
|
|
15
25
|
// `symbol` option. Pre-wrapped in our own truecolor escapes
|
|
16
26
|
// (terminated with `\x1b[39m`) so they override whatever 16-color name
|
|
@@ -116,7 +126,7 @@ export function isForce(flags) {
|
|
|
116
126
|
}
|
|
117
127
|
|
|
118
128
|
export function expandHome(p) {
|
|
119
|
-
if (p.startsWith("~/")) return path.join(
|
|
129
|
+
if (p.startsWith("~/")) return path.join(homeDir(), p.slice(2));
|
|
120
130
|
return p;
|
|
121
131
|
}
|
|
122
132
|
|
|
@@ -143,7 +153,11 @@ export function copyDir(src, dest) {
|
|
|
143
153
|
|
|
144
154
|
export function linkDir(src, dest) {
|
|
145
155
|
ensureDir(path.dirname(dest));
|
|
146
|
-
|
|
156
|
+
// "junction" on Windows: directory junctions need neither Developer Mode
|
|
157
|
+
// nor an elevated shell, unlike "dir" symlinks. The type argument is
|
|
158
|
+
// ignored on every other platform.
|
|
159
|
+
const type = process.platform === "win32" ? "junction" : "dir";
|
|
160
|
+
fs.symlinkSync(src, dest, type);
|
|
147
161
|
}
|
|
148
162
|
|
|
149
163
|
// Install one folder (src) into dest. If link mode, symlink; otherwise copy.
|
|
@@ -169,7 +183,7 @@ export async function installDir({ src, dest, link, force }) {
|
|
|
169
183
|
|
|
170
184
|
export function tildify(p) {
|
|
171
185
|
if (typeof p !== "string") return p;
|
|
172
|
-
const home =
|
|
186
|
+
const home = homeDir();
|
|
173
187
|
if (home && (p === home || p.startsWith(home + path.sep))) {
|
|
174
188
|
return "~" + p.slice(home.length);
|
|
175
189
|
}
|