Skip to content

Commit 555710c

Browse files
committed
feat: add comprehensive demo GIFs and update usage documentation
1 parent 9517d94 commit 555710c

28 files changed

Lines changed: 516 additions & 54 deletions

.github/workflows/generate-terminal-gifs.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ jobs:
1313
matrix:
1414
tapes:
1515
- 'docs/vhs/install.tape'
16+
- 'docs/vhs/basic-usage.tape'
17+
- 'docs/vhs/yaml-config.tape'
18+
- 'docs/vhs/mappings-demo.tape'
19+
- 'docs/vhs/multiple-mappings.tape'
20+
- 'docs/vhs/advanced-features.tape'
21+
- 'docs/vhs/remote-content.tape'
22+
- 'docs/vhs/schema-generation.tape'
1623
runs-on: ubuntu-latest
1724
steps:
1825
- name: Checkout

docs/usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Run the script with the following command using one of the following subcommands
1010

1111
For more information, run the script with the `-h` or `--help` option (this is also available for each subcommand):
1212

13-
![Struct List](./vhs/usage.gif)
13+
![Struct List](./vhs/basic-usage.gif)
1414

1515
```sh
1616
struct -h

docs/vhs/advanced-features.gif

1.86 MB
Loading

docs/vhs/advanced-features.tape

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
Output docs/vhs/advanced-features.gif
2+
3+
Set Theme "Monokai Vivid"
4+
Set FontSize 14
5+
Set TypingSpeed 40ms
6+
Set Width 1400
7+
Set Height 800
8+
Set Shell "bash"
9+
10+
Type "# STRUCT Advanced Features Demo"
11+
Enter
12+
Sleep 1s
13+
14+
Type "# Generate schema for VSCode autocompletion"
15+
Enter
16+
Type "mkdir -p .vscode"
17+
Enter
18+
Type "struct generate-schema --output .vscode/struct-schema.json"
19+
Enter
20+
Sleep 2s
21+
22+
Type "# Show the generated schema"
23+
Enter
24+
Type "cat .vscode/struct-schema.json"
25+
Enter
26+
Sleep 3s
27+
28+
Type "# Create config with remote content"
29+
Enter
30+
Type "cat > remote-demo.yaml << EOF"
31+
Enter
32+
Type "files:"
33+
Enter
34+
Type " - LICENSE:"
35+
Enter
36+
Type " file: https://raw.githubusercontent.com/licenses/license-templates/master/templates/mit.txt"
37+
Enter
38+
Type " - .gitignore:"
39+
Enter
40+
Type " file: https://raw.githubusercontent.com/github/gitignore/refs/heads/main/Python.gitignore"
41+
Enter
42+
Type "EOF"
43+
Enter
44+
Sleep 2s
45+
46+
Type "# Generate with remote content"
47+
Enter
48+
Type "struct generate remote-demo.yaml ./remote-project"
49+
Enter
50+
Sleep 3s
51+
52+
Type "# Check what was downloaded"
53+
Enter
54+
Type "ls -la remote-project/"
55+
Enter
56+
Sleep 2s
57+
58+
Type "# Advanced features make STRUCT incredibly powerful!"
59+
Enter
60+
Sleep 2s

docs/vhs/basic-usage.gif

1.25 MB
Loading

docs/vhs/basic-usage.tape

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
Output docs/vhs/usage.gif
2+
3+
Set Theme "Dracula"
4+
Set FontSize 14
5+
Set Width 1200
6+
Set Height 600
7+
Set Shell "bash"
8+
9+
Type "# STRUCT - Basic Usage Demo"
10+
Enter
11+
Sleep 1s
12+
13+
Type "# First, let's see what structures are available"
14+
Enter
15+
Sleep 500ms
16+
17+
Type "struct list"
18+
Enter
19+
Sleep 2s
20+
21+
Type "# Let's generate a simple Python project"
22+
Enter
23+
Sleep 500ms
24+
25+
Type "struct generate project/python ./my-python-app"
26+
Enter
27+
Sleep 3s
28+
29+
Type "# Check what was created"
30+
Enter
31+
Sleep 500ms
32+
33+
Type "ls -la my-python-app/"
34+
Enter
35+
Sleep 2s
36+
37+
Type "# View the project structure"
38+
Enter
39+
Sleep 500ms
40+
41+
Type "tree my-python-app/ || find my-python-app/ -type f"
42+
Enter
43+
Sleep 2s
44+
45+
Type "# That's it! STRUCT made it easy to bootstrap a project"
46+
Enter
47+
Sleep 1s

docs/vhs/install.gif

29.5 MB
Loading

docs/vhs/install.tape

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,42 @@ Output docs/vhs/install.gif
44
Set Theme "Monokai Vivid"
55
Set FontSize 14
66
Set TypingSpeed 40ms
7-
Set WindowBar Colorful
8-
Set BorderRadius 8
9-
Set Margin 0
10-
Set Padding 10
117
Set Width 1400
128
Set Height 800
139
Set Shell "bash"
1410

15-
Type "# Create python virtual environment and install struct" Enter
16-
Type "python3 -m venv .venv" Enter
17-
Sleep 5
18-
Type "source .venv/bin/activate" Enter
19-
Sleep 5
20-
Type "pip install git+https://github.com/httpdss/struct.git" Enter
21-
# Wait+Screen /Successfully/
22-
Sleep 20
23-
Type "# STRUCT is now installed and ready to use" Enter
24-
Type "struct list" Enter
25-
Sleep 10
11+
Type "# STRUCT Installation Demo"
12+
Enter
13+
Sleep 1s
14+
15+
Type "# Create python virtual environment and install struct"
16+
Enter
17+
Type "python3 -m venv .venv"
18+
Enter
19+
Sleep 2s
20+
21+
Type "source .venv/bin/activate"
22+
Enter
23+
Sleep 1s
24+
25+
Type "# Install STRUCT from GitHub"
26+
Enter
27+
Type "pip install git+https://github.com/httpdss/struct.git"
28+
Enter
29+
Sleep 5s
30+
31+
Type "# Verify installation"
32+
Enter
33+
Type "struct --help"
34+
Enter
35+
Sleep 2s
36+
37+
Type "# Check available structures"
38+
Enter
39+
Type "struct list"
40+
Enter
41+
Sleep 3s
42+
43+
Type "# STRUCT is now installed and ready to use!"
44+
Enter
45+
Sleep 2s

docs/vhs/mappings-demo.gif

336 KB
Loading

docs/vhs/mappings-demo.tape

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
Output docs/vhs/mappings-demo.gif
2+
3+
Set Theme "Monokai Vivid"
4+
Set FontSize 14
5+
Set TypingSpeed 40ms
6+
Set Width 1400
7+
Set Height 800
8+
Set Shell "bash"
9+
10+
Type "# STRUCT Mappings Demo"
11+
Enter
12+
Sleep 1s
13+
14+
Type "# Create a simple mapping file with team data"
15+
Enter
16+
Type "cat > team-mapping.yaml << EOF"
17+
Enter
18+
Type "mappings:"
19+
Enter
20+
Type " team_info:"
21+
Enter
22+
Type " backend:"
23+
Enter
24+
Type ' lead: "Alice Johnson"'
25+
Enter
26+
Type ' tech_stack: ["Python", "FastAPI", "PostgreSQL"]'
27+
Enter
28+
Type ' repo: "https://github.com/company/backend"'
29+
Enter
30+
Type "EOF"
31+
Enter
32+
Sleep 2s
33+
34+
Type "# Create structure using mapping data"
35+
Enter
36+
Type "cat > project-with-mapping.yaml << EOF"
37+
Enter
38+
Type "mappings:"
39+
Enter
40+
Type " - team-mapping.yaml"
41+
Enter
42+
Type "files:"
43+
Enter
44+
Type " - README.md:"
45+
Enter
46+
Type " content: |"
47+
Enter
48+
Type " # Backend Team Project"
49+
Enter
50+
Type " Team Lead: Alice Johnson"
51+
Enter
52+
Type " Tech Stack: Python, FastAPI, PostgreSQL"
53+
Enter
54+
Type "EOF"
55+
Enter
56+
Sleep 2s
57+
58+
Type "# Generate project for backend team"
59+
Enter
60+
Type "struct generate project-with-mapping.yaml ./backend-project"
61+
Enter
62+
Sleep 3s
63+
64+
Type "# Check the generated README"
65+
Enter
66+
Type "cat backend-project/README.md"
67+
Enter
68+
Sleep 2s
69+
70+
Type "# Mappings enable data-driven project generation!"
71+
Enter
72+
Sleep 2s

0 commit comments

Comments
 (0)