Skip to content

Commit 1b30b0e

Browse files
committed
feat(demos): Hermes skinned TUI VHS recordings
1 parent c265156 commit 1b30b0e

5 files changed

Lines changed: 73 additions & 19 deletions

File tree

demos/demo.gif

-74.2 KB
Loading
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
4+
# shellcheck source=../sanitize-recording-env.sh
5+
source "$SCRIPT_DIR/../sanitize-recording-env.sh"
6+
7+
PROFILE="${DEMO_PROFILE:-}"
8+
if [[ -z "$PROFILE" ]] && [[ -f distribution.yaml ]]; then
9+
PROFILE="$(grep -E '^name:' distribution.yaml | head -1 | sed 's/^name:[[:space:]]*//;s/"//g')"
10+
fi
11+
PROFILE="${PROFILE:-$(basename "$REPO_ROOT")}"
12+
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/"
23+
24+
echo "Installing Hermes profile: $PROFILE"
25+
hermes profile install "$CLEAN" --name "$PROFILE" --force -y
26+
echo "Profile ready: hermes -p $PROFILE chat"
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
4+
# shellcheck source=../sanitize-recording-env.sh
5+
source "$SCRIPT_DIR/../sanitize-recording-env.sh"
6+
7+
PROFILE="${DEMO_PROFILE:-}"
8+
if [[ -z "$PROFILE" ]] && [[ -f distribution.yaml ]]; then
9+
PROFILE="$(grep -E '^name:' distribution.yaml | head -1 | sed 's/^name:[[:space:]]*//;s/"//g')"
10+
fi
11+
PROFILE="${PROFILE:-$(basename "$REPO_ROOT")}"
12+
13+
command -v expect >/dev/null || { echo "expect required" >&2; exit 1; }
14+
15+
export TERM=xterm-256color
16+
stty cols 120 rows 36 2>/dev/null || true
17+
18+
export HOME HERMES_HOME PROFILE
19+
expect <<'EXPECT_EOF'
20+
set timeout 25
21+
set profile $env(PROFILE)
22+
log_user 1
23+
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
25+
send "/help\r"
26+
sleep 3
27+
send "/skin\r"
28+
sleep 2
29+
send "\x03"
30+
expect eof
31+
EXPECT_EOF

demos/vhs/demo-30s.tape

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,23 @@
11
Output demos/demo.gif
22
Set Shell "bash"
3-
Set FontSize 20
3+
Set FontSize 16
44
Set Width 1280
55
Set Height 720
6-
Set Theme "Catppuccin Mocha"
7-
Set TypingSpeed 50ms
6+
Set Theme "Builtin Dark"
7+
Set TypingSpeed 55ms
88

99
Hide
1010
Type "source demos/vhs/sanitize-recording-env.sh" Enter
11-
Sleep 400ms
11+
Type "bash demos/vhs/bin/bootstrap-demo-profile.sh" Enter
12+
Sleep 8s
1213
Show
1314

14-
Type "# ChainForge - smart contracts and audits" Enter
15-
Sleep 600ms
15+
Type "# Skinned Hermes TUI (/help + profile skin)" Enter
16+
Sleep 800ms
1617

1718
Hide
1819
Type "source demos/vhs/sanitize-recording-env.sh" Enter
19-
Sleep 300ms
20-
Type "python3 scripts/validate_profile.py ." Enter
21-
Sleep 5s
22-
Type "head -16 SOUL.md" Enter
23-
Sleep 5s
24-
Type "ls skills | head -10" Enter
25-
Sleep 4s
20+
Sleep 200ms
21+
Type "bash demos/vhs/bin/hermes-tui-skin-demo.sh" Enter
22+
Sleep 22s
2623
Show
27-
28-
Type "hermes profile install github.com/codegraphtheory/chainforge --name chainforge --yes" Enter
29-
Sleep 4s
30-
Type "# Security-first profile - validate before you ship" Enter
31-
Sleep 3s

demos/vhs/sanitize-recording-env.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,13 @@ export HOME="$_REPO_ROOT/demos/vhs/staging/home/graphtheory"
99
export USER=graphtheory
1010
export LOGNAME=graphtheory
1111
export HOSTNAME=cyber
12+
export HERMES_HOME="$HOME/.hermes"
13+
export HERMES_TUI_FAST_ECHO=0
14+
unset HERMES_TUI_THEME
15+
unset VSCODE_IPC_HOOK_CLI
16+
unset TERM_PROGRAM
1217

13-
mkdir -p "$HOME/users/graphtheory/projects"
18+
mkdir -p "$HERMES_HOME" "$HOME/users/graphtheory/projects"
1419
_WORKSPACE="$HOME/users/graphtheory/projects/$(basename "$_REPO_ROOT")"
1520
ln -sfn "$_REPO_ROOT" "$_WORKSPACE"
1621

0 commit comments

Comments
 (0)