Skip to content

Commit e1fbafe

Browse files
committed
fix(demos): ship GIFs only; ignore VHS staging
1 parent b1f128f commit e1fbafe

11 files changed

Lines changed: 107 additions & 54 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ __pycache__/
1313
.pytest_cache/
1414
.DS_Store
1515
demos/vhs/staging/home/
16+
demos/vhs/staging/

demos/demo.gif

747 KB
Loading
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
33
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
4-
# shellcheck source=../sanitize-recording-env.sh
54
source "$SCRIPT_DIR/../sanitize-recording-env.sh"
65

76
PROFILE="${DEMO_PROFILE:-}"
@@ -10,17 +9,18 @@ if [[ -z "$PROFILE" ]] && [[ -f distribution.yaml ]]; then
109
fi
1110
PROFILE="${PROFILE:-$(basename "$REPO_ROOT")}"
1211

13-
CLEAN="$REPO_ROOT/demos/vhs/staging/clean-repo"
14-
rm -rf "$CLEAN"
15-
mkdir -p "$CLEAN"
16-
rsync -a \
17-
--exclude .venv \
18-
--exclude .git \
19-
--exclude 'demos/vhs/staging' \
20-
--exclude eval/runs \
21-
--exclude 'demos/vhs/out' \
22-
"$REPO_ROOT/" "$CLEAN/"
12+
ORG="${DEMO_GITHUB_ORG:-codegraphtheory}"
13+
SOURCE="${DEMO_INSTALL_SOURCE:-github}"
2314

24-
echo "Installing Hermes profile: $PROFILE"
25-
hermes profile install "$CLEAN" --name "$PROFILE" --force -y
15+
if [[ "$SOURCE" == "github" ]]; then
16+
echo "Installing Hermes profile from github.com/$ORG/$PROFILE"
17+
hermes profile install "github.com/$ORG/$PROFILE" --name "$PROFILE" --force -y
18+
else
19+
CLEAN="$REPO_ROOT/demos/vhs/staging/clean-repo"
20+
rm -rf "$CLEAN"
21+
mkdir -p "$CLEAN"
22+
rsync -a --exclude .venv --exclude .git --exclude 'demos/vhs/staging' --exclude eval/runs "$REPO_ROOT/" "$CLEAN/"
23+
echo "Installing Hermes profile: $PROFILE (local staging)"
24+
hermes profile install "$CLEAN" --name "$PROFILE" --force -y
25+
fi
2626
echo "Profile ready: hermes -p $PROFILE chat"
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
33
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
4-
# shellcheck source=../sanitize-recording-env.sh
54
source "$SCRIPT_DIR/../sanitize-recording-env.sh"
65

76
PROFILE="${DEMO_PROFILE:-}"
@@ -11,21 +10,22 @@ fi
1110
PROFILE="${PROFILE:-$(basename "$REPO_ROOT")}"
1211

1312
command -v expect >/dev/null || { echo "expect required" >&2; exit 1; }
13+
command -v hermes >/dev/null || { echo "hermes CLI required" >&2; exit 1; }
1414

1515
export TERM=xterm-256color
1616
stty cols 120 rows 36 2>/dev/null || true
1717

1818
export HOME HERMES_HOME PROFILE
1919
expect <<'EXPECT_EOF'
20-
set timeout 25
20+
set timeout 28
2121
set profile $env(PROFILE)
2222
log_user 1
2323
spawn env HOME=$env(HOME) HERMES_HOME=$env(HERMES_HOME) TERM=xterm-256color HERMES_TUI_FAST_ECHO=0 hermes -p $profile chat
24-
sleep 4
24+
sleep 5
2525
send "/help\r"
26-
sleep 3
26+
sleep 4
2727
send "/skin\r"
28-
sleep 2
28+
sleep 3
2929
send "\x03"
3030
expect eof
3131
EXPECT_EOF
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
4+
source "$SCRIPT_DIR/../sanitize-recording-env.sh"
5+
6+
PROFILE="${DEMO_PROFILE:-}"
7+
if [[ -z "$PROFILE" ]] && [[ -f distribution.yaml ]]; then
8+
PROFILE="$(grep -E '^name:' distribution.yaml | head -1 | sed 's/^name:[[:space:]]*//;s/"//g')"
9+
fi
10+
PROFILE="${PROFILE:-$(basename "$REPO_ROOT")}"
11+
12+
SKIN_DIR="$HERMES_HOME/profiles/$PROFILE/skins"
13+
SKIN_FILE="$SKIN_DIR/${PROFILE}.yaml"
14+
[[ -f "$SKIN_FILE" ]] || SKIN_FILE="$(find "$SKIN_DIR" -maxdepth 1 -name '*.yaml' | head -1)"
15+
16+
CYAN='\033[38;2;86;212;232m'
17+
MAG='\033[38;2;198;120;221m'
18+
GOLD='\033[38;2;255;215;0m'
19+
DIM='\033[38;2;136;146;155m'
20+
RST='\033[0m'
21+
22+
echo -e "${MAG}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${RST}"
23+
echo -e "${GOLD} Hermes profile${RST} ${CYAN}$PROFILE${RST} ${DIM}· skinned terminal preview${RST}"
24+
if [[ -f "$SKIN_FILE" ]]; then
25+
echo -e "${DIM} skin file:${RST} $(basename "$SKIN_FILE")"
26+
fi
27+
echo -e "${MAG}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${RST}"
28+
if command -v pyfiglet >/dev/null 2>&1; then
29+
pyfiglet -f slant "$PROFILE" 2>/dev/null | head -8 | while IFS= read -r line; do echo -e "${CYAN}${line}${RST}"; done
30+
else
31+
echo -e "${CYAN} $(echo "$PROFILE" | tr 'a-z' 'A-Z')${RST}"
32+
fi
33+
echo -e "${DIM} display.skin from config.yaml · hooks · skills · SOUL${RST}"
34+
if [[ -f SOUL.md ]]; then
35+
echo -e "${GOLD}── SOUL ──${RST}"
36+
sed -n '1,8p' SOUL.md | sed 's/^/ /'
37+
fi
38+
if [[ -d skills ]]; then
39+
echo -e "${GOLD}── skills ($(ls skills | wc -l | tr -d ' ')) ──${RST}"
40+
ls skills | head -8 | sed 's/^/ · /'
41+
fi
42+
echo -e "${MAG}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${RST}"

demos/vhs/demo-30s.tape

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,9 @@ Set FontSize 16
44
Set Width 1280
55
Set Height 720
66
Set Theme "Builtin Dark"
7-
Set TypingSpeed 55ms
7+
Set TypingSpeed 52ms
88

9-
Hide
10-
Type "source demos/vhs/sanitize-recording-env.sh" Enter
11-
Type "bash demos/vhs/bin/bootstrap-demo-profile.sh" Enter
12-
Sleep 8s
13-
Show
14-
15-
Type "# Skinned Hermes TUI (/help + profile skin)" Enter
16-
Sleep 800ms
17-
18-
Hide
19-
Type "source demos/vhs/sanitize-recording-env.sh" Enter
20-
Sleep 200ms
21-
Type "bash demos/vhs/bin/hermes-tui-skin-demo.sh" Enter
22-
Sleep 22s
23-
Show
9+
Type "# Hermes profile demo" Enter
10+
Sleep 600ms
11+
Type "bash demos/vhs/run-full-demo.sh" Enter
12+
Sleep 40s

demos/vhs/env-profile-only.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
# Minimal env for VHS (repos without heavy-coder src/).
3+
set -euo pipefail
4+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
5+
export REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd -P)"
6+
if [[ "${VHS_RECORDING:-}" != "1" ]]; then
7+
cd "$REPO_ROOT"
8+
fi

demos/vhs/env.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
# Minimal env for VHS (repos without heavy-coder src/).
3+
set -euo pipefail
4+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
5+
export REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd -P)"
6+
if [[ "${VHS_RECORDING:-}" != "1" ]]; then
7+
cd "$REPO_ROOT"
8+
fi

demos/vhs/render_demo_gif.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ set -euo pipefail
33
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
44
cd "$ROOT"
55
command -v vhs >/dev/null || { echo "Install: brew install vhs ffmpeg" >&2; exit 1; }
6+
command -v hermes >/dev/null || { echo "Install Hermes CLI" >&2; exit 1; }
7+
chmod +x demos/vhs/*.sh demos/vhs/bin/*.sh 2>/dev/null || true
68
mkdir -p demos
9+
export VHS_RECORDING=1
710
vhs demos/vhs/demo-30s.tape
811
ls -la demos/demo.gif

demos/vhs/run-full-demo.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
4+
cd "$ROOT"
5+
source demos/vhs/sanitize-recording-env.sh
6+
bash demos/vhs/bin/bootstrap-demo-profile.sh
7+
sleep 2
8+
bash demos/vhs/bin/print-profile-skin-ansi.sh
9+
sleep 3
10+
PROFILE="${DEMO_PROFILE:-$(grep -E '^name:' distribution.yaml | head -1 | sed 's/^name:[[:space:]]*//;s/"//g')}"
11+
PROFILE="${PROFILE:-$(basename "$REPO_ROOT")}"
12+
echo ""
13+
echo "hermes -p $PROFILE chat --cli"
14+
hermes -p "$PROFILE" chat --cli -q "Name three skills this profile provides." 2>&1 | head -20 || true
15+
sleep 2

0 commit comments

Comments
 (0)