Loading...
Loading...
This skill provides guidance for implementing headless terminal interfaces that programmatically control shell sessions. Use this skill when implementing terminal emulation, pseudo-terminal wrappers, or interfaces like BaseTerminal that require sending keystrokes and reading output from shell processes.
npx skill4agent add letta-ai/skills headless-terminal| Library | Best For | Trade-offs |
|---|---|---|
| Interactive terminal emulation, pattern matching | Higher-level API, good for expect/send patterns |
| Low-level pseudo-terminal control | More control, but more boilerplate |
| Simple non-interactive commands | Limited for true terminal emulation |
pexpectptysubprocess-i.bashrc.bash_profileecho=False(24, 80)| Edge Case | Handling Strategy |
|---|---|
| Shell exits unexpectedly | Check process liveness before operations |
| Long-running commands | Configurable timeouts, background execution support |
| Non-ASCII characters | Explicit encoding handling (UTF-8 typically) |
| Race conditions | Appropriate delays between send and read operations |
| Command cancellation | Proper signal handling (SIGINT for Ctrl+C) |