agenthud 0.9.4 → 0.11.0
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 +8 -5
- package/dist/index.js +1 -1
- package/dist/{main-26QL33AJ.js → main-KTFHI6KH.js} +705 -250
- package/package.json +1 -1
- package/scripts/record-demo.sh +72 -0
package/package.json
CHANGED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Interactive screencast workflow: record what you do in the terminal,
|
|
3
|
+
# automatically encode to demo/live.gif on Ctrl+D.
|
|
4
|
+
#
|
|
5
|
+
# Usage:
|
|
6
|
+
# scripts/record-demo.sh
|
|
7
|
+
#
|
|
8
|
+
# Override defaults with env vars, e.g.:
|
|
9
|
+
# COLS=120 ROWS=32 AGG_THEME=dracula scripts/record-demo.sh
|
|
10
|
+
#
|
|
11
|
+
# Dependencies (install once):
|
|
12
|
+
# brew install asciinema agg
|
|
13
|
+
|
|
14
|
+
set -euo pipefail
|
|
15
|
+
|
|
16
|
+
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
17
|
+
CAST="$ROOT/demo/.cache/live.cast"
|
|
18
|
+
GIF="$ROOT/demo/live.gif"
|
|
19
|
+
|
|
20
|
+
# Wider than the VHS tape's effective area so the split-pane TUI has
|
|
21
|
+
# room to breathe (tree gets ~22 rows, activity viewer ~25 rows at
|
|
22
|
+
# 48 total). For an even more generous recording use e.g.
|
|
23
|
+
# COLS=220 ROWS=56. Most modern emulators honor the xterm resize
|
|
24
|
+
# escape used below.
|
|
25
|
+
COLS="${COLS:-180}"
|
|
26
|
+
ROWS="${ROWS:-48}"
|
|
27
|
+
|
|
28
|
+
# agg ships: asciinema, dracula, github-dark, github-light, monokai,
|
|
29
|
+
# solarized-dark, solarized-light. Pass a path to a TOML file for
|
|
30
|
+
# anything else (e.g. Catppuccin Mocha).
|
|
31
|
+
AGG_THEME="${AGG_THEME:-monokai}"
|
|
32
|
+
AGG_FONT_SIZE="${AGG_FONT_SIZE:-16}"
|
|
33
|
+
|
|
34
|
+
for cmd in asciinema agg; do
|
|
35
|
+
if ! command -v "$cmd" >/dev/null 2>&1; then
|
|
36
|
+
echo "[record-demo] $cmd not found. Install with: brew install $cmd" >&2
|
|
37
|
+
exit 1
|
|
38
|
+
fi
|
|
39
|
+
done
|
|
40
|
+
|
|
41
|
+
mkdir -p "$(dirname "$CAST")"
|
|
42
|
+
rm -f "$CAST"
|
|
43
|
+
|
|
44
|
+
# Ask the terminal to resize itself. Works in iTerm2, Terminal.app,
|
|
45
|
+
# kitty, alacritty, wezterm; silently ignored elsewhere.
|
|
46
|
+
printf '\033[8;%d;%dt' "$ROWS" "$COLS"
|
|
47
|
+
|
|
48
|
+
cat <<EOF
|
|
49
|
+
[record-demo]
|
|
50
|
+
size : ${COLS} cols × ${ROWS} rows
|
|
51
|
+
cast : ${CAST}
|
|
52
|
+
gif : ${GIF}
|
|
53
|
+
|
|
54
|
+
Tips:
|
|
55
|
+
- Type 'clear' once the recording shell appears so the prompt
|
|
56
|
+
starts on a clean screen (your normal PS1 will be captured
|
|
57
|
+
otherwise).
|
|
58
|
+
- Run your scenario at a natural pace.
|
|
59
|
+
- When you're done, press Ctrl+D (or type 'exit') to stop.
|
|
60
|
+
|
|
61
|
+
EOF
|
|
62
|
+
|
|
63
|
+
read -r -p "Press Enter to start recording..." _
|
|
64
|
+
|
|
65
|
+
asciinema rec "$CAST"
|
|
66
|
+
|
|
67
|
+
echo
|
|
68
|
+
echo "[record-demo] Encoding ${CAST} → ${GIF}"
|
|
69
|
+
agg --font-size "$AGG_FONT_SIZE" --theme "$AGG_THEME" "$CAST" "$GIF"
|
|
70
|
+
|
|
71
|
+
echo "[record-demo] Done: ${GIF}"
|
|
72
|
+
echo "[record-demo] Preview: open '${GIF}'"
|