mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-04-09 11:55:53 +00:00
Update readme
This commit is contained in:
parent
ba17b2d739
commit
b52ebafb69
1 changed files with 69 additions and 13 deletions
|
|
@ -1,17 +1,73 @@
|
|||
# tty-spawn
|
||||
# tty-fwd
|
||||
|
||||
[](https://crates.io/crates/tty-spawn)
|
||||
[](https://github.com/mitsuhiko/teetty/blob/main/LICENSE)
|
||||
[](https://img.shields.io/badge/rust-1.63%2B-orange.svg)
|
||||
[](https://docs.rs/tty-spawn)
|
||||
`tty-fwd` is a utility to capture TTY sessions and forward them. It spawns processes in a pseudo-TTY and records their output in asciinema format while providing remote control capabilities.
|
||||
|
||||
`tty-spawn` is the underlying library on which
|
||||
[`teetty`](https://github.com/mitsuhiko/teetty) is built. It lets you spawn
|
||||
processes in a fake TTY and duplex stdin/stdout so you can communicate with an
|
||||
otherwise user attended process.
|
||||
## Features
|
||||
|
||||
## License and Links
|
||||
- **Session Management**: Create, list, and manage TTY sessions
|
||||
- **Remote Control**: Send text and key inputs to running sessions
|
||||
- **Output Recording**: Records sessions in asciinema format for playback
|
||||
- **Session Persistence**: Sessions persist in control directories with metadata
|
||||
- **Process Monitoring**: Tracks process status and exit codes
|
||||
|
||||
* [Documentation](https://docs.rs/tty-spawn/)
|
||||
* [Issue Tracker](https://github.com/mitsuhiko/teetty/issues)
|
||||
* License: [Apache-2.0](https://github.com/mitsuhiko/teetty/blob/main/LICENSE)
|
||||
## Usage
|
||||
|
||||
### Basic Usage
|
||||
|
||||
Spawn a command in a TTY session:
|
||||
```bash
|
||||
tty-fwd -- bash
|
||||
```
|
||||
|
||||
### Session Management
|
||||
|
||||
List all sessions:
|
||||
```bash
|
||||
tty-fwd --list-sessions
|
||||
```
|
||||
|
||||
Create a named session:
|
||||
```bash
|
||||
tty-fwd --session-name "my-session" -- vim
|
||||
```
|
||||
|
||||
### Remote Control
|
||||
|
||||
Send text to a session:
|
||||
```bash
|
||||
tty-fwd --session <session-id> --send-text "hello world"
|
||||
```
|
||||
|
||||
Send special keys:
|
||||
```bash
|
||||
tty-fwd --session <session-id> --send-key enter
|
||||
tty-fwd --session <session-id> --send-key arrow_up
|
||||
```
|
||||
|
||||
Supported keys: `arrow_up`, `arrow_down`, `arrow_left`, `arrow_right`, `escape`, `enter`
|
||||
|
||||
### Cleanup
|
||||
|
||||
Remove stopped sessions:
|
||||
```bash
|
||||
tty-fwd --cleanup
|
||||
```
|
||||
|
||||
Remove a specific session:
|
||||
```bash
|
||||
tty-fwd --session <session-id> --cleanup
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
- `--control-path`: Specify control directory location (default: `~/.vibetunnel/control`)
|
||||
- `--session-name`: Name the session when creating
|
||||
- `--session`: Target specific session by ID
|
||||
- `--list-sessions`: List all sessions with metadata
|
||||
- `--send-text`: Send text input to session
|
||||
- `--send-key`: Send special key input to session
|
||||
- `--cleanup`: Remove exited sessions
|
||||
|
||||
## License
|
||||
|
||||
Licensed under the Apache License, Version 2.0.
|
||||
Loading…
Reference in a new issue