Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .github/aw/actions-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
"version": "v8",
"sha": "ed597411d8f924073f98dfc5c65a23a2325f34cd"
},
"github/gh-aw-actions/setup@v0.61.0": {
"repo": "github/gh-aw-actions/setup",
"version": "v0.61.0",
"sha": "df014dd7d03b638e860b2aeca95c833fd97c8cf1"
},
"github/gh-aw/actions/setup@v0.50.1": {
"repo": "github/gh-aw/actions/setup",
"version": "v0.50.1",
Expand All @@ -19,11 +14,6 @@
"repo": "github/gh-aw/actions/setup",
"version": "v0.50.3",
"sha": "b70143d20a8292a3180986fa71533fdb8acb79e3"
},
"github/gh-aw/actions/setup@v0.53.4": {
"repo": "github/gh-aw/actions/setup",
"version": "v0.53.4",
"sha": "b2d8af7543ec40f72bb3b8fea5148c2d3ee401c7"
}
}
}
85 changes: 84 additions & 1 deletion .github/skills/doc-writer/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,90 @@ import ThemeImage from '@components/ThemeImage.astro';

### Terminal Recordings (Asciinema)

For details on terminal recordings, including how to create and embed them, see the [terminal-recordings skill reference](./references/terminal-recordings.md).
For CLI demonstrations, use asciinema recordings (`.cast` files) instead of static code blocks. These provide an interactive, playable terminal experience that better demonstrates command output and timing.

#### Existing Recordings

Recordings are stored in `src/frontend/public/casts/`. Check for existing recordings before creating new ones:

- `aspire-version.cast` - Shows `aspire --version` command
- `aspire-new.cast` - Shows project creation with `aspire new`
- `aspire-run.cast` - Shows running an Aspire app
- `aspire-help.cast` - Shows CLI help output
- `agent-init.cast` - Shows agent init command

#### Using AsciinemaPlayer

```mdx
import AsciinemaPlayer from '@components/AsciinemaPlayer.astro';

<AsciinemaPlayer
src="/casts/aspire-new.cast"
poster="npt:0:01"
rows={15}
autoPlay={false}
/>
```

**Common props**:
- `src`: Path to the `.cast` file (relative to `public/`)
- `rows`: Terminal height in rows (default: 15)
- `poster`: Frame to show before playback (e.g., `"npt:0:01"` = 1 second in)
- `autoPlay`: Whether to auto-play (default: false)
- `loop`: Whether to loop playback (default: true)
- `speed`: Playback speed multiplier (default: 1.5)
- `idleTimeLimit`: Max idle time between commands (default: 1.5s)

#### Creating New Recordings with Hex1b CLI

Use the Hex1b CLI tool to create new terminal recordings and screenshots. Install it first if needed:

```bash
dotnet tool install -g Hex1b.Tool
```

Refer to the **hex1b skill** for the full command reference. Common workflow:

1. Start a terminal session:
```bash
dotnet hex1b terminal start -- bash
# Note the terminal ID from the output
```

2. Send commands and wait for output:
```bash
dotnet hex1b keys <id> --text "aspire run"
dotnet hex1b keys <id> --key Enter
dotnet hex1b assert <id> --text-present "Ready" --timeout 30
```

3. Record a session:
```bash
dotnet hex1b capture recording start <id> --output session.cast
# ... interact with the terminal ...
dotnet hex1b capture recording stop <id>
```

4. Capture output as SVG (for screenshots) or text:
```bash
dotnet hex1b capture screenshot <id> --format svg --output screenshot.svg
dotnet hex1b capture screenshot <id> --format text --output output.txt
```

5. Stop the terminal when done:
```bash
dotnet hex1b terminal stop <id>
```

#### When to Use Recordings vs Code Blocks

| Content Type | Recommendation |
|--------------|----------------|
| CLI command with dynamic output | Asciinema recording |
| Simple one-liner command | Code block |
| Interactive terminal session | Asciinema recording |
| Configuration files | Code block |
| Long-running process (aspire run) | Asciinema recording |

## Testing Your Documentation

Expand Down
Loading