-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Summary
Allow shellwright to attach to and record an existing terminal session, rather than spawning a new one.
Use Case
Currently shellwright spawns processes via shell_start. But often you're already running something (claude code, vim, htop) and want to start recording mid-session. This feature would let you attach shellwright to an existing PTY and capture what's happening.
Proposed Approach
New tool: shell_attach or shell_record_external
Options:
- Attach by PID - attach to an existing process's PTY
- Attach by TTY - attach to a specific TTY device (e.g.,
/dev/ttys001) - Pipe mode - shellwright reads from stdin, useful with
scriptortmux
Example Usage
{
"tty": "/dev/ttys001",
"cols": 80,
"rows": 24
}Or integration with tmux capture-pane / script command.
Technical Considerations
- Reading from existing PTY requires appropriate permissions
- May need to poll/capture the terminal buffer periodically
- Could leverage
tmuxorscreenfor easier capture - Alternative: provide a CLI mode where shellwright wraps an existing command
Alternative: Wrapper Mode
shellwright wrap -- claudeThis would be simpler - shellwright spawns the process but the user interacts with it directly in their terminal, while shellwright records in the background.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels