Skip to content

Commit 497798c

Browse files
committed
docs: add recorded hero.gif + reproducible vhs tape
- scripts/hero.tape: vhs script driving a 23s demo through 4 style/theme combos (classic/graphite, capsule/dracula, hairline/nord, classic/ tokyo-night) using mock rate_limits JSON so it's deterministic. - scripts/build-hero-gif.sh: wrapper that runs vhs and trims the first ~3.5s of vhs setup leakage (Hide directive isn't reliable in vhs 0.11), then re-quantizes the palette to keep the GIF under ~250KB. - docs/images/hero.gif: 23s, 202KB, 1100x320 output. For off-platform sharing (X / Reddit / PH); README continues to use the 3KB animated hero.svg for inline GitHub rendering.
1 parent 21e9a5f commit 497798c

3 files changed

Lines changed: 95 additions & 0 deletions

File tree

docs/images/hero.gif

202 KB
Loading

scripts/build-hero-gif.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/usr/bin/env bash
2+
# Re-build docs/images/hero.gif from scripts/hero.tape.
3+
# Trims ~3.5s of vhs setup leakage and re-quantizes the palette.
4+
#
5+
# Deps: vhs (brew), ffmpeg (brew).
6+
7+
set -euo pipefail
8+
9+
HERE="$(cd "$(dirname "$0")" && pwd)"
10+
ROOT="$(cd "$HERE/.." && pwd)"
11+
TAPE="$ROOT/scripts/hero.tape"
12+
OUT="$ROOT/docs/images/hero.gif"
13+
TMP="$(mktemp -d)"
14+
trap 'rm -rf "$TMP"' EXIT
15+
16+
command -v vhs >/dev/null || { echo "missing: vhs (brew install vhs)" >&2; exit 1; }
17+
command -v ffmpeg >/dev/null || { echo "missing: ffmpeg (brew install ffmpeg)" >&2; exit 1; }
18+
19+
echo "[1/2] vhs render..."
20+
vhs "$TAPE" # writes to $OUT per the tape's `Output` directive
21+
22+
echo "[2/2] ffmpeg trim + re-quantize..."
23+
ffmpeg -y -loglevel warning \
24+
-ss 3.5 -i "$OUT" \
25+
-vf "fps=15,split[a][b];[a]palettegen=stats_mode=full[p];[b][p]paletteuse=dither=bayer:bayer_scale=5" \
26+
-f gif "$TMP/hero.gif"
27+
28+
mv "$TMP/hero.gif" "$OUT"
29+
30+
dur=$(ffprobe -v error -show_entries format=duration -of default=nw=1:nk=1 "$OUT")
31+
size=$(ls -lh "$OUT" | awk '{print $5}')
32+
echo "wrote $OUT (${dur}s, $size)"

scripts/hero.tape

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# vhs tape for the hero GIF.
2+
# Usage: brew install vhs && vhs scripts/hero.tape
3+
# Output: docs/images/hero.gif
4+
#
5+
# The demo feeds mock rate_limits JSON to `cs` so the bar shows believable
6+
# numbers regardless of where you run it. No mutation of your real config.
7+
8+
Output docs/images/hero.gif
9+
10+
Set Shell "bash"
11+
Set FontSize 18
12+
Set FontFamily "JetBrainsMono Nerd Font Mono,Menlo,monospace"
13+
Set Width 1100
14+
Set Height 320
15+
Set Padding 24
16+
Set Theme "Dracula"
17+
Set Framerate 30
18+
Set PlaybackSpeed 1.0
19+
Set TypingSpeed 35ms
20+
21+
# ---- Setup invisible: clean prompt + define the mock JSON in $J ----
22+
Hide
23+
Type "export PS1='$ '"
24+
Enter
25+
Type `J='{"session_id":"demo","model":{"display_name":"Opus 4.7"},"rate_limits":{"five_hour":{"used_percentage":58,"resets_at":'$(($(date +%s)+10020))',"status":"allow"},"seven_day":{"used_percentage":24,"resets_at":'$(($(date +%s)+304320))',"status":"allow"}}}'`
26+
Enter
27+
Type "clear"
28+
Enter
29+
Sleep 300ms
30+
Show
31+
32+
# ---- Pitch line ----
33+
Type "# Claude Code rate-limit usage, in your statusLine"
34+
Enter
35+
Sleep 1.2s
36+
Type "# 3 styles × 9 themes — let's try a few:"
37+
Enter
38+
Sleep 1.2s
39+
40+
# ---- 1) classic / graphite ----
41+
Type "echo $J | cs --style classic --theme graphite"
42+
Enter
43+
Sleep 2.2s
44+
45+
# ---- 2) capsule / dracula ----
46+
Type "echo $J | cs --style capsule --theme dracula"
47+
Enter
48+
Sleep 2.2s
49+
50+
# ---- 3) hairline / nord ----
51+
Type "echo $J | cs --style hairline --theme nord"
52+
Enter
53+
Sleep 2.2s
54+
55+
# ---- 4) classic / tokyo-night ----
56+
Type "echo $J | cs --style classic --theme tokyo-night"
57+
Enter
58+
Sleep 2.5s
59+
60+
# ---- 5) call to action ----
61+
Type "# pip install claude-statusbar && cs --setup"
62+
Enter
63+
Sleep 3s

0 commit comments

Comments
 (0)