Skip to content

Commit 2bc9be2

Browse files
Add PTY (pseudo-terminal) API documentation
Adds comprehensive documentation for the new PTY support feature from PR #310 (cloudflare/sandbox-sdk#310). New documentation includes: - Complete PTY API reference with all methods (create, attach, getById, list, etc.) - PTY handle interface documentation (write, resize, kill, onData, onExit) - Transport options (HTTP vs WebSocket) - When to use PTY vs Commands - Complete examples with xterm.js integration - Best practices and error handling patterns - Terminal configuration guide Also updates the API index page to include the PTY card in the navigation.
1 parent 9349794 commit 2bc9be2

File tree

2 files changed

+626
-0
lines changed

2 files changed

+626
-0
lines changed

src/content/docs/sandbox/api/index.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ The Sandbox SDK provides a comprehensive API for executing code, managing files,
2727
Execute commands and stream output. Run scripts, manage background processes, and capture execution results.
2828
</LinkTitleCard>
2929

30+
<LinkTitleCard
31+
title="PTY (Pseudo-Terminal)"
32+
href="/sandbox/api/pty/"
33+
icon="seti:shell"
34+
>
35+
Create interactive terminal sessions with full PTY support for terminal-based applications requiring ANSI codes and bidirectional I/O.
36+
</LinkTitleCard>
37+
3038
<LinkTitleCard
3139
title="Files"
3240
href="/sandbox/api/files/"

0 commit comments

Comments
 (0)