slidemind 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/CLAUDE.md CHANGED
@@ -64,7 +64,7 @@ slidemind/
64
64
  ├── .claude-plugin/
65
65
  │ └── plugin.json Claude Code plugin manifest
66
66
  ├── bin/
67
- │ └── slidemind.mjs CLI dispatcher (presentations, download-bundle, init, build, build-pptx, push, search, install)
67
+ │ └── slidemind.mjs CLI dispatcher (presentations, download-bundle, init, build, build-pptx, push, search, install, pair/whoami/use/logout)
68
68
  ├── skills/ canonical, installable skill payload — thin CLI workflow glue only
69
69
  │ └── create-slides/
70
70
  │ └── SKILL.md the whole skill: host gate + intake/plan + create flow + CLI⇄in-app command map.
@@ -95,12 +95,18 @@ slidemind build <deck> # build self-contained HTML preview
95
95
  slidemind build-pptx <deck> # render native .pptx via the add-in (HOST REQUIRED)
96
96
  slidemind push <deck> # render + push slides into a running PowerPoint (HOST REQUIRED)
97
97
  slidemind search "<query>" # search the brand engine for imagery (HOST REQUIRED)
98
+ slidemind pair <code> # pair with an add-in environment (copy from its "Connect CLI")
99
+ slidemind whoami # list every paired environment (* = default)
100
+ slidemind use <url|env> # set the default environment
101
+ slidemind logout [url|env] # unpair one environment (--all unpairs every one)
98
102
  slidemind init --for <target> # install skill into claude | codex | opencode | all
99
103
  slidemind uninstall --for <target>
100
104
  ```
101
105
 
102
106
  `<deck>` resolves as: absolute path → `./<arg>` if it exists → `./decks/<arg>`. The decks directory is `./decks/` by default; override with `SLIDEMIND_DECKS=/abs/path`.
103
107
 
108
+ **Multi-environment pairing.** The CLI stores one session **per backend** (`~/.config/slidemind/session.json`, v2 `{version, sessions[], default}`; the legacy single-record v1 shape is migrated on read). Pair once per environment (local / dev / prod) and every command **fans out** across all paired backends, tags each open window with its `env`, and **routes by the presentation's origin backend** automatically — no manual switching. Scope a command to one backend with `--backend <url|env>` (or `SLIDEMIND_BACKEND`). This is a developer convenience; a normal user pairs exactly one. See the memory note *CLI↔add-in: cloud relay + pairing*.
109
+
104
110
  **The design truth lives in the add-in, not the CLI.** The `.pptx` is rendered server-side over the local bridge (no local exporter), the corporate design is fetched as a bundle, and brand imagery comes from the add-in's engine. So `create`/`build-pptx`/`push`/`search` all hard-require an **open PowerPoint host with the slidemind add-in and an active corporate design**. See `docs/slidemind-cli-connect/`.
105
111
 
106
112
  ## Design system ground rules
@@ -134,4 +140,4 @@ slidemind search "<query>" # search the brand engine for imagery (host re
134
140
  npm run lint:parity # assert the skill carries no brand rules (CI guard)
135
141
  ```
136
142
 
137
- 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,100 +1,292 @@
1
1
  # slidemind
2
2
 
3
- Connect Claude Code, Codex, and opencode to the **slidemind PowerPoint add-in** — so your coding agent can build and edit native, on-brand PowerPoint decks against your active corporate design, without leaving the terminal.
3
+ [![npm version](https://img.shields.io/npm/v/slidemind.svg)](https://www.npmjs.com/package/slidemind)
4
+ [![node](https://img.shields.io/node/v/slidemind.svg)](https://nodejs.org)
5
+ [![platforms](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-blue.svg)](#install)
4
6
 
5
- This is the companion CLI for the slidemind PowerPoint add-in (coming to the Microsoft Office Store). The add-in owns the corporate design and the native `.pptx` render; slidemind is the bridge that lets a coding agent drive it. It ships two things:
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
- 1. **A CLI + MCP server** that talks to a running PowerPoint over the add-in's local bridge — render native `.pptx`, push slides straight into an open window, and search the active design's brand engine for imagery.
8
- 2. **An installable skill** for Claude Code, Codex, and opencode — so the agent in your editor knows how to drive that bridge and compose slides on-brand from the design bundle the add-in serves.
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
- From public npm. macOS / Linux / Windows; requires **Node 18+**.
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
- `slidemind init --for <claude|codex|opencode|all|none>` scopes the harness deployment (`none` installs the CLI only). `slidemind --version` confirms it's on your `PATH`.
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:
79
+
80
+ ```powershell
81
+ npm install -g slidemind
82
+ slidemind init --for all
83
+ slidemind --version
84
+ ```
20
85
 
21
- One-off, without a global install:
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
- npx slidemind <command>
108
+ npm install -g slidemind
109
+ slidemind init --for all
110
+ slidemind --version
25
111
  ```
26
112
 
27
- ### Updating
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
- slidemind update # = npm install -g slidemind@latest, then redeploy the skill
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
- Equivalently: `npm install -g slidemind@latest && slidemind init --for all`.
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.
128
+
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
+ ```
36
135
 
37
- > **Heads up:** the design system and the `.pptx` render now live in the **slidemind PowerPoint add-in** — the CLI is a thin client. `build-pptx`, `push`, `download-bundle`, and `search` require an open PowerPoint window with the add-in loaded and an active corporate design. See [`docs/slidemind-cli-connect/`](./docs/slidemind-cli-connect/).
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 search "shield" # search the brand engine for imagery (host required)
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. Each deck is one folder: `decks/<name>/slides/*.jsx`.
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
- ## Pushing slides into an open PowerPoint
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
- If you have PowerPoint open with the **slidemind add-in** loaded, you can build a deck and stream its slides straight into the running window — no `.pptx` file written to disk:
165
+ ---
53
166
 
54
- ```bash
55
- slidemind presentations # list registered PowerPoint windows (presId, title, fileName)
56
- slidemind push my-deck # append my-deck after the current slides
57
- slidemind push my-deck --to <presId> # required if more than one PowerPoint window is open
58
- slidemind push my-deck --at 0 # insert after slide 1 (0-based index)
59
- slidemind push my-deck --replace # delete every existing slide first (destructive — confirm!)
60
- slidemind push my-deck --slides 02,05,07 # push only a subset of source slides
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
- If `slidemind presentations` returns nothing, the add-in isn't running — open PowerPoint with the slidemind add-in and an active corporate design, then retry. (Rendering is server-side now, so `build-pptx` needs a host too.)
200
+ `<target>` is `claude | codex | opencode | all | none`. `<deck>` resolves as: absolute path → `./<arg>` if it exists → `./decks/<arg>`.
64
201
 
65
- ## Export formats at a glance
202
+ ### Export formats at a glance
66
203
 
67
204
  | Command | Output | When to use |
68
205
  |---|---|---|
69
- | `slidemind build <deck>` | `decks/<deck>/presentation.html` | Self-contained HTML (browser) |
70
- | `slidemind build-pptx <deck>` | `decks/<deck>/<deck>.pptx` | Editable PowerPoint file |
71
- | `slidemind push <deck>` | (streamed via add-in) | Live insertion into an open PowerPoint window |
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 |
72
209
 
73
- ## Icon / image search
210
+ ---
74
211
 
75
- `slidemind search "<query>"` searches the active corporate design's **brand engine** (icons/images) over the local bridge, using the add-in's server-side bridge when available so it returns the same results the in-app design agent sees (an open host is required). It prints a `searchId` plus numbered results; the agent then fetches a chosen result into the deck's `assets/` via the MCP tool `slidemind_download_result`. The agent-facing flow (`slidemind_search_engine` → `slidemind_download_result`) is owned by the add-in's design bundle and read by the skill. There is no local icon library anymore.
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:
215
+
216
+ ```bash
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
223
+ ```
76
224
 
77
- ## Install into a coding-agent harness
225
+ ---
78
226
 
79
- Pick a target and run:
227
+ ## Multiple environments (for slidemind developers)
228
+
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.
80
230
 
81
231
  ```bash
82
- slidemind init --for claude # ~/.claude/skills/slidemind-create-slides/
83
- slidemind init --for codex # ~/.codex/skills/slidemind-create-slides/
84
- slidemind init --for opencode # ~/.config/opencode/{agent,slidemind}/
85
- slidemind init --for all
232
+ slidemind pair <local-code> --label local
233
+ slidemind pair <dev-code> --label dev
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
86
240
  ```
87
241
 
88
- Each installer drops the slidemind skill files into the harness-specific location. After install, your agent auto-discovers the `slidemind-create-slides` skill and loads it on demand whenever you ask for a slide, deck, or presentation. The skill owns the entire plan → create → edit workflow — there are no separate slash commands to remember.
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.
89
243
 
90
- Add `--link` to symlink instead of copy (useful while hacking on slidemind itself).
244
+ ---
91
245
 
92
- To remove:
246
+ ## Updating
93
247
 
94
248
  ```bash
95
- slidemind uninstall --for <target>
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)
96
252
  ```
97
253
 
98
- ## Project layout
254
+ Equivalently: `npm install -g slidemind@latest && slidemind init --for all`.
255
+
256
+ ---
257
+
258
+ ## Troubleshooting
259
+
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. |
268
+
269
+ ---
270
+
271
+ ## Uninstall
272
+
273
+ ```bash
274
+ slidemind uninstall --for all # remove the skill + MCP registration from each harness
275
+ npm uninstall -g slidemind # remove the CLI
276
+ ```
277
+
278
+ ---
279
+
280
+ ## How it works
281
+
282
+ The design truth lives in the **add-in**, not the CLI:
283
+
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.
289
+
290
+ ---
99
291
 
100
- See [CLAUDE.md](./CLAUDE.md) for the full repo tour and the design-system ground rules.
292
+ slidemind is published by **statworx**. Source lives in a private repository; the npm tarball is the install artifact. License: `UNLICENSED` (publicly installable, proprietary).