droidtui 0.5.1

A beautiful Terminal User Interface (TUI) for Android development and ADB commands
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
# VHS Demos for DroidTUI

This directory contains [VHS](https://github.com/charmbracelet/vhs) tape files for generating animated demos of droidtui.

## What is VHS?

VHS is a tool for generating terminal GIFs. It allows you to script terminal sessions and produce high-quality animated demos automatically.

## Prerequisites

### Install VHS

**macOS:**
```bash
brew install vhs
```

**Linux:**
```bash
# Download the latest release from:
# https://github.com/charmbracelet/vhs/releases

# Or use go install:
go install github.com/charmbracelet/vhs@latest
```

**Windows:**
```bash
# Using scoop
scoop install vhs

# Or download from releases
```

### Install ttyd (Required by VHS)

VHS requires `ttyd` for terminal recording:

**macOS:**
```bash
brew install ttyd
```

**Linux:**
```bash
# Ubuntu/Debian
sudo apt install ttyd

# Arch
sudo pacman -S ttyd
```

## Available Tapes

### 1. `quickstart.tape`

**Quick 30-second demo** showcasing basic features.

**Generate:**
```bash
vhs examples/vhs/quickstart.tape
```

**Output:** `quickstart.gif` (~1-2 MB)

**Shows:**
- Application launch with startup animation
- Basic menu navigation
- Entering and exiting submenus
- Simple workflow

**Use case:** Social media posts, README badges, quick previews

---

### 2. `main_menu.tape`

**Standalone example demo** featuring the `main_menu.rs` example.

**Generate:**
```bash
vhs examples/vhs/main_menu.tape
```

**Output:** `main_menu.gif` (~2-3 MB)

**Shows:**
- Vim-like navigation (j/k keys)
- Menu item selection and highlighting
- Command details panel
- Help screen toggle
- Full navigation workflow

**Use case:** Documentation, tutorials, example showcases

---

### 3. `full_demo.tape`

**Complete feature showcase** of the full droidtui application.

**Generate:**
```bash
vhs examples/vhs/full_demo.tape
```

**Output:** `full_demo.gif` (~4-6 MB)

**Shows:**
- TachyonFX startup animation
- All 14 ADB command categories
- Multi-level submenu navigation
- Various command options
- Complete application workflow
- Android green theming throughout

**Use case:** Project presentations, detailed walkthroughs, marketing

---

### 4. `streaming.tape`

**Screen streaming demo** featuring the streaming example with scrcpy integration.

**Generate:**
```bash
vhs examples/vhs/streaming.tape
```

**Output:** `streaming.gif` (~3-5 MB)

**Shows:**
- Multiple quality presets (480p to 1080p+)
- Gaming mode with 60fps support
- Recording capabilities
- Read-only viewing mode
- Various streaming options

**Use case:** Showcasing screen streaming features, scrcpy integration demos

---

### 5. `device_info.tape`

**Device information query demo** showing how to query various device details.

**Generate:**
```bash
vhs examples/vhs/device_info.tape
```

**Output:** `device_info.gif` (~3-4 MB)

**Shows:**
- Hardware information queries
- System properties display
- Network status information
- Battery and storage details
- Security patch information

**Use case:** Device information feature demos, ADB query examples

---

### 6. `navigation_showcase.tape`

**Navigation features demo** highlighting vim-like navigation and smooth animations.

**Generate:**
```bash
vhs examples/vhs/navigation_showcase.tape
```

**Output:** `navigation_showcase.gif` (~4-5 MB)

**Shows:**
- Vim-style j/k navigation
- Arrow key support
- Menu and submenu navigation
- Quick scrolling
- Smooth animations

**Use case:** UI/UX demonstrations, navigation tutorials

---

### 7. `package_manager.tape`

**Package management demo** featuring app installation, permissions, and management.

**Generate:**
```bash
vhs examples/vhs/package_manager.tape
```

**Output:** `package_manager.gif` (~3-5 MB)

**Shows:**
- Package listing and queries
- App installation/uninstallation
- Permission management
- Cache and data clearing
- Enable/disable apps

**Use case:** Package management feature demos, app management tutorials

---

### 8. `all_examples.tape`

**Comprehensive showcase** featuring all standalone examples in one demo.

**Generate:**
```bash
vhs examples/vhs/all_examples.tape
```

**Output:** `all_examples.gif` (~6-8 MB)

**Shows:**
- Quick tour of main_menu example
- Device information queries
- Package management operations
- Screen streaming options
- Brief full application demo
- All 4 standalone examples

**Use case:** Overview presentations, comprehensive feature showcase

---

### 9. `features_highlight.tape`

**Features showcase** highlighting the best and most impressive features of DroidTUI.

**Generate:**
```bash
vhs examples/vhs/features_highlight.tape
```

**Output:** `features_highlight.gif` (~5-7 MB)

**Shows:**
- TachyonFX startup animation
- Smooth vim-like navigation
- Multi-level menu system
- All 14 command categories
- Lightning fast workflow
- Beautiful theming throughout

**Use case:** Marketing material, feature presentations, social media highlights

---

## Quick Start

### Generate All Demos

Use the provided script:

```bash
./examples/vhs/generate_all.sh
```

This will generate all three GIF files automatically.

### Generate Individual Demos

From the project root:

```bash
# Quick demo
vhs examples/vhs/quickstart.tape

# Example demo
vhs examples/vhs/main_menu.tape

# Full demo
vhs examples/vhs/full_demo.tape
```

### View Generated GIFs

```bash
# macOS
open examples/vhs/quickstart.gif

# Linux
xdg-open examples/vhs/quickstart.gif

# Or use your preferred image viewer
```

## Customizing Tapes

### Basic Structure

A VHS tape file consists of commands that control the recording:

```tape
# Settings
Output output.gif
Set Shell "bash"
Set FontSize 14
Set Width 1200
Set Height 800

# Actions
Type "droidtui"
Enter
Sleep 2s
Type "q"
```

### Common Commands

| Command | Description | Example |
|---------|-------------|---------|
| `Output` | Set output filename | `Output demo.gif` |
| `Set` | Configure settings | `Set FontSize 16` |
| `Type` | Type text | `Type "hello"` |
| `Enter` | Press Enter key | `Enter` |
| `Sleep` | Wait duration | `Sleep 1s` |
| `Up/Down` | Arrow keys | `Down 3` |
| `Space` | Press spacebar | `Space` |
| `Backspace` | Press backspace | `Backspace` |
| `Ctrl+C` | Control key combo | `Ctrl+C` |

### Settings

Common VHS settings used in our tapes:

```tape
Set Shell "bash"          # Shell to use
Set FontSize 14           # Terminal font size
Set Width 1200            # Terminal width in pixels
Set Height 800            # Terminal height in pixels
Set Padding 20            # Padding around terminal
Set Theme "Dracula"       # Color theme
Set TypingSpeed 50ms      # Speed of typing
Set PlaybackSpeed 1.0     # Playback speed multiplier
```

### Available Themes

VHS supports many themes:
- `Dracula` (default in our tapes)
- `Nord`
- `Monokai`
- `Solarized Dark`
- `Solarized Light`
- `Gruvbox Dark`
- And many more...

## Creating New Tapes

### Template

```tape
# Output settings
Output examples/vhs/my_demo.gif
Set Shell "bash"
Set FontSize 14
Set Width 1200
Set Height 800
Set Padding 20
Set Theme "Dracula"

# Your demo script
Type "droidtui"
Enter
Sleep 2s

# ... your actions ...

Type "q"
Sleep 1s
```

### Best Practices

1. **Keep it focused** - Each tape should demonstrate one concept
2. **Use appropriate timing** - 500ms-1s for quick actions, 1.5-2s for viewing
3. **Add context** - Use `Type "# Comment"` to explain what's happening
4. **Test multiple times** - Run the tape several times to ensure consistency
5. **Optimize file size** - Shorter recordings = smaller GIFs
6. **Clear state** - Start with `clear` or fresh terminal state
7. **End cleanly** - Always quit the application properly

### Tips for Recording droidtui

```tape
# Wait for startup animation (important!)
Sleep 3s

# Press any key to continue past startup
Space
Sleep 1s

# Use navigation keys
Type "j"    # Move down
Type "k"    # Move up
Enter       # Select/Enter submenu
Backspace   # Go back to main menu
Type "q"    # Quit

# Add pauses to show content
Sleep 1.5s  # Let viewers read
```

## Troubleshooting

### VHS Command Not Found

Ensure VHS is in your PATH:
```bash
which vhs
# If not found, reinstall or check installation
```

### ttyd Not Found

Install ttyd (required by VHS):
```bash
# macOS
brew install ttyd

# Linux
sudo apt install ttyd  # Ubuntu/Debian
```

### GIF Not Generated

Check for errors in the VHS output:
```bash
vhs examples/vhs/quickstart.tape --verbose
```

### Recording Too Long

- Reduce sleep times
- Remove unnecessary navigation
- Focus on key features only

### Application Not Found

Make sure droidtui is built and in PATH:
```bash
cargo build --release
# Or install it
cargo install --path .
```

For the example demos:
```bash
# Make sure you can run the example
cargo run --example main_menu
```

## Output Files

Generated files (`.gif`, `.mp4`, `.webm`) are ignored by git (see `.gitignore`).

To share demos:
1. Generate the GIFs
2. Upload to GitHub releases or issues
3. Or host on image sharing services

## Resources

- [VHS Documentation]https://github.com/charmbracelet/vhs
- [VHS Examples]https://github.com/charmbracelet/vhs/tree/main/examples
- [Charm.sh Blog]https://charm.sh/blog/

## Summary of Tapes

| Tape | Duration | Size | Purpose |
|------|----------|------|---------|
| `quickstart.tape` | ~30s | 1-2 MB | Quick social media demo |
| `main_menu.tape` | ~45s | 2-3 MB | Example showcase |
| `full_demo.tape` | ~60s | 4-6 MB | Complete app walkthrough |
| `streaming.tape` | ~45s | 3-5 MB | Streaming features |
| `device_info.tape` | ~50s | 3-4 MB | Device queries |
| `navigation_showcase.tape` | ~55s | 4-5 MB | Navigation demo |
| `package_manager.tape` | ~50s | 3-5 MB | Package management |
| `all_examples.tape` | ~90s | 6-8 MB | Comprehensive tour |
| `features_highlight.tape` | ~60s | 5-7 MB | Best features showcase |

## Contributing

When adding new VHS tapes:

1. Create the `.tape` file in this directory
2. Create a corresponding example in `examples/` (if needed)
3. Test it multiple times to ensure consistency
4. Update this README with tape details
5. Add the tape to `generate_all.sh` script
6. Document the use case and output
7. Consider file size and demo length (keep under 60 seconds if possible)

---

## Available Examples

DroidTUI provides several standalone examples that can be run independently:

### `main_menu.rs`
Basic menu navigation example with 13 ADB commands.
```bash
cargo run --example main_menu
```

### `streaming.rs`
Screen streaming options with scrcpy integration and quality presets.
```bash
cargo run --example streaming
```

### `device_info.rs`
Comprehensive device information queries (16 categories).
```bash
cargo run --example device_info
```

### `package_manager.rs`
Package management operations including install, uninstall, and permissions (20 actions).
```bash
cargo run --example package_manager
```

Each example demonstrates specific features and can be used as reference implementations.

---

**Made with ❤️ and VHS by Charm**