@pep/term-deck 1.0.10
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/LICENSE +21 -0
- package/README.md +356 -0
- package/bin/term-deck.ts +45 -0
- package/examples/slides/01-welcome.md +9 -0
- package/examples/slides/02-features.md +12 -0
- package/examples/slides/03-colors.md +17 -0
- package/examples/slides/04-ascii-art.md +11 -0
- package/examples/slides/05-gradients.md +14 -0
- package/examples/slides/06-themes.md +13 -0
- package/examples/slides/07-markdown.md +13 -0
- package/examples/slides/08-controls.md +13 -0
- package/examples/slides/09-thanks.md +11 -0
- package/examples/slides/deck.config.ts +13 -0
- package/examples/slides-hacker/01-welcome.md +9 -0
- package/examples/slides-hacker/02-features.md +12 -0
- package/examples/slides-hacker/03-colors.md +17 -0
- package/examples/slides-hacker/04-ascii-art.md +11 -0
- package/examples/slides-hacker/05-gradients.md +14 -0
- package/examples/slides-hacker/06-themes.md +13 -0
- package/examples/slides-hacker/07-markdown.md +13 -0
- package/examples/slides-hacker/08-controls.md +13 -0
- package/examples/slides-hacker/09-thanks.md +11 -0
- package/examples/slides-hacker/deck.config.ts +13 -0
- package/examples/slides-matrix/01-welcome.md +9 -0
- package/examples/slides-matrix/02-features.md +12 -0
- package/examples/slides-matrix/03-colors.md +17 -0
- package/examples/slides-matrix/04-ascii-art.md +11 -0
- package/examples/slides-matrix/05-gradients.md +14 -0
- package/examples/slides-matrix/06-themes.md +13 -0
- package/examples/slides-matrix/07-markdown.md +13 -0
- package/examples/slides-matrix/08-controls.md +13 -0
- package/examples/slides-matrix/09-thanks.md +11 -0
- package/examples/slides-matrix/deck.config.ts +13 -0
- package/examples/slides-minimal/01-welcome.md +9 -0
- package/examples/slides-minimal/02-features.md +12 -0
- package/examples/slides-minimal/03-colors.md +17 -0
- package/examples/slides-minimal/04-ascii-art.md +11 -0
- package/examples/slides-minimal/05-gradients.md +14 -0
- package/examples/slides-minimal/06-themes.md +13 -0
- package/examples/slides-minimal/07-markdown.md +13 -0
- package/examples/slides-minimal/08-controls.md +13 -0
- package/examples/slides-minimal/09-thanks.md +11 -0
- package/examples/slides-minimal/deck.config.ts +13 -0
- package/examples/slides-neon/01-welcome.md +9 -0
- package/examples/slides-neon/02-features.md +12 -0
- package/examples/slides-neon/03-colors.md +17 -0
- package/examples/slides-neon/04-ascii-art.md +11 -0
- package/examples/slides-neon/05-gradients.md +14 -0
- package/examples/slides-neon/06-themes.md +13 -0
- package/examples/slides-neon/07-markdown.md +13 -0
- package/examples/slides-neon/08-controls.md +13 -0
- package/examples/slides-neon/09-thanks.md +11 -0
- package/examples/slides-neon/deck.config.ts +13 -0
- package/examples/slides-retro/01-welcome.md +9 -0
- package/examples/slides-retro/02-features.md +12 -0
- package/examples/slides-retro/03-colors.md +17 -0
- package/examples/slides-retro/04-ascii-art.md +11 -0
- package/examples/slides-retro/05-gradients.md +14 -0
- package/examples/slides-retro/06-themes.md +13 -0
- package/examples/slides-retro/07-markdown.md +13 -0
- package/examples/slides-retro/08-controls.md +13 -0
- package/examples/slides-retro/09-thanks.md +11 -0
- package/examples/slides-retro/deck.config.ts +13 -0
- package/package.json +66 -0
- package/src/cli/__tests__/errors.test.ts +201 -0
- package/src/cli/__tests__/help.test.ts +157 -0
- package/src/cli/__tests__/init.test.ts +110 -0
- package/src/cli/commands/export.ts +33 -0
- package/src/cli/commands/init.ts +125 -0
- package/src/cli/commands/present.ts +29 -0
- package/src/cli/errors.ts +77 -0
- package/src/core/__tests__/slide.test.ts +1759 -0
- package/src/core/__tests__/theme.test.ts +1103 -0
- package/src/core/slide.ts +509 -0
- package/src/core/theme.ts +388 -0
- package/src/export/__tests__/recorder.test.ts +566 -0
- package/src/export/recorder.ts +639 -0
- package/src/index.ts +36 -0
- package/src/presenter/__tests__/main.test.ts +244 -0
- package/src/presenter/main.ts +658 -0
- package/src/renderer/__tests__/screen-extended.test.ts +801 -0
- package/src/renderer/__tests__/screen.test.ts +525 -0
- package/src/renderer/screen.ts +671 -0
- package/src/schemas/__tests__/config.test.ts +429 -0
- package/src/schemas/__tests__/slide.test.ts +349 -0
- package/src/schemas/__tests__/theme.test.ts +970 -0
- package/src/schemas/__tests__/validation.test.ts +256 -0
- package/src/schemas/config.ts +58 -0
- package/src/schemas/slide.ts +56 -0
- package/src/schemas/theme.ts +203 -0
- package/src/schemas/validation.ts +64 -0
- package/src/themes/matrix/index.ts +53 -0
- package/themes/hacker.ts +53 -0
- package/themes/minimal.ts +53 -0
- package/themes/neon.ts +53 -0
- package/themes/retro.ts +53 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 term-deck contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
# term-deck
|
|
2
|
+
|
|
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
|
+
|
|
5
|
+

|
|
6
|
+

|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
## Demo
|
|
10
|
+
|
|
11
|
+

|
|
12
|
+
|
|
13
|
+
*Matrix rain backgrounds, glitch animations, and ASCII art in your terminal*
|
|
14
|
+
|
|
15
|
+
## Features
|
|
16
|
+
|
|
17
|
+
- 🌊 **Matrix Rain Background** - Animated katakana/symbol rain effects
|
|
18
|
+
- ✨ **Glitch Reveal Animations** - Line-by-line scramble effects
|
|
19
|
+
- 🎨 **5 Built-in Themes** - Matrix, Neon, Retro, Minimal, Hacker
|
|
20
|
+
- 📝 **Markdown Slides** - One file per slide, easy to version control
|
|
21
|
+
- 🎯 **Figlet ASCII Art** - Big text rendered with figlet
|
|
22
|
+
- 🎭 **Custom Gradients** - Color gradients for headings
|
|
23
|
+
- 🔧 **Fully Themeable** - Create custom themes with YAML
|
|
24
|
+
- ⚡ **Fast** - Instant startup with minimal dependencies
|
|
25
|
+
- 📦 **Type-Safe** - Full TypeScript with Zod validation
|
|
26
|
+
|
|
27
|
+
## Installation
|
|
28
|
+
|
|
29
|
+
### Via npm (Recommended)
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm install -g @pep/term-deck
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Or with pnpm:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
pnpm install -g @pep/term-deck
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### From Source
|
|
42
|
+
|
|
43
|
+
Requires [Node.js](https://nodejs.org) 18+ and [pnpm](https://pnpm.io).
|
|
44
|
+
|
|
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
|
+
```
|
|
51
|
+
|
|
52
|
+
## Quick Start
|
|
53
|
+
|
|
54
|
+
### Create Your First Presentation
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# Initialize a new deck
|
|
58
|
+
term-deck init my-presentation
|
|
59
|
+
|
|
60
|
+
# Navigate and present
|
|
61
|
+
cd my-presentation
|
|
62
|
+
term-deck slides/
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
This creates:
|
|
66
|
+
```
|
|
67
|
+
my-presentation/
|
|
68
|
+
├── slides/
|
|
69
|
+
│ ├── 01-intro.md
|
|
70
|
+
│ ├── 02-content.md
|
|
71
|
+
│ ├── 03-end.md
|
|
72
|
+
│ └── deck.config.ts
|
|
73
|
+
└── README.md
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Try the Examples
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# Clone the repo to see examples
|
|
80
|
+
git clone https://github.com/PepijnSenders/term-deck.git
|
|
81
|
+
cd term-deck
|
|
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
|
+
```
|
|
90
|
+
|
|
91
|
+
### Keyboard Controls
|
|
92
|
+
|
|
93
|
+
| Key | Action |
|
|
94
|
+
|-----|--------|
|
|
95
|
+
| `Space` / `Enter` / `→` | Next slide |
|
|
96
|
+
| `←` / `Backspace` | Previous slide |
|
|
97
|
+
| `0-9` | Jump to slide |
|
|
98
|
+
| `l` | Show slide list |
|
|
99
|
+
| `q` / `Esc` | Quit |
|
|
100
|
+
|
|
101
|
+
## Slide Format
|
|
102
|
+
|
|
103
|
+
Each slide is a markdown file with YAML frontmatter:
|
|
104
|
+
|
|
105
|
+
**01-intro.md**
|
|
106
|
+
```markdown
|
|
107
|
+
---
|
|
108
|
+
title: Welcome
|
|
109
|
+
bigText: HELLO
|
|
110
|
+
gradient: fire
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
{GREEN}Welcome to my presentation!{/}
|
|
114
|
+
|
|
115
|
+
This is the body text of the slide.
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
**02-content.md**
|
|
119
|
+
```markdown
|
|
120
|
+
---
|
|
121
|
+
title: Main Point
|
|
122
|
+
bigText:
|
|
123
|
+
- MULTI
|
|
124
|
+
- LINE
|
|
125
|
+
gradient: cool
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
{WHITE}You can have multiple bigText lines.{/}
|
|
129
|
+
|
|
130
|
+
{CYAN}And use color tokens for styling.{/}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### 3. Add a config file
|
|
134
|
+
|
|
135
|
+
**deck.config.ts**
|
|
136
|
+
```typescript
|
|
137
|
+
import { defineConfig } from 'term-deck';
|
|
138
|
+
import matrix from 'term-deck/themes/matrix';
|
|
139
|
+
|
|
140
|
+
export default defineConfig({
|
|
141
|
+
title: 'My Presentation',
|
|
142
|
+
author: 'Your Name',
|
|
143
|
+
theme: matrix,
|
|
144
|
+
settings: {
|
|
145
|
+
startSlide: 0,
|
|
146
|
+
loop: false,
|
|
147
|
+
showProgress: false,
|
|
148
|
+
},
|
|
149
|
+
});
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### 4. Run it
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
bun path/to/term-deck/bin/term-deck.ts .
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## Themes
|
|
159
|
+
|
|
160
|
+
term-deck includes 5 built-in themes. See [THEMES.md](./THEMES.md) for detailed documentation.
|
|
161
|
+
|
|
162
|
+
### Quick Comparison
|
|
163
|
+
|
|
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 |
|
|
171
|
+
|
|
172
|
+
### Creating Custom Themes
|
|
173
|
+
|
|
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);
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Then use it in your deck config:
|
|
232
|
+
|
|
233
|
+
```typescript
|
|
234
|
+
import myTheme from './themes/my-theme.js';
|
|
235
|
+
|
|
236
|
+
export default defineConfig({
|
|
237
|
+
title: 'My Presentation',
|
|
238
|
+
theme: myTheme,
|
|
239
|
+
});
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
## Slide Format
|
|
243
|
+
|
|
244
|
+
Slides use markdown with YAML frontmatter:
|
|
245
|
+
|
|
246
|
+
```markdown
|
|
247
|
+
---
|
|
248
|
+
title: Slide Title
|
|
249
|
+
bigText: BIG TEXT
|
|
250
|
+
gradient: fire
|
|
251
|
+
transition: glitch
|
|
252
|
+
---
|
|
253
|
+
|
|
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{/}
|
|
263
|
+
|
|
264
|
+
<!-- notes -->
|
|
265
|
+
These are presenter notes (optional).
|
|
266
|
+
Only visible in notes mode.
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
### Frontmatter Options
|
|
270
|
+
|
|
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 |
|
|
278
|
+
|
|
279
|
+
## Development
|
|
280
|
+
|
|
281
|
+
### Project Structure
|
|
282
|
+
|
|
283
|
+
```
|
|
284
|
+
term-deck/
|
|
285
|
+
├── bin/
|
|
286
|
+
│ └── term-deck.ts # CLI entry point
|
|
287
|
+
├── 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
|
|
303
|
+
└── package.json
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
### Running Tests
|
|
307
|
+
|
|
308
|
+
```bash
|
|
309
|
+
bun run test
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
### Type Checking
|
|
313
|
+
|
|
314
|
+
```bash
|
|
315
|
+
bun run typecheck
|
|
316
|
+
```
|
|
317
|
+
|
|
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
|
+
## Why term-deck?
|
|
330
|
+
|
|
331
|
+
- **For speakers** who want terminal-native presentations
|
|
332
|
+
- **For developers** who want to present code without context switching
|
|
333
|
+
- **For streamers** who want a cyberpunk aesthetic
|
|
334
|
+
- **For anyone** tired of PowerPoint
|
|
335
|
+
|
|
336
|
+
## Credits
|
|
337
|
+
|
|
338
|
+
Built with:
|
|
339
|
+
- [Node.js](https://nodejs.org) - JavaScript runtime
|
|
340
|
+
- [neo-blessed](https://github.com/embarklabs/neo-blessed) - Terminal UI
|
|
341
|
+
- [figlet](https://github.com/patorjk/figlet.js) - ASCII art text
|
|
342
|
+
- [gradient-string](https://github.com/bokub/gradient-string) - Color gradients
|
|
343
|
+
- [Zod](https://github.com/colinhacks/zod) - Schema validation
|
|
344
|
+
|
|
345
|
+
Inspired by:
|
|
346
|
+
- [Slidev](https://sli.dev) - Presentation slides for developers
|
|
347
|
+
- [mdp](https://github.com/visit1985/mdp) - Markdown presentation tool
|
|
348
|
+
- [present](https://github.com/vinayak-mehta/present) - Terminal presentation tool
|
|
349
|
+
|
|
350
|
+
## License
|
|
351
|
+
|
|
352
|
+
MIT License - see [LICENSE](./LICENSE) for details.
|
|
353
|
+
|
|
354
|
+
---
|
|
355
|
+
|
|
356
|
+
Made with 💚 by the term-deck team
|
package/bin/term-deck.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
#!/usr/bin/env tsx
|
|
2
|
+
/**
|
|
3
|
+
* CLI Entry Point for term-deck
|
|
4
|
+
*
|
|
5
|
+
* Terminal presentation tool with a cyberpunk aesthetic.
|
|
6
|
+
* Provides commands for presenting, exporting, and initializing decks.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { Command } from 'commander';
|
|
10
|
+
import { version } from '../package.json';
|
|
11
|
+
import { presentCommand } from '../src/cli/commands/present.js';
|
|
12
|
+
import { exportCommand } from '../src/cli/commands/export.js';
|
|
13
|
+
import { initCommand } from '../src/cli/commands/init.js';
|
|
14
|
+
import { handleError } from '../src/cli/errors.js';
|
|
15
|
+
|
|
16
|
+
const program = new Command();
|
|
17
|
+
|
|
18
|
+
program
|
|
19
|
+
.name('term-deck')
|
|
20
|
+
.description('Terminal presentation tool with a cyberpunk aesthetic')
|
|
21
|
+
.version(version);
|
|
22
|
+
|
|
23
|
+
// Register commands
|
|
24
|
+
program.addCommand(presentCommand);
|
|
25
|
+
program.addCommand(exportCommand);
|
|
26
|
+
program.addCommand(initCommand);
|
|
27
|
+
|
|
28
|
+
// Default action: present if directory given, else show help
|
|
29
|
+
program
|
|
30
|
+
.argument('[dir]', 'Slides directory to present')
|
|
31
|
+
.action(async (dir) => {
|
|
32
|
+
if (dir) {
|
|
33
|
+
// Default action: present the deck
|
|
34
|
+
try {
|
|
35
|
+
const { present } = await import('../src/presenter/main.js');
|
|
36
|
+
await present(dir, {});
|
|
37
|
+
} catch (error) {
|
|
38
|
+
handleError(error);
|
|
39
|
+
}
|
|
40
|
+
} else {
|
|
41
|
+
program.help();
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
program.parse();
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Features
|
|
3
|
+
bigText: FEATURES
|
|
4
|
+
gradient: cool
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
{GREEN}✓{/} {WHITE}Matrix rain backgrounds{/}
|
|
8
|
+
{GREEN}✓{/} {WHITE}Glitch reveal animations{/}
|
|
9
|
+
{GREEN}✓{/} {WHITE}ASCII art with figlet{/}
|
|
10
|
+
{GREEN}✓{/} {WHITE}Color gradients{/}
|
|
11
|
+
{GREEN}✓{/} {WHITE}Multiple themes{/}
|
|
12
|
+
{GREEN}✓{/} {WHITE}Markdown slides{/}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Color Tokens
|
|
3
|
+
bigText: COLORS
|
|
4
|
+
gradient: pink
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
{GREEN}Green text with GREEN token{/}
|
|
8
|
+
|
|
9
|
+
{ORANGE}Orange text with ORANGE token{/}
|
|
10
|
+
|
|
11
|
+
{CYAN}Cyan text with CYAN token{/}
|
|
12
|
+
|
|
13
|
+
{PINK}Pink text with PINK token{/}
|
|
14
|
+
|
|
15
|
+
{WHITE}White text with WHITE token{/}
|
|
16
|
+
|
|
17
|
+
{GRAY}Gray text with GRAY token{/}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Gradients
|
|
3
|
+
bigText:
|
|
4
|
+
- GRADIENT
|
|
5
|
+
- TEXT
|
|
6
|
+
gradient: fire
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
{WHITE}Choose from built-in gradients:{/}
|
|
10
|
+
|
|
11
|
+
{ORANGE}fire{/} {GRAY}→ Warm colors{/}
|
|
12
|
+
{CYAN}cool{/} {GRAY}→ Cool colors{/}
|
|
13
|
+
{PINK}pink{/} {GRAY}→ Pink/magenta{/}
|
|
14
|
+
{GREEN}hf{/} {GRAY}→ HelloFresh brand{/}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Themes
|
|
3
|
+
bigText: THEMES
|
|
4
|
+
gradient: cool
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
{WHITE}5 Built-in Themes:{/}
|
|
8
|
+
|
|
9
|
+
{GREEN}matrix{/} {GRAY}- Classic cyberpunk{/}
|
|
10
|
+
{PINK}neon{/} {GRAY}- Hot pink and cyan{/}
|
|
11
|
+
{ORANGE}retro{/} {GRAY}- 80s synthwave{/}
|
|
12
|
+
{WHITE}minimal{/} {GRAY}- Clean monochrome{/}
|
|
13
|
+
{GREEN}hacker{/} {GRAY}- All green terminal{/}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Keyboard Controls
|
|
3
|
+
bigText: CONTROLS
|
|
4
|
+
gradient: hf
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
{WHITE}Navigate your presentation:{/}
|
|
8
|
+
|
|
9
|
+
{CYAN}Space / Enter / →{/} {GRAY}Next slide{/}
|
|
10
|
+
{CYAN}← / Backspace{/} {GRAY}Previous slide{/}
|
|
11
|
+
{CYAN}0-9{/} {GRAY}Jump to slide{/}
|
|
12
|
+
{CYAN}l{/} {GRAY}Show slide list{/}
|
|
13
|
+
{CYAN}q / Esc{/} {GRAY}Quit{/}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineConfig } from '../src/index.js';
|
|
2
|
+
import matrix from '../src/themes/matrix/index.js';
|
|
3
|
+
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
title: 'term-deck Demo',
|
|
6
|
+
author: 'term-deck',
|
|
7
|
+
theme: matrix,
|
|
8
|
+
settings: {
|
|
9
|
+
startSlide: 0,
|
|
10
|
+
loop: false,
|
|
11
|
+
showProgress: false,
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Features
|
|
3
|
+
bigText: FEATURES
|
|
4
|
+
gradient: cool
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
{GREEN}✓{/} {WHITE}Matrix rain backgrounds{/}
|
|
8
|
+
{GREEN}✓{/} {WHITE}Glitch reveal animations{/}
|
|
9
|
+
{GREEN}✓{/} {WHITE}ASCII art with figlet{/}
|
|
10
|
+
{GREEN}✓{/} {WHITE}Color gradients{/}
|
|
11
|
+
{GREEN}✓{/} {WHITE}Multiple themes{/}
|
|
12
|
+
{GREEN}✓{/} {WHITE}Markdown slides{/}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Color Tokens
|
|
3
|
+
bigText: COLORS
|
|
4
|
+
gradient: pink
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
{GREEN}Green text with GREEN token{/}
|
|
8
|
+
|
|
9
|
+
{ORANGE}Orange text with ORANGE token{/}
|
|
10
|
+
|
|
11
|
+
{CYAN}Cyan text with CYAN token{/}
|
|
12
|
+
|
|
13
|
+
{PINK}Pink text with PINK token{/}
|
|
14
|
+
|
|
15
|
+
{WHITE}White text with WHITE token{/}
|
|
16
|
+
|
|
17
|
+
{GRAY}Gray text with GRAY token{/}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Gradients
|
|
3
|
+
bigText:
|
|
4
|
+
- GRADIENT
|
|
5
|
+
- TEXT
|
|
6
|
+
gradient: fire
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
{WHITE}Choose from built-in gradients:{/}
|
|
10
|
+
|
|
11
|
+
{ORANGE}fire{/} {GRAY}→ Warm colors{/}
|
|
12
|
+
{CYAN}cool{/} {GRAY}→ Cool colors{/}
|
|
13
|
+
{PINK}pink{/} {GRAY}→ Pink/magenta{/}
|
|
14
|
+
{GREEN}hf{/} {GRAY}→ HelloFresh brand{/}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Themes
|
|
3
|
+
bigText: THEMES
|
|
4
|
+
gradient: cool
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
{WHITE}5 Built-in Themes:{/}
|
|
8
|
+
|
|
9
|
+
{GREEN}matrix{/} {GRAY}- Classic cyberpunk{/}
|
|
10
|
+
{PINK}neon{/} {GRAY}- Hot pink and cyan{/}
|
|
11
|
+
{ORANGE}retro{/} {GRAY}- 80s synthwave{/}
|
|
12
|
+
{WHITE}minimal{/} {GRAY}- Clean monochrome{/}
|
|
13
|
+
{GREEN}hacker{/} {GRAY}- All green terminal{/}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Keyboard Controls
|
|
3
|
+
bigText: CONTROLS
|
|
4
|
+
gradient: hf
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
{WHITE}Navigate your presentation:{/}
|
|
8
|
+
|
|
9
|
+
{CYAN}Space / Enter / →{/} {GRAY}Next slide{/}
|
|
10
|
+
{CYAN}← / Backspace{/} {GRAY}Previous slide{/}
|
|
11
|
+
{CYAN}0-9{/} {GRAY}Jump to slide{/}
|
|
12
|
+
{CYAN}l{/} {GRAY}Show slide list{/}
|
|
13
|
+
{CYAN}q / Esc{/} {GRAY}Quit{/}
|