@pep/term-deck 1.0.28 → 1.0.29

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,115 @@ 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
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
93
+
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
105
+ -l, --loop Loop back after last slide
106
+
107
+ export <dir> Export to GIF or MP4
108
+ -o, --output <file> Output file (.mp4 or .gif)
109
+ -w, --width <n> Terminal width (default: 120)
110
+ -h, --height <n> Terminal height (default: 40)
111
+ --fps <n> Frames per second (default: 30)
112
+ -t, --slide-time <n> Seconds per slide (default: 3)
113
+ -q, --quality <n> Quality 1-100 (default: 80)
114
+
115
+ init <name> Create a new presentation deck
116
+ -t, --theme <name> Theme preset (default: matrix)
117
+
118
+ ▶ HOTKEYS:
119
+
120
+ Space / → Next slide
121
+ ← Previous slide
122
+ 0-9 Jump to slide
123
+ l Show slide list
124
+ q Quit
89
125
  ```
90
126
 
91
- ### Keyboard Controls
127
+ ## Keyboard Controls
92
128
 
93
129
  | Key | Action |
94
130
  |-----|--------|
@@ -128,204 +164,230 @@ gradient: cool
128
164
  {WHITE}You can have multiple bigText lines.{/}
129
165
 
130
166
  {CYAN}And use color tokens for styling.{/}
167
+
168
+ <!-- notes -->
169
+ These are presenter notes.
170
+ Only visible in notes mode (-n flag).
131
171
  ```
132
172
 
133
- ### 3. Add a config file
173
+ ### Frontmatter Options
174
+
175
+ | Field | Type | Description |
176
+ |-------|------|-------------|
177
+ | `title` | string | Window title (required) |
178
+ | `bigText` | string \| string[] | ASCII art text via figlet |
179
+ | `gradient` | string | Gradient for bigText: `fire`, `cool`, `pink`, `hf` |
180
+ | `transition` | string | Animation: `glitch`, `fade`, `instant`, `typewriter` |
181
+
182
+ ### Text Colors
134
183
 
135
- **deck.config.ts**
136
- ```typescript
137
- import { defineConfig } from 'term-deck';
138
- import matrix from 'term-deck/themes/matrix';
184
+ Use color tags in your slide content:
139
185
 
140
- export default defineConfig({
186
+ ```markdown
187
+ {GREEN}green text{/}
188
+ {ORANGE}orange text{/}
189
+ {CYAN}cyan text{/}
190
+ {PINK}pink text{/}
191
+ {WHITE}white text{/}
192
+ {GRAY}gray text{/}
193
+ {RED}red text{/}
194
+ ```
195
+
196
+ ## Configuration
197
+
198
+ Create a `deck.config.js` in your slides directory:
199
+
200
+ ```javascript
201
+ // deck.config.js
202
+ export default {
141
203
  title: 'My Presentation',
142
- author: 'Your Name',
143
- theme: matrix,
144
- settings: {
145
- startSlide: 0,
146
- loop: false,
147
- showProgress: false,
204
+
205
+ // Use a theme preset
206
+ themePreset: 'matrix', // 'matrix', 'neon', 'retro', 'minimal', 'hacker'
207
+
208
+ // Or customize the theme
209
+ theme: {
210
+ name: 'custom',
211
+ colors: {
212
+ primary: '#00cc66',
213
+ accent: '#ff6600',
214
+ background: '#0a0a0a',
215
+ text: '#ffffff',
216
+ muted: '#666666',
217
+ },
218
+ gradients: {
219
+ fire: ['#ff6600', '#ff3300', '#ff0066'],
220
+ },
221
+ glyphs: 'アイウエオカキクケコ0123456789',
148
222
  },
149
- });
223
+ }
150
224
  ```
151
225
 
152
- ### 4. Run it
226
+ ## Export Options
227
+
228
+ ### Export to MP4/GIF
153
229
 
154
230
  ```bash
155
- bun path/to/term-deck/bin/term-deck.ts .
156
- ```
231
+ # Export to MP4
232
+ term-deck export . -o presentation.mp4
157
233
 
158
- ## Themes
234
+ # Export to GIF
235
+ term-deck export . -o presentation.gif
159
236
 
160
- term-deck includes 5 built-in themes. See [THEMES.md](./THEMES.md) for detailed documentation.
237
+ # Custom settings
238
+ term-deck export . -o demo.mp4 --width 100 --height 30 --fps 24 --slide-time 5
239
+ ```
161
240
 
162
- ### Quick Comparison
241
+ Output:
242
+ ```
243
+ ┌ term-deck export
244
+
245
+ ◐ Exporting 10 slides
246
+ Slide 3/10: CONTENT
247
+
248
+ ◐ Encoding video...
249
+
250
+ ◇ Exported to presentation.mp4
251
+
252
+ └ Export complete
253
+ ```
163
254
 
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 |
255
+ ### Record to Asciicast
171
256
 
172
- ### Creating Custom Themes
257
+ Record presentations for playback with [asciinema](https://asciinema.org):
258
+
259
+ ```bash
260
+ term-deck record . -o presentation.cast
173
261
 
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);
262
+ # Play back
263
+ asciinema play presentation.cast
229
264
  ```
230
265
 
231
- Then use it in your deck config:
266
+ ## Themes
267
+
268
+ term-deck includes built-in themes. Set via `themePreset` in config:
232
269
 
233
- ```typescript
234
- import myTheme from './themes/my-theme.js';
270
+ | Theme | Palette | Best For |
271
+ |-------|---------|----------|
272
+ | **matrix** | Green/Orange | Classic cyberpunk |
273
+ | **neon** | Pink/Cyan/Purple | Product launches |
274
+ | **retro** | Pink/Orange/Purple | Creative talks |
275
+ | **minimal** | Monochrome | Corporate, documentation |
276
+ | **hacker** | All Green | Security talks, live coding |
235
277
 
236
- export default defineConfig({
278
+ ### Creating Custom Themes
279
+
280
+ ```javascript
281
+ // deck.config.js
282
+ export default {
237
283
  title: 'My Presentation',
238
- theme: myTheme,
239
- });
284
+ theme: {
285
+ name: 'my-theme',
286
+ colors: {
287
+ primary: '#ff0000',
288
+ accent: '#00ff00',
289
+ background: '#000000',
290
+ text: '#ffffff',
291
+ muted: '#666666',
292
+ },
293
+ gradients: {
294
+ fire: ['#ff0000', '#ff6600', '#ffcc00'],
295
+ cool: ['#0000ff', '#0066ff', '#00ccff'],
296
+ pink: ['#ff00ff', '#ff66ff', '#ffccff'],
297
+ },
298
+ glyphs: '█▓▒░▀▄▌▐■□▪▫',
299
+ animations: {
300
+ revealSpeed: 1.0,
301
+ matrixDensity: 50,
302
+ glitchIterations: 5,
303
+ lineDelay: 30,
304
+ matrixInterval: 80,
305
+ },
306
+ },
307
+ }
240
308
  ```
241
309
 
242
- ## Slide Format
310
+ ## Presenter Notes
243
311
 
244
- Slides use markdown with YAML frontmatter:
312
+ Add notes to your slides that only you can see:
245
313
 
246
314
  ```markdown
247
315
  ---
248
- title: Slide Title
249
- bigText: BIG TEXT
250
- gradient: fire
251
- transition: glitch
316
+ title: My Slide
252
317
  ---
253
318
 
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{/}
319
+ Content visible to audience...
263
320
 
264
321
  <!-- notes -->
265
- These are presenter notes (optional).
266
- Only visible in notes mode.
322
+ These notes are only visible when using -n flag.
323
+ Remember to mention the key points!
267
324
  ```
268
325
 
269
- ### Frontmatter Options
326
+ Run with notes in a separate terminal:
270
327
 
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 |
328
+ ```bash
329
+ # Terminal 1: Main presentation
330
+ term-deck present .
331
+
332
+ # Terminal 2: Notes view
333
+ term-deck present . --notes
334
+ ```
335
+
336
+ ## Examples
337
+
338
+ Try the example presentations:
339
+
340
+ ```bash
341
+ git clone https://github.com/PepijnSenders/term-deck.git
342
+ cd term-deck
343
+
344
+ # Try different themes
345
+ term-deck present examples/slides-matrix/
346
+ term-deck present examples/slides-neon/
347
+ term-deck present examples/slides-retro/
348
+ term-deck present examples/slides-minimal/
349
+ term-deck present examples/slides-hacker/
350
+ ```
278
351
 
279
352
  ## Development
280
353
 
354
+ ### From Source
355
+
356
+ ```bash
357
+ git clone https://github.com/PepijnSenders/term-deck.git
358
+ cd term-deck
359
+ pnpm install
360
+ pnpm build
361
+ pnpm dev present examples/slides-matrix/
362
+ ```
363
+
281
364
  ### Project Structure
282
365
 
283
366
  ```
284
367
  term-deck/
285
- ├── bin/
286
- │ └── term-deck.ts # CLI entry point
368
+ ├── bin/term-deck.ts # CLI entry point
287
369
  ├── 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
370
+ │ ├── cli/ # CLI commands & help
371
+ │ ├── core/ # Core logic (deck, slide, theme)
372
+ │ ├── renderer/ # TUI rendering
373
+ │ ├── presenter/ # Presentation controller
374
+ │ ├── export/ # Export to GIF/MP4/asciicast
375
+ └── schemas/ # Zod validation schemas
376
+ ├── examples/ # Example presentations
303
377
  └── package.json
304
378
  ```
305
379
 
306
- ### Running Tests
307
-
308
- ```bash
309
- bun run test
310
- ```
380
+ ### Requirements
311
381
 
312
- ### Type Checking
382
+ - Node.js 18+
383
+ - For video export: [ffmpeg](https://ffmpeg.org)
313
384
 
314
385
  ```bash
315
- bun run typecheck
386
+ # Install ffmpeg
387
+ brew install ffmpeg # macOS
388
+ sudo apt install ffmpeg # Ubuntu/Debian
316
389
  ```
317
390
 
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
391
  ## Why term-deck?
330
392
 
331
393
  - **For speakers** who want terminal-native presentations
@@ -336,16 +398,16 @@ bun run typecheck
336
398
  ## Credits
337
399
 
338
400
  Built with:
339
- - [Node.js](https://nodejs.org) - JavaScript runtime
340
401
  - [neo-blessed](https://github.com/embarklabs/neo-blessed) - Terminal UI
341
402
  - [figlet](https://github.com/patorjk/figlet.js) - ASCII art text
342
403
  - [gradient-string](https://github.com/bokub/gradient-string) - Color gradients
404
+ - [@clack/prompts](https://github.com/bombshell-dev/clack) - Beautiful CLI prompts
405
+ - [picocolors](https://github.com/alexeyraspopov/picocolors) - Terminal colors
343
406
  - [Zod](https://github.com/colinhacks/zod) - Schema validation
344
407
 
345
408
  Inspired by:
346
409
  - [Slidev](https://sli.dev) - Presentation slides for developers
347
410
  - [mdp](https://github.com/visit1985/mdp) - Markdown presentation tool
348
- - [present](https://github.com/vinayak-mehta/present) - Terminal presentation tool
349
411
 
350
412
  ## License
351
413
 
@@ -1399,7 +1399,7 @@ var init_main = __esm({
1399
1399
  init_esm_shims();
1400
1400
 
1401
1401
  // package.json
1402
- var version = "1.0.28";
1402
+ var version = "1.0.29";
1403
1403
 
1404
1404
  // src/cli/commands/present.ts
1405
1405
  init_esm_shims();