slidemind 0.2.1 → 0.2.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.
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "slidemind",
3
+ "interface": {
4
+ "displayName": "slidemind",
5
+ "shortDescription": "On-brand PowerPoint decks from your coding agent",
6
+ "longDescription": "slidemind connects Codex to the slidemind PowerPoint add-in over its local bridge, so the agent can build and edit native .pptx decks against whatever corporate design the add-in has active. It is brand-agnostic: the corporate design, the layout palette, and the OOXML render all live in the add-in, and the agent reads every brand rule from the design bundle it serves. This marketplace publishes the slidemind plugin, which carries the authoring and search skills. The slidemind CLI itself is installed separately from public npm (npm install -g slidemind); the skills explain that step when the command is missing."
7
+ },
8
+ "plugins": [
9
+ {
10
+ "name": "slidemind",
11
+ "description": "Build and edit native, on-brand PowerPoint decks against the active corporate design.",
12
+ "source": {
13
+ "source": "local",
14
+ "path": "./"
15
+ },
16
+ "policy": {
17
+ "installation": "AVAILABLE",
18
+ "authentication": "ON_INSTALL"
19
+ },
20
+ "category": "Productivity",
21
+ "interface": {
22
+ "displayName": "slidemind",
23
+ "shortDescription": "On-brand PowerPoint decks from Codex",
24
+ "developerName": "statworx",
25
+ "longDescription": "Adds two skills. slidemind-create-slides owns the intake, plan, create and edit workflow that turns per-slide sources into an editable .pptx rendered by the add-in, plus a local HTML preview. slidemind-search discovers and reuses existing slides and brand imagery from the corporate design's engines, or from a PowerPoint file on disk. Both are brand-agnostic and read the active corporate design's rules, layout palette, and authoring workflow from the design bundle the add-in serves. Requires the slidemind CLI (npm install -g slidemind) and an open PowerPoint with the add-in for anything that renders or reads a live deck."
26
+ }
27
+ }
28
+ ]
29
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slidemind",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Connect Claude Code to the slidemind PowerPoint add-in — build and edit native, on-brand PowerPoint decks against the active corporate design, from the terminal.",
5
5
  "author": {
6
6
  "name": "statworx",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slidemind",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Connect Codex to the slidemind PowerPoint add-in — build and edit native, on-brand PowerPoint decks against the active corporate design. Requires the slidemind CLI (npm install -g slidemind); the skills explain the install when it is missing.",
5
5
  "author": {
6
6
  "name": "statworx",
@@ -20,10 +20,18 @@
20
20
  "interface": {
21
21
  "displayName": "slidemind",
22
22
  "shortDescription": "On-brand PowerPoint decks from Codex",
23
+ "longDescription": "Adds two skills. slidemind-create-slides owns the intake, plan, create and edit workflow that turns per-slide sources into an editable .pptx rendered by the add-in, plus a local HTML preview. slidemind-search discovers and reuses existing slides and brand imagery from the corporate design's engines, or from a PowerPoint file on disk. Both are brand-agnostic and read the active corporate design's rules, layout palette, and authoring workflow from the design bundle the add-in serves. Requires the slidemind CLI (npm install -g slidemind) and an open PowerPoint with the add-in for anything that renders or reads a live deck.",
23
24
  "developerName": "statworx",
24
25
  "category": "Productivity",
25
26
  "capabilities": [
26
27
  "Skills"
28
+ ],
29
+ "websiteURL": "https://www.statworx.com",
30
+ "brandColor": "#E07D44",
31
+ "logo": "./assets/app-icon.png",
32
+ "screenshots": [],
33
+ "defaultPrompt": [
34
+ "Turn this into an on-brand slide deck"
27
35
  ]
28
36
  }
29
37
  }
@@ -1,6 +1,6 @@
1
- # CLAUDE.md
1
+ # AGENTS.md
2
2
 
3
- This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
3
+ Guidance for coding agents working in this repository. `CLAUDE.md` is a symlink to this file — there is ONE guidance document, so edit it here and every harness sees the change. (It used to be two near-identical files kept in sync by hand, which drifted.)
4
4
 
5
5
  ## Project purpose
6
6
 
@@ -17,21 +17,73 @@ Both drive the same add-in bridge, so an agent and a human end up producing the
17
17
 
18
18
  The package is published to **public npm** as `slidemind` (`publishConfig.access: public`; license `UNLICENSED` — publicly installable, proprietary). The source lives in a private GitHub repo (`STATWORX/intern-slidemind-cli`); the npm tarball is the install artifact. The CLI is a thin client — the corporate design and the OOXML render live in the slidemind add-in and require an open host — so there is nothing secret in the tarball.
19
19
 
20
- Install + register with a harness:
20
+ **Onboarding is one pasted command.** The add-in's Settings → General → Connect
21
+ CLI → *Set up CLI* mints a claim and prints the whole line:
21
22
 
22
23
  ```bash
23
- npm install -g slidemind
24
- slidemind init --for all # claude | codex | opencode | all | none
24
+ npx --yes slidemind@latest setup smc1_<claim>
25
25
  ```
26
26
 
27
- `npx slidemind <command>` runs it without a global install. `slidemind update` is a thin wrapper over `npm install -g slidemind@latest` (`--ref <version>` to pin, `--for <target>` to control the redeploy). The `files` whitelist in `package.json` controls what ships (`bin/ src/ skills/ .claude-plugin/ .codex-plugin/ CLAUDE.md README.md`); `archive/`, `docs/`, `scripts/`, `test/`, and `.agents/` are excluded.
27
+ npx runs the package from its cache but never installs it, so `cmdSetup` does
28
+ the persistent work itself: decode the claim → redeem it → save the session →
29
+ `npm install -g slidemind@latest` → deploy the skills → run `ready`. The user
30
+ needs nothing but Node beforehand, and **there is no `init` step**: `--for auto`
31
+ (the default) resolves through each installer's `detect()` to the coding agents
32
+ actually present, minus any whose slidemind plugin already supplies the skills.
33
+ `init` stays for the manual-install path and for adding a harness later.
34
+
35
+ `detect()` reads **two** signals and treats either as present: the harness config
36
+ dir (`~/.claude`, `$CODEX_HOME`/`~/.codex`, `~/.config/opencode`) and the harness
37
+ binary on `PATH`. Neither alone is sufficient — those dirs are created the first
38
+ time an agent RUNS, so a just-installed, never-launched agent has none, while a
39
+ desktop-app-only install has no binary. A machine where BOTH miss (e.g. only a
40
+ never-opened desktop app) still ends up connected but skill-less; the remedy is
41
+ `slidemind init --for auto` once the agent has been opened, which is what the
42
+ "none detected" line tells the user.
43
+
44
+ **Why the claim carries a URL, and why onboarding must start in PowerPoint.**
45
+ Every customer runs its own deployment, so a fresh CLI cannot know which backend
46
+ its user belongs to — there is no address to start an approval at and nothing to
47
+ discover it from. The authenticated add-in knows, so the claim (`smc1_` +
48
+ base64url `{v,u,s}`) carries this deployment's origin next to a one-time secret.
49
+ That is the same property the retired `pair <blob>` flow had; `setup` keeps it
50
+ and removes the steps. **Do not "simplify" this into a CLI-first flow** (a device
51
+ code the CLI mints, a browser PKCE page it opens): both need the backend URL
52
+ *before* they can start, which is the one thing the CLI does not have. The
53
+ backend builds `u` from the configured `FRONTEND_URL`, never from a request
54
+ header — a spoofable header must not end up in a credential the CLI then trusts.
55
+
56
+ Installation, skill distribution, and CLI authorization stay independent
57
+ underneath. This matters for admin-distributed Codex plugins: the plugin already
58
+ supplies the skills, so those users must **not** plant a second copy — which
59
+ `--for auto` handles by itself, and `setup --for none --no-install` reduces to
60
+ the connection alone.
61
+
62
+ **mint → redeem is the ONLY way a CLI gets a session.** There is no device code
63
+ and no `slidemind connect`: both were removed because each needs the backend URL
64
+ *before* it can start, which is the one thing the CLI does not have. `ready` on an
65
+ unconnected CLI therefore does not attempt a handshake — it emits a
66
+ `not_connected` blocker naming the add-in button and exits. Consequently the CLI
67
+ hardcodes **no backend URL at all**; `SLIDEMIND_CONNECT_URL` is gone, and
68
+ `--backend`/`SLIDEMIND_BACKEND` only ever *scope* an existing session. The
69
+ retired `slidemind pair <blob>` had the same carries-its-own-address property;
70
+ `setup` keeps it and removes the steps.
71
+
72
+ `npx slidemind <command>` runs it without a global install. `slidemind update` is a thin wrapper over `npm install -g slidemind@latest` (`--ref <version>` to pin, `--for <target>` to control the redeploy). The `files` whitelist in `package.json` controls what ships (`bin/ src/ skills/ .claude-plugin/ .codex-plugin/ .agents/plugins/ AGENTS.md README.md`); `archive/`, `docs/`, `scripts/`, and `test/` are excluded. Two traps live in that list:
73
+
74
+ - `.agents/plugins/`, **not** `.agents/` — `files` globs the filesystem rather than git, and `.agents/` also holds gitignored per-developer harness scratch that a bare entry would publish.
75
+ - `AGENTS.md`, **not** `CLAUDE.md` — `CLAUDE.md` is a symlink and **npm silently drops symlinks from the tarball**, so listing it would ship nothing at all. The repo keeps the symlink for local harness convenience; the package ships the real `AGENTS.md`.
76
+
77
+ A packaging test guards both.
28
78
 
29
79
  Both agent harnesses can also install slidemind as a **plugin** — this private repo doubles as the marketplace (a public marketplace repo can be split out later; the files move as-is). The marketplace is named `slidemind`, NOT `statworx`: the team already registers a `statworx` marketplace from `STATWORX/intern-marketplace-test`, and both harnesses allow only one marketplace per name.
30
80
 
31
- - **Claude Code** (one step, no `npm -g`): `/plugin marketplace add STATWORX/intern-slidemind-cli` → `/plugin install slidemind@slidemind`. The marketplace entry (`.claude-plugin/marketplace.json`) points at the **public npm package, unpinned** — Claude installs the latest tarball and the installed version comes from the tarball's `.claude-plugin/plugin.json`, so only the marketplace add needs repo access. The tarball's `bin/slidemind` + `bin/slidemind.cmd` shims land on PATH inside plugin sessions, so the plugin carries the CLI too.
32
- - **Codex**: `codex plugin marketplace add STATWORX/intern-slidemind-cli` → `codex plugin add slidemind@slidemind`. Codex clones the repo (marketplace file `.agents/plugins/marketplace.json`; plugin manifest `.codex-plugin/plugin.json`; plugin source = repo root) and carries the skills only — the CLI still arrives via `npm install -g slidemind`, which the skills' remediation covers.
81
+ - **Claude Code** (one step, no `npm -g`, **no GitHub account**): `/plugin marketplace add https://unpkg.com/slidemind/.claude-plugin/marketplace.json` → `/plugin install slidemind@slidemind`. A Claude marketplace source may be a plain HTTPS URL, and an npm CDN serves files straight out of the published tarball — which ships `.claude-plugin/marketplace.json`. So the marketplace needs no repo of its own and follows releases automatically (no version in the URL, no version pin in the plugin entry). `https://cdn.jsdelivr.net/npm/slidemind/.claude-plugin/marketplace.json` is the equivalent fallback. The tarball's `bin/slidemind` + `bin/slidemind.cmd` shims land on PATH inside plugin sessions, so the plugin carries the CLI too. (`/plugin marketplace add STATWORX/intern-slidemind-cli` also works but needs read access to this private repo — prefer the URL.)
82
+ - **Codex**: a Codex marketplace source must be a **local path or a git remote** — no URL, no npm — so the CDN trick does NOT transfer. Instead the tarball ships `.agents/plugins/marketplace.json`, which makes the INSTALLED package a valid local marketplace: `npm install -g slidemind` → `codex plugin marketplace add "$(npm root -g)/slidemind"` → `codex plugin add slidemind@slidemind`. No GitHub account needed. (`codex plugin marketplace add STATWORX/intern-slidemind-cli` works for anyone with repo access.) Codex plugins cannot put a binary on PATH, so the CLI always comes from npm; the skills' remediation covers that.
33
83
 
34
- `slidemind init --for <target>` remains the universal fallback on all three harnesses; the Claude installer prints a dedup hint when it detects the plugin is also installed.
84
+ > The Codex **admin console** validates harder than the CLI does: it rejects an import when any `interface` block lacks a non-blank `longDescription`, which `codex plugin add` never complains about. `test/plugin-manifests.test.mjs` guards it.
85
+
86
+ `slidemind init --for <target>` remains the universal fallback on all three harnesses; the Claude and Codex installers each print a dedup hint when they detect the plugin is also installed (`~/.claude/plugins/cache/<marketplace>/slidemind/`, `$CODEX_HOME/plugins/cache/<marketplace>/slidemind/<version>/`). Plugin users only ever need `npm install -g slidemind` for the binary — never `init`, which would plant a second copy of the skills that drifts on the next plugin update. Both skills' *CLI missing* remediation says so, keyed off whether the running `SKILL.md` sits under a plugin cache.
35
87
 
36
88
  **Updating a plugin-installed CLI is `/plugin`, not `slidemind update`.** The Claude plugin ships its own copy of the CLI on the session's PATH, so `npm install -g slidemind@latest` drops a second, unrelated global and the session keeps running the old binary — a user following that advice would watch the update succeed and stay blocked on the add-in's version floor. `src/install-channel.mjs` detects the channel from the running code's path (plus `CLAUDE_PLUGIN_ROOT`) and every too-old-CLI remediation ends with `updateCliInstruction()`, so the message names the updater that actually replaces this binary; the `cli_update_required` rung of the readiness ladder also flips `actor` to `user` there, because the agent cannot drive `/plugin`.
37
89
 
@@ -73,7 +125,7 @@ Teammates pick up the release with `npm install -g slidemind@latest` (or `slidem
73
125
  slidemind/
74
126
  ├── package.json npm package metadata, single bin: slidemind
75
127
  ├── README.md end-user quickstart
76
- ├── CLAUDE.md this file
128
+ ├── AGENTS.md this file (CLAUDE.md is a symlink to it)
77
129
  ├── .claude-plugin/
78
130
  │ ├── plugin.json Claude Code plugin manifest (version release-synced to package.json)
79
131
  │ └── marketplace.json Claude Code marketplace — serves the plugin from public npm, unpinned
@@ -82,7 +134,7 @@ slidemind/
82
134
  ├── .agents/
83
135
  │ └── plugins/marketplace.json Codex marketplace — serves this repo (git clone) as the plugin; NOT in the npm tarball
84
136
  ├── bin/
85
- │ ├── slidemind.mjs CLI dispatcher (ready, doctor, presentations, read, download-bundle, new, init, build, build-pptx, view-draft, push, ls engines, search, insert-slide, add-slide, install, pair/whoami/use/logout)
137
+ │ ├── slidemind.mjs CLI dispatcher (setup, connect, ready, doctor, presentations, read, download-bundle, new, init, build, build-pptx, view-draft, push, ls engines, search, insert-slide, add-slide, install, whoami/use/logout)
86
138
  │ └── slidemind + slidemind.cmd PATH shims for Claude Code plugin sessions (npm links slidemind.mjs itself)
87
139
  ├── skills/ canonical, installable skill payload — thin CLI workflow glue only
88
140
  │ ├── create-slides/
@@ -96,7 +148,8 @@ slidemind/
96
148
  │ discover → search → pick → reuse loop + vocabulary→CLI command map. The craft is
97
149
  │ READ from the bundle's workflow/search.md — owned by the add-in.
98
150
  ├── src/ implementation of the slidemind CLI
99
- │ ├── bridge/ add-in local-bridge: client.mjs, bundle.mjs (materialize), build-and-push.mjs (server render; native-slide splicing), engine-download.mjs + recolor.mjs (image/icon fetch + recolour)
151
+ │ ├── bridge/ add-in local-bridge: client.mjs, bundle.mjs (materialize), build-and-push.mjs (server render; native-slide splicing), engine-download.mjs + recolor.mjs (image/icon fetch + recolour),
152
+ │ │ setup-claim.mjs (decode/redeem the add-in's one-command claim — the only connect path) + http-json.mjs + config.mjs (per-backend sessions)
100
153
  │ ├── builders/ build.mjs (HTML preview), review.mjs (spatial preview-review gate + local server; stable per-deck port, graceful fallback, tab reuse across rounds), plan.mjs (plan sign-off gate) + plan-overlay.js + plan-md.mjs (markdown→HTML) + gate-server.mjs (shared gate primitives), resolve-skill.mjs (→ bundle), lint.mjs (runs the add-in's engine)
101
154
  │ ├── pptx/ host-free local-.pptx support (fflate-based): read-local.mjs (read a file's slides — output-identical to the host read), slide-swap.mjs (fold a picked slide into a deck as native .pptx — swaps it into the lowest slot the splicer reads, then prunes the package to that slide's dependency closure so a slice carries only what it needs), zip.mjs + ooxml.mjs (shared unzip/order helpers)
102
155
  │ └── installers/ per-harness installers: claude.mjs, codex.mjs, opencode.mjs, lib.mjs
@@ -128,22 +181,40 @@ slidemind push <deck> # render + push slides into a running PowerPo
128
181
  slidemind ls engines # list the live engine catalog (image + slide; --type/--subtype) (HOST REQUIRED)
129
182
  slidemind search "<query>" # search an engine for imagery or slides (--engine/--intent/--top) (HOST REQUIRED)
130
183
  slidemind insert-slide [opts] # reuse found slide(s) live into a window (--search/--pick/--to/--at) (HOST REQUIRED)
131
- slidemind imagen "<prompt>" [opts] # generate ONE image via the add-in's image model into <deck>/assets/ (--deck/--out/--size/--quality/--brand-style; paired backend, pane-free)
184
+ slidemind imagen "<prompt>" [opts] # generate ONE image via the add-in's image model into <deck>/assets/ (--deck/--out/--size/--quality/--brand-style; connected backend, pane-free)
185
+ slidemind setup <claim> # one-command onboarding from the add-in's Connect CLI button: redeem the claim + npm install -g + skills + ready (--for/--no-install/--no-ready/--json)
132
186
  slidemind add-slide [opts] # fold slide(s) into a deck as native .pptx — from an engine (--search/--pick/--deck/--to/--at; HOST REQUIRED) or a local file (--from <file.pptx>/--pick/--deck/--at; host-free, mutually exclusive with --search)
133
- slidemind pair <code> # pair with an add-in environment (copy from its "Connect CLI")
134
- slidemind whoami # list every paired environment (* = default)
187
+ slidemind whoami # list every connected environment (* = default)
135
188
  slidemind use <url|env> # set the default environment
136
189
  slidemind logout [url|env] # unpair one environment (--all unpairs every one)
137
- slidemind init --for <target> # install skill into claude | codex | opencode | all (also clears the bundle cache)
190
+ slidemind init --for <target> # install skill into claude | codex | opencode | all | auto (also clears the bundle cache); `setup` already does this
138
191
  slidemind uninstall --for <target> # remove the skill (also clears the bundle cache)
139
192
  ```
140
193
 
141
194
  `<deck>` resolves as: absolute path → `./<arg>` if it exists → `./decks/<arg>`. The decks directory is `./decks/` by default; override with `SLIDEMIND_DECKS=/abs/path`.
142
195
 
143
- **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*.
196
+ **Multi-environment sessions.** 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). Connect once per environment (local / dev / prod) and every command **fans out** across all connected backends, tags each open window with its `env`, and **routes by the presentation's origin backend** automatically — no manual switching. Adding an environment is easiest with `slidemind setup <claim> --no-install --for none` — the claim carries its own backend, so nothing has to be typed or configured. There is no other way in: without a claim the CLI has no backend to talk to. Later commands may scope an existing session with `--backend <url|env>` / `SLIDEMIND_BACKEND`. A normal user connects exactly one backend.
144
197
 
145
198
  **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, brand imagery comes from the add-in's engine, and slide reuse (extract / insert / splice) executes in the add-in too. So `create`/`build-pptx`/`push`/`ls engines`/`search`/`insert-slide`/`add-slide` all hard-require an **open PowerPoint host with the slidemind add-in and an active corporate design**. The engine-search + slide-reuse wire contract is in `docs/slidemind-cli-connect/11-engine-search-slide-reuse.md`; see `docs/slidemind-cli-connect/` for the rest.
146
199
 
200
+ ## External skill packs (this repo ships none)
201
+
202
+ Some decks build from a **template pack** (`mode: "fill-template"` in the pack's `skill.json`) rather than from the design bundle. Those packs are distributed privately, on their own — as a harness plugin, an admin-pushed workspace skill, or a hand-installed directory. **This package must never carry, name, or hardcode anything from one.** No layout component names, no template file names, no master-fixed titles, no client names. `src/pptx/fill/` is generic machinery; every pack-specific fact is read from the pack:
203
+
204
+ | Fact | Read from |
205
+ |---|---|
206
+ | semantic name → shape id | `fields.json` |
207
+ | repeat groups | `repeats.json` |
208
+ | immutable tables, hygiene deletions, freeform placeholders | `skill.json` `policy` |
209
+ | layout component naming | `skill.json` `components` — `{ canonical, localized }`, regex sources; `canonical` group 1 is the slide number, `localized` group 1 the locale and group 2 the number |
210
+ | template-fixed slide titles | `skill.json` `policy.fixedTitles` — `{ <locale>: [{ stem, title }] }`, `stem` a case-insensitive regex on the slide file stem |
211
+
212
+ A pack that declares no `components.canonical` fails loudly in `layoutNumber()` — returning null instead would silently demote every master-backed slide to freeform and build a deck that quietly lost its template.
213
+
214
+ Packs resolve through `locateSkillDir()` (`src/builders/resolve-skill.mjs`): `$SLIDEMIND_SKILLS_DIR/<name>` → `~/.config/slidemind/skills/<name>` → `<package>/skills/<name>` → the **harness** skill and plugin dirs (`~/.claude`, `~/.codex`, opencode; both `<name>` and `slidemind-<name>`). That last tier is what makes every distribution channel work — a plugin or admin upload lands the pack in a harness directory, never in ours — and it ranks *after* the package so this CLI's own skills are never shadowed by a stale copy.
215
+
216
+ Pack-dependent integration tests belong in the pack's own repo, not here.
217
+
147
218
  ## Design system ground rules
148
219
 
149
220
  The corporate design is **served by the add-in, not shipped by the CLI.** `slidemind download-bundle` materializes it (keyed by the deck's `.bundle-ref.json`) into `${XDG_CACHE_HOME:-~/.cache}/slidemind/bundles/<presFP>/`:
package/README.md CHANGED
@@ -21,6 +21,8 @@ Both drive the same add-in bridge, so an agent and a human end up producing the
21
21
 
22
22
  - [Requirements](#requirements)
23
23
  - [Install](#install)
24
+ - [One command (recommended)](#one-command-recommended)
25
+ - [Manual install](#manual-install)
24
26
  - [Windows](#windows)
25
27
  - [macOS](#macos)
26
28
  - [Linux](#linux)
@@ -47,19 +49,45 @@ Both drive the same add-in bridge, so an agent and a human end up producing the
47
49
  | **PowerPoint** | Microsoft 365, PowerPoint 2021/2019/2016, or PowerPoint on the web — anything that loads Office Add-ins. |
48
50
  | **OS** | Windows, macOS, or Linux. See per-OS notes below. |
49
51
 
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.
52
+ 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** — connect it once and commands route to wherever your add-in is registered.
51
53
 
52
- Commands that read the design, render, push, or reach an engine (`ready`, `download-bundle`, `build-pptx`, `push`, `ls engines`, `search`, `insert-slide`, `add-slide`) **require an open PowerPoint host with the add-in and an active corporate design.** `build`, `review`, and `view-draft` work fully offline against a previously materialized bundle. Reading a local PowerPoint file (`read <file.pptx>`) or folding a slide from one into a deck (`add-slide --from <file.pptx>`) is host-free too — no PowerPoint, no pairing, no bundle needed. `new` scaffolds offline too; when you're paired and a design is open it also best-effort binds the new deck (otherwise it just scaffolds and hints to run `slidemind ready <slug>`).
54
+ Commands that read the design, render, push, or reach an engine (`ready`, `download-bundle`, `build-pptx`, `push`, `ls engines`, `search`, `insert-slide`, `add-slide`) **require an open PowerPoint host with the add-in and an active corporate design.** `build`, `review`, and `view-draft` work fully offline against a previously materialized bundle. Reading a local PowerPoint file (`read <file.pptx>`) or folding a slide from one into a deck (`add-slide --from <file.pptx>`) is host-free too — no PowerPoint, connection, or bundle needed. `new` scaffolds offline too; when you're connected and a design is open it also best-effort binds the new deck (otherwise it just scaffolds and hints to run `slidemind ready <slug>`).
53
55
 
54
56
  ---
55
57
 
56
58
  ## Install
57
59
 
58
- The package is published to **public npm** as [`slidemind`](https://www.npmjs.com/package/slidemind). The same two commands work on every platform:
60
+ ### One command (recommended)
61
+
62
+ In PowerPoint, open the **slidemind add-in** → **Settings → General → Connect CLI** → **Set up CLI**, and copy the command it shows. Paste it into your terminal:
63
+
64
+ ```bash
65
+ npx --yes slidemind@latest setup smc1_…
66
+ ```
67
+
68
+ That single command installs slidemind globally, connects it to your account, deploys the skills into every coding agent it finds on this machine, and runs the first readiness check. **There is no `slidemind init` step** — setup detects Claude Code, Codex, and opencode itself (by their config directory *or* their command on your `PATH`, so a freshly installed agent you have not opened yet still counts), and skips any harness whose slidemind plugin already supplies the skills. The only prerequisite is **Node 18+**; you never type a backend address.
69
+
70
+ If it reports *no coding agent found* — or you install one later — run `slidemind init --for auto` to deploy the skills then.
71
+
72
+ The copied command carries a one-time claim that works once and expires after about 10 minutes. Copy a fresh one if it lapses.
73
+
74
+ Flags, if you need them: `--for <claude|codex|opencode|all|auto|none>` overrides harness detection (`auto` is the default; `none` skips skills entirely), `--no-install` skips the global npm install, `--no-ready` skips the closing readiness check.
75
+
76
+ ### Manual install
77
+
78
+ If your organization distributes the Codex plugin through the admin console, the skills are already present and you only install the CLI binary:
79
+
80
+ ```bash
81
+ npm install -g slidemind
82
+ ```
83
+
84
+ Do not run `slidemind init` for an admin- or plugin-installed skill; that would create a second copy. The package is published to **public npm** as [`slidemind`](https://www.npmjs.com/package/slidemind).
85
+
86
+ For a standalone/manual install, add the skills after installing the CLI:
59
87
 
60
88
  ```bash
61
89
  npm install -g slidemind
62
- slidemind init --for all # deploy the skill into Claude Code / Codex / opencode
90
+ slidemind init --for auto # deploy the skill into every coding agent found here
63
91
  ```
64
92
 
65
93
  Then confirm it's on your `PATH`:
@@ -68,7 +96,7 @@ Then confirm it's on your `PATH`:
68
96
  slidemind --version
69
97
  ```
70
98
 
71
- `slidemind init --for <claude|codex|opencode|all|none>` scopes the harness deployment. Use `none` to install the CLI only.
99
+ `slidemind init --for <claude|codex|opencode|all|auto>` scopes the harness deployment; `auto` picks every coding agent found on this machine. You only need `init` if you installed the CLI by hand or added a new coding agent later — the one-command setup above already does it.
72
100
 
73
101
  > **Heads-up — first install downloads a headless Chrome.** slidemind renders decks by capturing slides with a local headless browser (then assembling the `.pptx` server-side), so `npm install -g slidemind` pulls a pinned Chromium (~150–300 MB) via `puppeteer`'s postinstall. Behind a corporate proxy/firewall this download can fail; set `HTTPS_PROXY` (and, if needed, `PUPPETEER_DOWNLOAD_BASE_URL`) so npm can reach it, or point `PUPPETEER_EXECUTABLE_PATH` at an existing Chrome/Edge. The browser lives in puppeteer's own cache, not the slidemind package.
74
102
 
@@ -81,7 +109,7 @@ slidemind runs on native Windows (PowerShell, Windows Terminal, or cmd) — no W
81
109
 
82
110
  ```powershell
83
111
  npm install -g slidemind
84
- slidemind init --for all
112
+ slidemind init --for auto
85
113
  slidemind --version
86
114
  ```
87
115
 
@@ -96,7 +124,7 @@ The global install lands in `%APPDATA%\npm`, which the Node installer puts on yo
96
124
 
97
125
  ```bash
98
126
  npm install -g slidemind
99
- slidemind init --for all
127
+ slidemind init --for auto
100
128
  slidemind --version
101
129
  ```
102
130
 
@@ -108,7 +136,7 @@ npm config set prefix ~/.npm-global
108
136
  echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.zshrc
109
137
  source ~/.zshrc
110
138
  npm install -g slidemind
111
- slidemind init --for all
139
+ slidemind init --for auto
112
140
  ```
113
141
 
114
142
  Credentials are stored under `~/.config/slidemind/`.
@@ -119,7 +147,7 @@ The CLI runs fine on Linux. There's no PowerPoint desktop on Linux, so you'll co
119
147
 
120
148
  ```bash
121
149
  npm install -g slidemind
122
- slidemind init --for all
150
+ slidemind init --for auto
123
151
  slidemind --version
124
152
  ```
125
153
 
@@ -133,18 +161,24 @@ Run any command without installing globally:
133
161
  npx slidemind <command>
134
162
  ```
135
163
 
164
+ Note that npx only *runs* the package from its cache — it never installs it. That is why the one-command setup above goes through `npx --yes slidemind@latest setup …`: the bootstrap runs from the cache and then performs the persistent `npm install -g` itself.
165
+
136
166
  ### Install as a plugin (Claude Code / Codex)
137
167
 
138
- Both harnesses can install slidemind as a **plugin** from this repo's marketplace instead of the two-command npm flow. The repo is private, so the one-time `marketplace add` uses your existing GitHub credentials (`gh auth login`, a git credential helper, or SSH).
168
+ Both harnesses can install slidemind as a **plugin** instead of the two-command npm flow.
139
169
 
140
- **Claude Code — fully self-contained (no `npm install -g` needed):**
170
+ **Claude Code — fully self-contained (no `npm install -g`, no GitHub account):**
141
171
 
142
172
  ```
143
- /plugin marketplace add STATWORX/intern-slidemind-cli
173
+ /plugin marketplace add https://unpkg.com/slidemind/.claude-plugin/marketplace.json
144
174
  /plugin install slidemind@slidemind
145
175
  ```
146
176
 
147
- The plugin ships both skills *and* the CLI: under the hood Claude Code installs the public npm package and puts `slidemind` on `PATH` inside its sessions (the headless-Chrome heads-up above applies to this install too). Outside Claude Code sessions the command is not on your `PATH` — add the global install if you also want to drive the CLI by hand. Updates ship with every release; apply them via `/plugin`. If background marketplace refreshes fail against the private repo, use SSH for the marketplace add or set `CLAUDE_CODE_PLUGIN_KEEP_MARKETPLACE_ON_FAILURE=1`.
177
+ The marketplace is served straight out of the published npm package — the tarball ships `.claude-plugin/marketplace.json`, and an npm CDN serves it over plain HTTPS. Nothing here needs repo access, and it follows releases automatically (no version in the URL, no version pin in the plugin entry). `https://cdn.jsdelivr.net/npm/slidemind/.claude-plugin/marketplace.json` works the same way.
178
+
179
+ The plugin ships both skills *and* the CLI: Claude Code installs the public npm package and puts `slidemind` on `PATH` inside its sessions (the headless-Chrome heads-up above applies to this install too). Outside Claude Code sessions the command is not on your `PATH` — add the global install if you also want to drive the CLI by hand. Apply updates via `/plugin`.
180
+
181
+ > `/plugin marketplace add STATWORX/intern-slidemind-cli` also works if you have read access to the repo, but the URL above is preferred — it needs no credentials. If background refreshes ever fail against the private repo, use SSH or set `CLAUDE_CODE_PLUGIN_KEEP_MARKETPLACE_ON_FAILURE=1`.
148
182
 
149
183
  **Codex — skills via plugin, CLI via npm:**
150
184
 
@@ -153,7 +187,7 @@ codex plugin marketplace add STATWORX/intern-slidemind-cli
153
187
  codex plugin add slidemind@slidemind
154
188
  ```
155
189
 
156
- Codex plugins carry the skills only — the CLI still comes from `npm install -g slidemind` (the skills walk you through it if it's missing). `slidemind init --for codex` remains the most robust path; it additionally writes an `~/.codex/AGENTS.md` pointer.
190
+ Codex plugins carry the skills only — the CLI still comes from `npm install -g slidemind` (the skills walk you through it if it's missing). Codex clones the repo for this, so it needs read access; without it, get the skills from your workspace's Codex admin skill upload and the CLI from npm. `slidemind init --for codex` remains the most robust path; it additionally writes an `~/.codex/AGENTS.md` pointer.
157
191
 
158
192
  > Already ran `slidemind init` and switching to a plugin? Drop the copied skills once with `slidemind uninstall --for claude` (or `--for codex`) so they don't duplicate the plugin's.
159
193
 
@@ -161,25 +195,34 @@ Codex plugins carry the skills only — the CLI still comes from `npm install -g
161
195
 
162
196
  ## Connect to PowerPoint
163
197
 
164
- The CLI talks to PowerPoint through the add-in's cloud relay, so you pair once per machine.
198
+ Connecting starts **in PowerPoint**, because that is where slidemind already knows both who you are and which slidemind deployment you belong to. A freshly installed CLI knows neither — every organization runs its own backend, so there is no address it could guess.
165
199
 
166
- 1. In PowerPoint, open the **slidemind add-in** task pane → **Settings → General → Connect CLI**, and press **Pair**.
167
- 2. It shows a one-time command (it expires in ~10 min — press **Pair** again for a fresh one). Copy and run it:
200
+ ### Copy one command (recommended)
168
201
 
169
- ```bash
170
- slidemind pair <code>
171
- ```
202
+ 1. In PowerPoint, open the **slidemind add-in** task pane → **Settings → General → Connect CLI** → **Set up CLI**.
203
+ 2. Press **Copy command** and paste it into your terminal.
204
+ 3. Done. The add-in flips to *Connected* on its own, and the CLI continues into its readiness check — no add-in restart, no backend URL, nothing else to confirm.
172
205
 
173
- 3. **Restart the add-in once.** Pairing turns CLI integration on, but the task pane that's already running may not pick up the connection — so close the slidemind task pane and reopen it from the ribbon (if needed, reopen the presentation). The wizard doesn't prompt for this, but a freshly-booted pane is what registers your window with the CLI.
206
+ This is the same command shown under [Install](#one-command-recommended): it works whether or not slidemind is already installed, and re-running it later connects an additional machine.
174
207
 
175
- 4. Verify the link:
208
+ ### Already installed?
176
209
 
177
- ```bash
178
- slidemind whoami # lists the paired environment(s)
179
- slidemind presentations # lists open PowerPoint windows the add-in sees
180
- ```
210
+ Same panel, same claim — press **CLI already installed?** and it swaps the copied line to the short form, skipping the npx bootstrap:
211
+
212
+ ```bash
213
+ slidemind setup smc1_…
214
+ ```
215
+
216
+ It does exactly the same work: connect, refresh the skills, run `ready`. Add `--no-install --for none` if you want the connection alone and nothing touched.
217
+
218
+ Either way, verify with:
219
+
220
+ ```bash
221
+ slidemind whoami # lists connected environment(s)
222
+ slidemind presentations # lists open PowerPoint windows the add-in sees
223
+ ```
181
224
 
182
- If `slidemind presentations` is empty even though PowerPoint is open with the add-in and an active corporate design, restart the add-in (step 3) and retry.
225
+ A setup command works once and expires after about 10 minutes; copy a fresh one from the add-in if that happens.
183
226
 
184
227
  ```bash
185
228
  slidemind logout # unpair this machine
@@ -255,11 +298,14 @@ slidemind download-bundle [deck] Materialize the active corporate design locally
255
298
  slidemind presentations List PowerPoint windows registered with the add-in
256
299
  slidemind read [presId|file.pptx] Read an open presentation (presId; host required) or a local .pptx on disk (file path; host-free)
257
300
  --mode summary|raw (default raw) [--to <presId>] [--json]
258
- slidemind pair <code> Pair with an add-in (copy the code from "Connect CLI")
259
- slidemind whoami Show paired environment(s)
301
+ slidemind setup <claim> One-command onboarding: connect + global install + skills + ready
302
+ --for <target> --no-install --no-ready --json
303
+ slidemind whoami Show connected environment(s)
260
304
  slidemind use <url|env> Set the default environment
261
305
  slidemind logout [url|env] Unpair an environment (--all unpairs every one)
262
306
  slidemind init --for <target> Install the skill into a harness (clears the bundle cache)
307
+ <target> = claude | codex | opencode | all | auto (every harness found here)
308
+ Not needed after `setup` — only when adding a coding agent later
263
309
  slidemind uninstall --for <t> Remove a previously-installed skill (clears the bundle cache)
264
310
  slidemind update [--for <t>] Fetch the latest release and redeploy
265
311
  slidemind --help Full usage
@@ -305,20 +351,20 @@ slidemind push my-deck --slides 02,05,07 # push only a subset of source slides
305
351
 
306
352
  ## Multiple environments (for slidemind developers)
307
353
 
308
- 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.
354
+ If you run the add-in against more than one backend (local / dev / prod), the CLI is **multi-environment**: connect 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.
309
355
 
310
356
  ```bash
311
- slidemind pair <local-code> --label local
312
- slidemind pair <dev-code> --label dev
313
- slidemind whoami # lists every paired environment (* = default)
357
+ slidemind setup <claim-from-local-add-in> --no-install --for none # each claim carries its own backend
358
+ slidemind setup <claim-from-dev-add-in> --no-install --for none
359
+ slidemind whoami # lists every connected environment (* = default)
314
360
  slidemind presentations # windows from all environments, each tagged [env]
315
361
  slidemind push my-deck --to <presId> # routed to whichever environment owns that window
316
362
  slidemind use dev # set the default environment
317
- slidemind logout dev # unpair one (or --all to unpair every one)
363
+ slidemind logout dev # disconnect one (or --all to disconnect every one)
318
364
  slidemind --backend local presentations # scope a single command to one environment
319
365
  ```
320
366
 
321
- 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.
367
+ `setup` is the easiest way to add an environment because the claim carries its backend — that is exactly the fact the CLI cannot otherwise know. `--no-install --for none` keeps it to the connection alone, leaving your existing binary and skills untouched. Because the claim carries the backend, there is no environment to select and no URL to configure — the CLI hardcodes no backend at all. Once connected, sessions stay per-environment and routing is automatic. A normal user connects one environment.
322
368
 
323
369
  ---
324
370
 
@@ -330,7 +376,7 @@ slidemind update --ref 0.1.0 # pin a specific version
330
376
  slidemind update --for codex # redeploy into one harness (--for none to skip)
331
377
  ```
332
378
 
333
- Equivalently: `npm install -g slidemind@latest && slidemind init --for all`.
379
+ Equivalently: `npm install -g slidemind@latest && slidemind init --for auto`.
334
380
 
335
381
  ---
336
382
 
@@ -340,9 +386,11 @@ Equivalently: `npm install -g slidemind@latest && slidemind init --for all`.
340
386
  |---|---|
341
387
  | `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`. |
342
388
  | PowerShell: *running scripts is disabled* | npm's `.ps1` shim hit the execution policy. Use `slidemind.cmd <command>`, or `Set-ExecutionPolicy -Scope CurrentUser RemoteSigned`. |
343
- | A command can't reach PowerPoint (empty `presentations`, "no host", nothing seems connected) | Run **`slidemind ready`** — it checks pairing, the connection, the CLI version, and open windows in one shot and prints the single next step to take (open PowerPoint / click the pane / pair / update). |
344
- | `slidemind presentations` is empty right after pairing (PowerPoint + add-in already open) | The just-paired task pane never registered. **Restart the add-in** — close the slidemind task pane and reopen it from the ribbon (or reopen the presentation). The pairing wizard doesn't prompt for this. |
345
- | `Not paired` | In the add-in, open **Settings → General → Connect CLI**, press **Pair**, and run the shown `slidemind pair <code>`. Codes are one-time and expire — generate a fresh one if it's stale. |
389
+ | A command can't reach PowerPoint (empty `presentations`, "no host", nothing seems connected) | Run **`slidemind ready`** — it checks the secure connection, backend, CLI version, and open windows in one shot and prints the single next step to take. |
390
+ | `slidemind presentations` is empty immediately after approval | Bring PowerPoint forward and click the slidemind pane once; its authenticated relay reconnects and registers automatically. Reopen the pane only if the Office webview itself is suspended. |
391
+ | `Not connected` / `not_connected` | In **PowerPoint → slidemind → Settings → General → Connect CLI**, press the link button and run the command it shows. |
392
+ | `this setup command has already been used or has expired` | A setup claim works exactly once and lasts ~10 minutes. Copy a fresh one from **Connect CLI → Set up CLI**. |
393
+ | `this slidemind add-in is too old for one-command setup` | That deployment predates the setup route and must be updated before this CLI can connect to it. |
346
394
  | `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. |
347
395
  | `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 run `mkdir -p ~/.npm-global && npm config set prefix ~/.npm-global`, add `~/.npm-global/bin` to `PATH`, then retry. |
348
396
 
Binary file