playable-lessons 0.1.0 → 0.1.1

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.
Files changed (2) hide show
  1. package/README.md +74 -0
  2. package/package.json +10 -12
package/README.md ADDED
@@ -0,0 +1,74 @@
1
+ # Playable Lessons
2
+
3
+ Turn educational source material into **playable interactive fiction**. Paste in a case study, lecture notes, a methodology, or just a topic, and Playable Lessons uses AI to weave it into a branching [Ink](https://www.inklestudios.com/ink/) story that learners can play — then export it as a self-contained HTML file, an Ink/Twee source file, or a printable walkthrough.
4
+
5
+ It ships in two forms:
6
+
7
+ - **Desktop app** (Electron + React) — the full authoring experience: AI generation pipeline, node-graph editor, live player, and exports. Aimed at non-technical authors (e.g. educators).
8
+ - **CLI** (`playable-lessons`, on npm) — a headless tool for **validating and exporting** existing `.ink` files. Handy for scripts, CI, and batch export.
9
+
10
+ > **Note:** AI _generation_ currently lives in the desktop app only. The CLI does **not** generate stories or call any LLM — it validates and exports Ink you already have. (A headless `generate` command is on the roadmap.)
11
+
12
+ ---
13
+
14
+ ## CLI
15
+
16
+ ### Install
17
+
18
+ ```bash
19
+ npm install -g playable-lessons
20
+ ```
21
+
22
+ ### Validate an Ink file
23
+
24
+ ```bash
25
+ playable-lessons validate --input story.ink
26
+ ```
27
+
28
+ ### Export
29
+
30
+ ```bash
31
+ # Standalone playable HTML
32
+ playable-lessons export --input story.ink --output dist/ --format html --title "My Lesson"
33
+
34
+ # Compiled Ink JSON
35
+ playable-lessons export --input story.ink --output dist/ --format json
36
+
37
+ # Multiple formats at once
38
+ playable-lessons export -i story.ink -o dist/ -f html,json,ink
39
+ ```
40
+
41
+ | Format | Output |
42
+ | ------ | ------ |
43
+ | `html` | Self-contained player (`.html`) — works offline, share via LMS/email |
44
+ | `json` | Compiled Ink story JSON |
45
+ | `ink` | The raw Ink source (copied through) |
46
+
47
+ Run `playable-lessons --help` for all options.
48
+
49
+ ---
50
+
51
+ ## Desktop app (development)
52
+
53
+ ```bash
54
+ npm install --legacy-peer-deps
55
+ npm run dev # launch the Electron app with hot reload
56
+ npm run build # production build
57
+ npm run build:mac # / build:win / build:linux — package installers
58
+ npm run typecheck
59
+ npm test
60
+ ```
61
+
62
+ ### AI providers
63
+
64
+ The desktop app supports **Claude**, **OpenAI**, a local **Ollama**, and any **OpenAI-compatible endpoint** (remote Ollama, OpenRouter, LiteLLM, vLLM, …) via a base URL + bearer token. Model IDs are editable, with live model listing and a connection test. API keys are stored in your OS keychain (via Electron `safeStorage`), not in plain config.
65
+
66
+ ---
67
+
68
+ ## Tech stack
69
+
70
+ Electron + electron-vite · React 19 + TypeScript · Zustand · [inkjs](https://github.com/y-lohse/inkjs) (Ink compiler + runtime) · @xyflow/react (graph editor) · yargs (CLI).
71
+
72
+ ## License
73
+
74
+ MIT © michael-borck
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "playable-lessons",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Interactive Fiction Authoring Tool for Education — Generate playable branching stories from source material using AI + Ink",
5
5
  "main": "./out/main/index.mjs",
6
6
  "scripts": {
@@ -24,7 +24,7 @@
24
24
  "cli": "npx tsx src/cli/index.ts"
25
25
  },
26
26
  "bin": {
27
- "playable-lessons": "./out/cli/index.js"
27
+ "playable-lessons": "out/cli/index.js"
28
28
  },
29
29
  "files": [
30
30
  "out/cli/",
@@ -46,19 +46,13 @@
46
46
  "license": "MIT",
47
47
  "repository": {
48
48
  "type": "git",
49
- "url": "https://github.com/michael-borck/playable-lessons.git"
49
+ "url": "git+https://github.com/michael-borck/playable-lessons.git"
50
50
  },
51
51
  "homepage": "https://github.com/michael-borck/playable-lessons",
52
+ "comment:dependencies": "Runtime deps for the published CLI only. The GUI libraries (react, zustand, @xyflow/react, …) are devDependencies because Vite bundles them into the Electron renderer at build time, so they don't need to be installed by CLI consumers.",
52
53
  "dependencies": {
53
- "@xyflow/react": "^12.10.2",
54
54
  "inkjs": "^2.4.0",
55
- "jszip": "^3.10.1",
56
- "marked": "^17.0.5",
57
- "openai": "^6.33.0",
58
- "react": "^19.2.4",
59
- "react-dom": "^19.2.4",
60
- "yargs": "^18.0.0",
61
- "zustand": "^5.0.12"
55
+ "yargs": "^18.0.0"
62
56
  },
63
57
  "devDependencies": {
64
58
  "@types/node": "^25.5.0",
@@ -68,13 +62,17 @@
68
62
  "@typescript-eslint/eslint-plugin": "^8.57.2",
69
63
  "@typescript-eslint/parser": "^8.57.2",
70
64
  "@vitejs/plugin-react": "^6.0.1",
65
+ "@xyflow/react": "^12.10.2",
71
66
  "electron": "^41.1.0",
72
67
  "electron-builder": "^26.8.1",
73
68
  "electron-vite": "^5.0.0",
74
69
  "eslint": "^10.1.0",
70
+ "react": "^19.2.4",
71
+ "react-dom": "^19.2.4",
75
72
  "tsx": "^4.21.0",
76
73
  "typescript": "^6.0.2",
77
74
  "vite": "^8.0.3",
78
- "vitest": "^4.1.8"
75
+ "vitest": "^4.1.8",
76
+ "zustand": "^5.0.12"
79
77
  }
80
78
  }