slidemind 0.0.27
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-plugin/plugin.json +23 -0
- package/CLAUDE.md +137 -0
- package/README.md +100 -0
- package/bin/slidemind.mjs +603 -0
- package/package.json +62 -0
- package/skills/create-slides/SKILL.md +108 -0
- package/src/bridge/build-and-push.mjs +232 -0
- package/src/bridge/bundle.mjs +373 -0
- package/src/bridge/client.mjs +338 -0
- package/src/builders/build.mjs +724 -0
- package/src/builders/lint-slides.mjs +796 -0
- package/src/builders/primitives.json +19 -0
- package/src/builders/resolve-skill.mjs +205 -0
- package/src/builders/runtime-applier.js +275 -0
- package/src/installers/brand-theme.mjs +38 -0
- package/src/installers/claude.mjs +141 -0
- package/src/installers/codex.mjs +229 -0
- package/src/installers/lib.mjs +435 -0
- package/src/installers/opencode.mjs +181 -0
- package/src/installers/tui.mjs +125 -0
- package/src/mcp/recolor.mjs +111 -0
- package/src/mcp/server.mjs +476 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "slidemind",
|
|
3
|
+
"version": "0.0.24",
|
|
4
|
+
"description": "Connect Claude Code, Codex & opencode to the slidemind PowerPoint add-in to build and edit native, on-brand PowerPoint decks against the active corporate design.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "statworx"
|
|
7
|
+
},
|
|
8
|
+
"homepage": "https://github.com/STATWORX/intern-slidemind-cli",
|
|
9
|
+
"keywords": [
|
|
10
|
+
"presentation",
|
|
11
|
+
"slides",
|
|
12
|
+
"powerpoint",
|
|
13
|
+
"office-addin",
|
|
14
|
+
"slidemind"
|
|
15
|
+
],
|
|
16
|
+
"skills": "./skills",
|
|
17
|
+
"mcpServers": {
|
|
18
|
+
"slidemind": {
|
|
19
|
+
"command": "node",
|
|
20
|
+
"args": ["${CLAUDE_PLUGIN_ROOT}/src/mcp/server.mjs"]
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
+
|
|
5
|
+
## Project purpose
|
|
6
|
+
|
|
7
|
+
This repository (`STATWORX/intern-slidemind-cli`) publishes **slidemind** — the companion npm package and Claude Code / Codex / opencode plugin for the **slidemind PowerPoint add-in** (coming to the Microsoft Office Store). It connects a coding agent to a running PowerPoint over the add-in's local bridge so the agent can build and edit native, on-brand `.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, not here.
|
|
8
|
+
|
|
9
|
+
The package contains two layers:
|
|
10
|
+
|
|
11
|
+
1. **An installable skill** (canonical markdown + assets) that ships into a coding-agent harness so the agent knows how to plan, compose, and review slides on-brand — reading every brand rule from the add-in's design bundle.
|
|
12
|
+
2. **A Node CLI + MCP server** (`slidemind`) that exposes the add-in bridge (render `.pptx`, push slides into an open window, search the brand engine) to the user and the agent directly.
|
|
13
|
+
|
|
14
|
+
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.
|
|
15
|
+
|
|
16
|
+
## Distribution
|
|
17
|
+
|
|
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
|
+
|
|
20
|
+
Install + register with a harness:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm install -g slidemind
|
|
24
|
+
slidemind init --for all # claude | codex | opencode | all | none
|
|
25
|
+
```
|
|
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/ CLAUDE.md README.md`); `archive/`, `docs/`, `scripts/`, and `test/` are excluded.
|
|
28
|
+
|
|
29
|
+
> The previous account-free channel (a private Azure Blob container + shared read SAS + `scripts/install.sh` curl-bootstrap) has been **retired** — see `archive/scripts/install.sh`. npm is the sole channel now.
|
|
30
|
+
|
|
31
|
+
## Releasing
|
|
32
|
+
|
|
33
|
+
Releases are **automatic on every push to `main`**. The workflow at `.github/workflows/release.yml` runs and:
|
|
34
|
+
|
|
35
|
+
1. If `package.json`'s version was manually bumped (and no tag exists for that version yet) → tags THAT version.
|
|
36
|
+
2. Otherwise → bumps the patch by 1, commits the bumped `package.json` back to `main`, then tags the new version. (No infinite loop: GitHub doesn't trigger workflows from commits made with the default `GITHUB_TOKEN`, and the workflow also skips if the actor is `github-actions[bot]`.)
|
|
37
|
+
3. In both cases → creates a GitHub Release with auto-generated notes, then **`npm publish --access public`**.
|
|
38
|
+
|
|
39
|
+
The publish step is gated on the `NPM_TOKEN` repo secret (an npm automation token with publish rights to `slidemind`): until it's set the workflow warns and skips publish (so tagging/releases keep working during rollout); once set, a publish failure fails the build. So most of the time you just merge to `main` and a new patch release falls out to npm.
|
|
40
|
+
|
|
41
|
+
For a **minor or major** bump, run the local helper before pushing:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
node scripts/release.mjs --minor # 0.0.1 -> 0.1.0
|
|
45
|
+
node scripts/release.mjs --major # 0.0.1 -> 1.0.0
|
|
46
|
+
node scripts/release.mjs 0.5.0 # explicit
|
|
47
|
+
node scripts/release.mjs --minor --dry-run
|
|
48
|
+
git push # workflow tags + releases
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The script bumps `package.json` and commits — it does not tag (CI does that). It refuses to run on a dirty tree.
|
|
52
|
+
|
|
53
|
+
Teammates pick up the release with `npm install -g slidemind@latest` (or `slidemind update` if already installed); pin with `slidemind@X.Y.Z` / `slidemind update --ref X.Y.Z`.
|
|
54
|
+
|
|
55
|
+
> **One-time GitHub setup:** the workflow uses the default `GITHUB_TOKEN`. If branch-protection rules on `main` block bot pushes, allow the `github-actions[bot]` actor (or relax "require pull request before merging" for that bot).
|
|
56
|
+
|
|
57
|
+
## Repository layout
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
slidemind/
|
|
61
|
+
├── package.json npm package metadata, single bin: slidemind
|
|
62
|
+
├── README.md end-user quickstart
|
|
63
|
+
├── CLAUDE.md this file
|
|
64
|
+
├── .claude-plugin/
|
|
65
|
+
│ └── plugin.json Claude Code plugin manifest
|
|
66
|
+
├── bin/
|
|
67
|
+
│ └── slidemind.mjs CLI dispatcher (presentations, download-bundle, init, build, build-pptx, push, search, install)
|
|
68
|
+
├── skills/ canonical, installable skill payload — thin CLI workflow glue only
|
|
69
|
+
│ └── create-slides/
|
|
70
|
+
│ └── SKILL.md the whole skill: host gate + intake/plan + create flow + CLI⇄in-app command map.
|
|
71
|
+
│ Brand AND the authoring workflow craft (create/edit/composition/layouts/
|
|
72
|
+
│ authoring/build-export) are READ from the materialized bundle — owned by the add-in.
|
|
73
|
+
├── src/ implementation of the slidemind CLI
|
|
74
|
+
│ ├── bridge/ add-in local-bridge: client.mjs, bundle.mjs (materialize), build-and-push.mjs (server render)
|
|
75
|
+
│ ├── builders/ build.mjs (HTML preview), resolve-skill.mjs (→ bundle), primitives.json (fallback)
|
|
76
|
+
│ ├── mcp/ MCP server: list/push + slidemind_search_engine / slidemind_download_result
|
|
77
|
+
│ └── installers/ per-harness installers: claude.mjs, codex.mjs, opencode.mjs, lib.mjs
|
|
78
|
+
├── archive/ retired code/assets (local exporter, icon library, brand design files) — NOT shipped
|
|
79
|
+
├── decks/ the user's working decks; sources are slides/*.jsx, design via .bundle-ref.json
|
|
80
|
+
├── docs/slidemind-cli-connect/ the connect architecture (bridge contract, bundle, engine, phasing)
|
|
81
|
+
└── test/ node:test suites (bridge client/bundle/build-and-push/resolve-skill/lint/packaging)
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
The skill at the **root** of `skills/` is deliberate: that's the layout Claude Code, Codex (0.128+), and opencode all expect for skill auto-discovery — `<harness-root>/skills/<name>/SKILL.md`. There's a single skill (`create-slides`); it gets copied into each harness as `slidemind-create-slides` and owns the user-facing plan / create / edit / render workflow. It is **brand-agnostic** — every brand rule lives in the per-CD bundle's `design.md`, which the skill points the agent at. (Pre-skills opencode versions used an `agent/` shim under `~/.config/opencode/`; the installer removes any leftover from those installs on every run.)
|
|
85
|
+
|
|
86
|
+
We **do not** ship separate slash commands. Earlier versions had a top-level `commands/` directory that became `/slidemind:plan` etc. on Claude Code and `~/.codex/prompts/slidemind-*.md` on Codex. The Codex prompts mechanism is broken in 0.117+ ([openai/codex#15941](https://github.com/openai/codex/issues/15941)) and officially deprecated in favour of skills, so we collapsed everything into the skill itself. Re-running `slidemind init` actively wipes legacy command/prompt entries on every harness.
|
|
87
|
+
|
|
88
|
+
## CLI surface
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
slidemind presentations # list PowerPoint windows registered with the add-in
|
|
92
|
+
slidemind download-bundle [deck] # materialize the active corporate design's bundle locally
|
|
93
|
+
slidemind new <name> # scaffold ./decks/<name>/
|
|
94
|
+
slidemind build <deck> # build self-contained HTML preview
|
|
95
|
+
slidemind build-pptx <deck> # render native .pptx via the add-in (HOST REQUIRED)
|
|
96
|
+
slidemind push <deck> # render + push slides into a running PowerPoint (HOST REQUIRED)
|
|
97
|
+
slidemind search "<query>" # search the brand engine for imagery (HOST REQUIRED)
|
|
98
|
+
slidemind init --for <target> # install skill into claude | codex | opencode | all
|
|
99
|
+
slidemind uninstall --for <target>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
`<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
|
+
|
|
104
|
+
**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
|
+
|
|
106
|
+
## Design system ground rules
|
|
107
|
+
|
|
108
|
+
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>/`:
|
|
109
|
+
|
|
110
|
+
- `design.md` — the **single source of brand rules** (tokens, type scale, layout palette, the authoring contract, and a `### Brand Image Sources` block). **Read it; never restate it.**
|
|
111
|
+
- `corporate-design.css` — the design tokens to link/inline and compose with token classes.
|
|
112
|
+
- `layouts/*.jsx` + `layouts/layouts.css` — the closed layout palette to compose against.
|
|
113
|
+
- `assets/`, `engines.json` — brand assets and the searchable image/icon engines.
|
|
114
|
+
|
|
115
|
+
The skill is **brand-agnostic workflow guidance** and must not duplicate any brand rule — `scripts/check-skill-parity.mjs` (`npm run lint:parity`) fails the build if a hardcoded color, design token, or layout name leaks into a skill doc.
|
|
116
|
+
|
|
117
|
+
## Sanity rules when editing slides
|
|
118
|
+
|
|
119
|
+
- One default export per slide file, composing one bundle layout (Mode A) or a blank-content layout with freeform `children` (Mode B) — exactly as the bundle's `design.md` prescribes. No imports — layouts are globals in slide scope at build time.
|
|
120
|
+
- No hardcoded colors, sizes, or fonts in slide files. Everything goes through the tokens in the bundle's `corporate-design.css`.
|
|
121
|
+
- **Never add a layout.** The layout palette is the closed set in `<bundle>/layouts/` — read-only. Need markup a layout doesn't expose? Build it as Mode B children of the blank-content layout the bundle's `design.md` names — never a new layout file.
|
|
122
|
+
- Re-run `slidemind push <deck>` (or `build-pptx`) after any `.jsx` change — the .pptx is rendered server-side, not edited by hand; the HTML preview is generated.
|
|
123
|
+
- For generic concept icons/images, use the brand engine: `slidemind_search_engine` → pick a result → `slidemind_download_result` (writes into the deck's `assets/`). Don't invent SVGs. The full authoring workflow is read from the materialized bundle's `workflow/*.md` (owned by the add-in).
|
|
124
|
+
|
|
125
|
+
## Build commands (terse reference)
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
slidemind download-bundle <deck> # materialize the corporate design locally (do this first)
|
|
129
|
+
slidemind build <deck> # HTML preview (reads the materialized bundle)
|
|
130
|
+
slidemind build <deck> --open # HTML + open in browser
|
|
131
|
+
slidemind build-pptx <deck> # native PPTX rendered server-side via the add-in (host required)
|
|
132
|
+
slidemind push <deck> # render + push into a running PowerPoint (host required)
|
|
133
|
+
slidemind search "<query>" # search the brand engine for imagery (host required)
|
|
134
|
+
npm run lint:parity # assert the skill carries no brand rules (CI guard)
|
|
135
|
+
```
|
|
136
|
+
|
|
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.
|
package/README.md
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# slidemind
|
|
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.
|
|
4
|
+
|
|
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:
|
|
6
|
+
|
|
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
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
From public npm. macOS / Linux / Windows; requires **Node 18+**.
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install -g slidemind
|
|
16
|
+
slidemind init --for all # register the MCP server + skill into Claude Code / Codex / opencode
|
|
17
|
+
```
|
|
18
|
+
|
|
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`.
|
|
20
|
+
|
|
21
|
+
One-off, without a global install:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npx slidemind <command>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Updating
|
|
28
|
+
|
|
29
|
+
```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)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Equivalently: `npm install -g slidemind@latest && slidemind init --for all`.
|
|
36
|
+
|
|
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/).
|
|
38
|
+
|
|
39
|
+
## Quick start
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
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)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Decks live under `./decks/` in your current working directory. Each deck is one folder: `decks/<name>/slides/*.jsx`.
|
|
49
|
+
|
|
50
|
+
## Pushing slides into an open PowerPoint
|
|
51
|
+
|
|
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:
|
|
53
|
+
|
|
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
|
|
61
|
+
```
|
|
62
|
+
|
|
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.)
|
|
64
|
+
|
|
65
|
+
## Export formats at a glance
|
|
66
|
+
|
|
67
|
+
| Command | Output | When to use |
|
|
68
|
+
|---|---|---|
|
|
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 |
|
|
72
|
+
|
|
73
|
+
## Icon / image search
|
|
74
|
+
|
|
75
|
+
`slidemind search "<query>"` searches the active corporate design's **brand engine** (icons/images) over the local bridge — proxied to the open PowerPoint task pane, 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.
|
|
76
|
+
|
|
77
|
+
## Install into a coding-agent harness
|
|
78
|
+
|
|
79
|
+
Pick a target and run:
|
|
80
|
+
|
|
81
|
+
```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
|
|
86
|
+
```
|
|
87
|
+
|
|
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.
|
|
89
|
+
|
|
90
|
+
Add `--link` to symlink instead of copy (useful while hacking on slidemind itself).
|
|
91
|
+
|
|
92
|
+
To remove:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
slidemind uninstall --for <target>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Project layout
|
|
99
|
+
|
|
100
|
+
See [CLAUDE.md](./CLAUDE.md) for the full repo tour and the design-system ground rules.
|