@pep/term-deck 1.0.28 → 1.0.30

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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  A terminal-based presentation tool with a cyberpunk aesthetic. Create beautiful slideshows in your terminal with matrix rain backgrounds, glitch effects, and ASCII art.
4
4
 
5
- ![term-deck demo](https://img.shields.io/badge/bun-ready-pink?logo=bun)
5
+ ![npm version](https://img.shields.io/npm/v/@pep/term-deck?color=green)
6
6
  ![TypeScript](https://img.shields.io/badge/TypeScript-5.0-blue?logo=typescript)
7
7
  ![License](https://img.shields.io/badge/license-MIT-green)
8
8
 
@@ -16,79 +16,116 @@ A terminal-based presentation tool with a cyberpunk aesthetic. Create beautiful
16
16
 
17
17
  - 🌊 **Matrix Rain Background** - Animated katakana/symbol rain effects
18
18
  - ✨ **Glitch Reveal Animations** - Line-by-line scramble effects
19
- - 🎨 **5 Built-in Themes** - Matrix, Neon, Retro, Minimal, Hacker
19
+ - 🎨 **Built-in Themes** - Matrix, Neon, Retro, Minimal, Hacker
20
20
  - 📝 **Markdown Slides** - One file per slide, easy to version control
21
21
  - 🎯 **Figlet ASCII Art** - Big text rendered with figlet
22
22
  - 🎭 **Custom Gradients** - Color gradients for headings
23
- - 🔧 **Fully Themeable** - Create custom themes with YAML
24
- - **Fast** - Instant startup with minimal dependencies
23
+ - 📹 **Export to Video** - Export presentations to MP4 or GIF
24
+ - 🎬 **Record to Asciicast** - Record for asciinema playback
25
+ - 📋 **Presenter Notes** - Speaker notes in a separate terminal
26
+ - 🔧 **Fully Themeable** - Create custom themes
27
+ - ⚡ **Beautiful CLI** - Colorful, styled terminal output
25
28
  - 📦 **Type-Safe** - Full TypeScript with Zod validation
26
29
 
27
30
  ## Installation
28
31
 
29
- ### Via npm (Recommended)
30
-
31
32
  ```bash
33
+ # npm
32
34
  npm install -g @pep/term-deck
33
- ```
34
35
 
35
- Or with pnpm:
36
+ # pnpm
37
+ pnpm add -g @pep/term-deck
36
38
 
37
- ```bash
38
- pnpm install -g @pep/term-deck
39
+ # npx (no install)
40
+ npx @pep/term-deck init my-talk
39
41
  ```
40
42
 
41
- ### From Source
42
-
43
- Requires [Node.js](https://nodejs.org) 18+ and [pnpm](https://pnpm.io).
43
+ ## Quick Start
44
44
 
45
45
  ```bash
46
- git clone https://github.com/PepijnSenders/term-deck.git
47
- cd term-deck
48
- pnpm install
49
- pnpm dev examples/slides-matrix/
50
- ```
46
+ # Create a new presentation
47
+ term-deck init my-talk
51
48
 
52
- ## Quick Start
49
+ # Start presenting
50
+ cd my-talk
51
+ term-deck present .
53
52
 
54
- ### Create Your First Presentation
55
-
56
- ```bash
57
- # Initialize a new deck
58
- term-deck init my-presentation
53
+ # Export to video
54
+ term-deck export . -o presentation.mp4
55
+ ```
59
56
 
60
- # Navigate and present
61
- cd my-presentation
62
- term-deck slides/
57
+ Output:
58
+ ```
59
+ ┌ Creating my-talk
60
+
61
+ ◆ Created my-talk/
62
+
63
+ ◇ cd my-talk
64
+ ◇ term-deck present .
65
+
66
+ └ Ready to present!
63
67
  ```
64
68
 
65
69
  This creates:
66
70
  ```
67
- my-presentation/
68
- ├── slides/
69
- ├── 01-intro.md
70
- ├── 02-content.md
71
- ├── 03-end.md
72
- │ └── deck.config.ts
71
+ my-talk/
72
+ ├── 01-intro.md
73
+ ├── 02-content.md
74
+ ├── 03-end.md
75
+ ├── deck.config.js
73
76
  └── README.md
74
77
  ```
75
78
 
76
- ### Try the Examples
79
+ ## CLI Reference
77
80
 
78
- ```bash
79
- # Clone the repo to see examples
80
- git clone https://github.com/PepijnSenders/term-deck.git
81
- cd term-deck
81
+ Run `term-deck --help` to see the styled help:
82
82
 
83
- # Try different themes
84
- term-deck examples/slides-matrix/ # Classic Matrix
85
- term-deck examples/slides-neon/ # Cyberpunk neon
86
- term-deck examples/slides-retro/ # 80s synthwave
87
- term-deck examples/slides-minimal/ # Clean monochrome
88
- term-deck examples/slides-hacker/ # Terminal green
89
83
  ```
84
+ ┌─────────────────────────────────────────────────────────────┐
85
+ │ term-deck │
86
+ │ Terminal presentation tool with a cyberpunk aesthetic │
87
+ └─────────────────────────────────────────────────────────────┘
88
+
89
+ ▶ QUICK START:
90
+
91
+ ⚡ Create a new deck
92
+ term-deck init my-talk
90
93
 
91
- ### Keyboard Controls
94
+ 🎬 Start presenting
95
+ cd my-talk && term-deck present .
96
+
97
+ 📹 Export to video
98
+ term-deck export . -o presentation.mp4
99
+
100
+ ▶ COMMANDS:
101
+
102
+ present <dir> Start a presentation
103
+ -s, --start <n> Start at slide number
104
+ -n, --notes Show presenter notes (requires --notes-tty)
105
+ --notes-tty <path> TTY for notes (e.g., /dev/ttys001)
106
+ -l, --loop Loop back after last slide
107
+
108
+ export <dir> Export to GIF or MP4
109
+ -o, --output <file> Output file (.mp4 or .gif)
110
+ -w, --width <n> Terminal width (default: 120)
111
+ -h, --height <n> Terminal height (default: 40)
112
+ --fps <n> Frames per second (default: 30)
113
+ -t, --slide-time <n> Seconds per slide (default: 3)
114
+ -q, --quality <n> Quality 1-100 (default: 80)
115
+
116
+ init <name> Create a new presentation deck
117
+ -t, --theme <name> Theme preset (default: matrix)
118
+
119
+ ▶ HOTKEYS:
120
+
121
+ Space / → Next slide
122
+ ← Previous slide
123
+ 0-9 Jump to slide
124
+ l Show slide list
125
+ q Quit
126
+ ```
127
+
128
+ ## Keyboard Controls
92
129
 
93
130
  | Key | Action |
94
131
  |-----|--------|
@@ -128,204 +165,233 @@ gradient: cool
128
165
  {WHITE}You can have multiple bigText lines.{/}
129
166
 
130
167
  {CYAN}And use color tokens for styling.{/}
168
+
169
+ <!-- notes -->
170
+ These are presenter notes.
171
+ Only visible in notes mode (-n flag).
131
172
  ```
132
173
 
133
- ### 3. Add a config file
174
+ ### Frontmatter Options
175
+
176
+ | Field | Type | Description |
177
+ |-------|------|-------------|
178
+ | `title` | string | Window title (required) |
179
+ | `bigText` | string \| string[] | ASCII art text via figlet |
180
+ | `gradient` | string | Gradient for bigText: `fire`, `cool`, `pink`, `hf` |
181
+ | `transition` | string | Animation: `glitch`, `fade`, `instant`, `typewriter` |
182
+
183
+ ### Text Colors
134
184
 
135
- **deck.config.ts**
136
- ```typescript
137
- import { defineConfig } from 'term-deck';
138
- import matrix from 'term-deck/themes/matrix';
185
+ Use color tags in your slide content:
139
186
 
140
- export default defineConfig({
187
+ ```markdown
188
+ {GREEN}green text{/}
189
+ {ORANGE}orange text{/}
190
+ {CYAN}cyan text{/}
191
+ {PINK}pink text{/}
192
+ {WHITE}white text{/}
193
+ {GRAY}gray text{/}
194
+ {RED}red text{/}
195
+ ```
196
+
197
+ ## Configuration
198
+
199
+ Create a `deck.config.js` in your slides directory:
200
+
201
+ ```javascript
202
+ // deck.config.js
203
+ export default {
141
204
  title: 'My Presentation',
142
- author: 'Your Name',
143
- theme: matrix,
144
- settings: {
145
- startSlide: 0,
146
- loop: false,
147
- showProgress: false,
205
+
206
+ // Use a theme preset
207
+ themePreset: 'matrix', // 'matrix', 'neon', 'retro', 'minimal', 'hacker'
208
+
209
+ // Or customize the theme
210
+ theme: {
211
+ name: 'custom',
212
+ colors: {
213
+ primary: '#00cc66',
214
+ accent: '#ff6600',
215
+ background: '#0a0a0a',
216
+ text: '#ffffff',
217
+ muted: '#666666',
218
+ },
219
+ gradients: {
220
+ fire: ['#ff6600', '#ff3300', '#ff0066'],
221
+ },
222
+ glyphs: 'アイウエオカキクケコ0123456789',
148
223
  },
149
- });
224
+ }
150
225
  ```
151
226
 
152
- ### 4. Run it
227
+ ## Export Options
228
+
229
+ ### Export to MP4/GIF
153
230
 
154
231
  ```bash
155
- bun path/to/term-deck/bin/term-deck.ts .
156
- ```
232
+ # Export to MP4
233
+ term-deck export . -o presentation.mp4
157
234
 
158
- ## Themes
235
+ # Export to GIF
236
+ term-deck export . -o presentation.gif
159
237
 
160
- term-deck includes 5 built-in themes. See [THEMES.md](./THEMES.md) for detailed documentation.
238
+ # Custom settings
239
+ term-deck export . -o demo.mp4 --width 100 --height 30 --fps 24 --slide-time 5
240
+ ```
161
241
 
162
- ### Quick Comparison
242
+ Output:
243
+ ```
244
+ ┌ term-deck export
245
+
246
+ ◐ Exporting 10 slides
247
+ Slide 3/10: CONTENT
248
+
249
+ ◐ Encoding video...
250
+
251
+ ◇ Exported to presentation.mp4
252
+
253
+ └ Export complete
254
+ ```
163
255
 
164
- | Theme | Palette | Speed | Best For |
165
- |-------|---------|-------|----------|
166
- | **Matrix** | Green/Orange | Normal | All-purpose, classic cyberpunk |
167
- | **Neon** | Pink/Cyan/Purple | Fast | High energy, product launches |
168
- | **Retro** | Pink/Orange/Purple | Slow | Creative talks, storytelling |
169
- | **Minimal** | Monochrome | Very Slow | Corporate, documentation |
170
- | **Hacker** | All Green | Very Fast | Security talks, live coding |
256
+ ### Record to Asciicast
171
257
 
172
- ### Creating Custom Themes
258
+ Record presentations for playback with [asciinema](https://asciinema.org):
259
+
260
+ ```bash
261
+ term-deck record . -o presentation.cast
173
262
 
174
- Create a theme file in `themes/`:
175
-
176
- **themes/my-theme.ts**
177
- ```typescript
178
- import { createTheme } from '../src/core/theme.js';
179
-
180
- const yaml = `
181
- name: my-theme
182
- description: My custom theme
183
-
184
- colors:
185
- primary: "#ff0000"
186
- accent: "#00ff00"
187
- background: "#000000"
188
- text: "#ffffff"
189
- muted: "#666666"
190
-
191
- gradients:
192
- fire:
193
- - "#ff0000"
194
- - "#ff6600"
195
- - "#ffcc00"
196
- cool:
197
- - "#0000ff"
198
- - "#0066ff"
199
- - "#00ccff"
200
- pink:
201
- - "#ff00ff"
202
- - "#ff66ff"
203
- - "#ffccff"
204
- hf:
205
- - "#00ff00"
206
- - "#66ff66"
207
- - "#ccffcc"
208
-
209
- glyphs: "█▓▒░▀▄▌▐■□▪▫"
210
-
211
- animations:
212
- revealSpeed: 1.0
213
- matrixDensity: 50
214
- glitchIterations: 5
215
- lineDelay: 30
216
- matrixInterval: 80
217
-
218
- window:
219
- borderStyle: line
220
- shadow: true
221
- padding:
222
- top: 1
223
- bottom: 1
224
- left: 2
225
- right: 2
226
- `;
227
-
228
- export default createTheme(yaml);
263
+ # Play back
264
+ asciinema play presentation.cast
229
265
  ```
230
266
 
231
- Then use it in your deck config:
267
+ ## Themes
268
+
269
+ term-deck includes built-in themes. Set via `themePreset` in config:
232
270
 
233
- ```typescript
234
- import myTheme from './themes/my-theme.js';
271
+ | Theme | Palette | Best For |
272
+ |-------|---------|----------|
273
+ | **matrix** | Green/Orange | Classic cyberpunk |
274
+ | **neon** | Pink/Cyan/Purple | Product launches |
275
+ | **retro** | Pink/Orange/Purple | Creative talks |
276
+ | **minimal** | Monochrome | Corporate, documentation |
277
+ | **hacker** | All Green | Security talks, live coding |
278
+
279
+ ### Creating Custom Themes
235
280
 
236
- export default defineConfig({
281
+ ```javascript
282
+ // deck.config.js
283
+ export default {
237
284
  title: 'My Presentation',
238
- theme: myTheme,
239
- });
285
+ theme: {
286
+ name: 'my-theme',
287
+ colors: {
288
+ primary: '#ff0000',
289
+ accent: '#00ff00',
290
+ background: '#000000',
291
+ text: '#ffffff',
292
+ muted: '#666666',
293
+ },
294
+ gradients: {
295
+ fire: ['#ff0000', '#ff6600', '#ffcc00'],
296
+ cool: ['#0000ff', '#0066ff', '#00ccff'],
297
+ pink: ['#ff00ff', '#ff66ff', '#ffccff'],
298
+ },
299
+ glyphs: '█▓▒░▀▄▌▐■□▪▫',
300
+ animations: {
301
+ revealSpeed: 1.0,
302
+ matrixDensity: 50,
303
+ glitchIterations: 5,
304
+ lineDelay: 30,
305
+ matrixInterval: 80,
306
+ },
307
+ },
308
+ }
240
309
  ```
241
310
 
242
- ## Slide Format
311
+ ## Presenter Notes
243
312
 
244
- Slides use markdown with YAML frontmatter:
313
+ Add notes to your slides that only you can see:
245
314
 
246
315
  ```markdown
247
316
  ---
248
- title: Slide Title
249
- bigText: BIG TEXT
250
- gradient: fire
251
- transition: glitch
317
+ title: My Slide
252
318
  ---
253
319
 
254
- Body content goes here.
255
-
256
- You can use color tokens:
257
- {GREEN}green text{/}
258
- {ORANGE}orange text{/}
259
- {CYAN}cyan text{/}
260
- {PINK}pink text{/}
261
- {WHITE}white text{/}
262
- {GRAY}gray text{/}
320
+ Content visible to audience...
263
321
 
264
322
  <!-- notes -->
265
- These are presenter notes (optional).
266
- Only visible in notes mode.
323
+ These notes are only visible in the notes window.
324
+ Remember to mention the key points!
267
325
  ```
268
326
 
269
- ### Frontmatter Options
327
+ Run with notes in a separate terminal:
270
328
 
271
- | Field | Type | Description |
272
- |-------|------|-------------|
273
- | `title` | string | Window title (required) |
274
- | `bigText` | string \| string[] | ASCII art text via figlet |
275
- | `gradient` | string | Gradient for bigText: `fire`, `cool`, `pink`, `hf` |
276
- | `transition` | string | Animation: `glitch`, `fade`, `instant`, `typewriter` |
277
- | `theme` | string | Override theme for this slide |
329
+ ```bash
330
+ # Step 1: Open a second terminal and get its TTY path
331
+ tty
332
+ # Output: /dev/ttys001 (or similar)
333
+
334
+ # Step 2: In your main terminal, start presenting with notes
335
+ term-deck present . --notes --notes-tty /dev/ttys001
336
+ ```
337
+
338
+ The notes will appear in the second terminal while you present in the first.
339
+
340
+ ## Examples
341
+
342
+ Try the example presentations:
343
+
344
+ ```bash
345
+ git clone https://github.com/PepijnSenders/term-deck.git
346
+ cd term-deck
347
+
348
+ # Try different themes
349
+ term-deck present examples/slides-matrix/
350
+ term-deck present examples/slides-neon/
351
+ term-deck present examples/slides-retro/
352
+ term-deck present examples/slides-minimal/
353
+ term-deck present examples/slides-hacker/
354
+ ```
278
355
 
279
356
  ## Development
280
357
 
358
+ ### From Source
359
+
360
+ ```bash
361
+ git clone https://github.com/PepijnSenders/term-deck.git
362
+ cd term-deck
363
+ pnpm install
364
+ pnpm build
365
+ pnpm dev present examples/slides-matrix/
366
+ ```
367
+
281
368
  ### Project Structure
282
369
 
283
370
  ```
284
371
  term-deck/
285
- ├── bin/
286
- │ └── term-deck.ts # CLI entry point
372
+ ├── bin/term-deck.ts # CLI entry point
287
373
  ├── src/
288
- │ ├── cli/ # CLI commands
289
- │ ├── core/ # Core logic (deck, slide, theme)
290
- │ ├── renderer/ # TUI rendering
291
- │ ├── presenter/ # Presentation controller
292
- │ ├── export/ # Export to GIF/MP4 (future)
293
- ├── schemas/ # Zod validation schemas
294
- │ └── themes/ # Built-in themes
295
- ├── themes/ # User custom themes
296
- ├── examples/ # Example presentations
297
- │ ├── slides/ # Default demo
298
- │ ├── slides-matrix/ # Matrix theme demo
299
- │ ├── slides-neon/ # Neon theme demo
300
- │ ├── slides-retro/ # Retro theme demo
301
- │ ├── slides-minimal/ # Minimal theme demo
302
- │ └── slides-hacker/ # Hacker theme demo
374
+ │ ├── cli/ # CLI commands & help
375
+ │ ├── core/ # Core logic (deck, slide, theme)
376
+ │ ├── renderer/ # TUI rendering
377
+ │ ├── presenter/ # Presentation controller
378
+ │ ├── export/ # Export to GIF/MP4/asciicast
379
+ └── schemas/ # Zod validation schemas
380
+ ├── examples/ # Example presentations
303
381
  └── package.json
304
382
  ```
305
383
 
306
- ### Running Tests
307
-
308
- ```bash
309
- bun run test
310
- ```
384
+ ### Requirements
311
385
 
312
- ### Type Checking
386
+ - Node.js 18+
387
+ - For video export: [ffmpeg](https://ffmpeg.org)
313
388
 
314
389
  ```bash
315
- bun run typecheck
390
+ # Install ffmpeg
391
+ brew install ffmpeg # macOS
392
+ sudo apt install ffmpeg # Ubuntu/Debian
316
393
  ```
317
394
 
318
- ## Roadmap
319
-
320
- - [ ] Export to GIF/MP4
321
- - [ ] Presenter notes mode (dual terminal)
322
- - [ ] Mermaid diagram support
323
- - [ ] Custom fonts for ASCII art
324
- - [ ] Auto-advance mode
325
- - [ ] Progress bar
326
- - [ ] Remote control (via HTTP)
327
- - [ ] Web viewer
328
-
329
395
  ## Why term-deck?
330
396
 
331
397
  - **For speakers** who want terminal-native presentations
@@ -336,16 +402,16 @@ bun run typecheck
336
402
  ## Credits
337
403
 
338
404
  Built with:
339
- - [Node.js](https://nodejs.org) - JavaScript runtime
340
405
  - [neo-blessed](https://github.com/embarklabs/neo-blessed) - Terminal UI
341
406
  - [figlet](https://github.com/patorjk/figlet.js) - ASCII art text
342
407
  - [gradient-string](https://github.com/bokub/gradient-string) - Color gradients
408
+ - [@clack/prompts](https://github.com/bombshell-dev/clack) - Beautiful CLI prompts
409
+ - [picocolors](https://github.com/alexeyraspopov/picocolors) - Terminal colors
343
410
  - [Zod](https://github.com/colinhacks/zod) - Schema validation
344
411
 
345
412
  Inspired by:
346
413
  - [Slidev](https://sli.dev) - Presentation slides for developers
347
414
  - [mdp](https://github.com/visit1985/mdp) - Markdown presentation tool
348
- - [present](https://github.com/vinayak-mehta/present) - Terminal presentation tool
349
415
 
350
416
  ## License
351
417