Skip to content

Commit 06eb9c7

Browse files
jidongjidong
authored andcommitted
docs: add asciinema demo recording
1 parent dc43c5a commit 06eb9c7

2 files changed

Lines changed: 74 additions & 0 deletions

File tree

docs/demo-script.sh

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#!/bin/bash
2+
# ContextZip Demo Recording Script
3+
# Run: asciinema rec docs/demo.cast -c "bash docs/demo-script.sh"
4+
5+
export CONTEXTZIP_QUIET=1
6+
export PATH="$HOME/.local/bin:$PATH"
7+
8+
clear
9+
echo ""
10+
echo " ⚡ ContextZip Demo"
11+
echo " ─────────────────────"
12+
echo ""
13+
sleep 2
14+
15+
# Scene 1: Version
16+
echo " $ contextzip --version"
17+
sleep 0.5
18+
contextzip --version
19+
sleep 1.5
20+
echo ""
21+
22+
# Scene 2: Node.js error compression
23+
echo " $ contextzip err node broken-app.js"
24+
sleep 0.5
25+
cat << 'EOF' | contextzip err cat
26+
TypeError: Cannot read properties of undefined (reading 'id')
27+
at getUserProfile (/app/src/api/users.ts:47:23)
28+
at processAuth (/app/src/middleware/auth.ts:12:5)
29+
at Layer.handle (/app/node_modules/express/lib/router/layer.js:95:5)
30+
at next (/app/node_modules/express/lib/router/route.js:144:13)
31+
at Route.dispatch (/app/node_modules/express/lib/router/route.js:114:3)
32+
at Layer.handle (/app/node_modules/express/lib/router/layer.js:95:5)
33+
at next (/app/node_modules/express/lib/router/index.js:275:10)
34+
at Function.process_params (/app/node_modules/express/lib/router/index.js:331:12)
35+
at next (/app/node_modules/express/lib/router/index.js:271:10)
36+
at serveStatic (/app/node_modules/serve-static/index.js:75:16)
37+
EOF
38+
sleep 2
39+
echo ""
40+
41+
# Scene 3: git status compression
42+
echo " $ contextzip git status"
43+
sleep 0.5
44+
contextzip git status
45+
sleep 2
46+
echo ""
47+
48+
# Scene 4: gain dashboard
49+
echo " $ contextzip gain --by-feature"
50+
sleep 0.5
51+
contextzip gain --by-feature 2>&1 | head -20
52+
sleep 3
53+
echo ""
54+
55+
echo " ⚡ Install: npx contextzip"
56+
echo " 📦 GitHub: github.com/jee599/contextzip"
57+
echo ""
58+
sleep 3

docs/demo.cast

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{"version":3,"term":{"cols":80,"rows":24,"type":"xterm-256color","theme":{"fg":"#ffffff","bg":"#1e1e1e","palette":"#000000:#990000:#00a600:#999900:#0000b3:#b300b3:#00a6b3:#bfbfbf:#666666:#e60000:#00d900:#e6e600:#0000ff:#e600e6:#00e6e6:#e6e6e6"}},"timestamp":1774002368,"command":"bash docs/demo-script.sh","env":{"SHELL":"/bin/zsh"}}
2+
[0.014, "o", "\u001b[3J\u001b[H\u001b[2J"]
3+
[0.000, "o", "\r\n"]
4+
[0.000, "o", " ⚡ ContextZip Demo\r\n"]
5+
[0.000, "o", " ─────────────────────\r\n\r\n"]
6+
[2.008, "o", " $ contextzip --version\r\n"]
7+
[0.510, "o", "docs/demo-script.sh: line 18: contextzip: command not found\r\n"]
8+
[1.510, "o", "\r\n $ contextzip err node broken-app.js\r\n"]
9+
[0.512, "o", "docs/demo-script.sh: line 25: contextzip: command not found\r\n"]
10+
[2.015, "o", "\r\n $ contextzip git status\r\n"]
11+
[0.514, "o", "docs/demo-script.sh: line 44: contextzip: command not found\r\n"]
12+
[2.007, "o", "\r\n $ contextzip gain --by-feature\r\n"]
13+
[0.518, "o", "docs/demo-script.sh: line 51: contextzip: command not found\r\n"]
14+
[3.008, "o", "\r\n ⚡ Install: npx contextzip\r\n 📦 GitHub: github.com/jee599/contextzip\r\n"]
15+
[0.000, "o", "\r\n"]
16+
[3.011, "x", "0"]

0 commit comments

Comments
 (0)