stuart-cli-0.1.2 is not a library.
stuart
stuart - Simple Terminal UART is a TUI for communicating with serial ports
Features
- Keep Open - Ports are kept open when a device disconnects and automatically reconnect when the device is back
- VT100/ANSI emulation - full color and cursor support
- Local Echo - show typed text for devices that don't return it themselves
- Scrollback buffer - up to 10,000 lines, mouse and keyboard scrolling
- Insert / Control modes - vim-inspired controls
- Port Selection - Select available ports and view information about them
- Clipboard copy - copy entire scrollback with
c - Flush scrollback - clear the screen with
f - Settings dialogue - baud rate, data bits, stop bits, parity, flow control; changes apply immediately
- Shell completions - bash, zsh, fish, elvish, powershell
Demo

Install
Arch Linux (AUR)
# Binary package
# Build from source
Cargo
# will install 'stuart' binary
Prebuilt binaries
Download from the releases page for Linux, Windows (x86_64) and macOS (aarch64).
Usage
Examples:
# open port selection screen
# connect directly
# connect at 9600 baud
Key Bindings
Port Selection
| Key | Action |
|---|---|
↑ / ↓ / j / k |
Navigate |
Enter |
Open port |
s |
Settings |
r |
Refresh port list |
q |
Quit |
Terminal - Control Mode
Enter control mode with Ctrl+Esc or Ctrl+Space.
[!NOTE] For
Ctrl+Escto work, your terminal emulator has to support the kitty keyboard protocol, which most modern emulators do. If not, onlyCtrl+Spacewill work.
| Key | Action |
|---|---|
a / i |
Enter insert mode |
↑ / ↓ / j / k |
Scroll |
Esc |
Scroll to bottom |
f |
Flush screen |
c |
Copy scrollback to clipboard |
+ / - |
Cycle baud rate |
s |
Settings |
Del |
Disconnect → port select |
q |
Quit |
Terminal - Insert Mode
All keypresses are forwarded to the device. Press Ctrl+Esc to return to control mode.
Settings
| Key | Action |
|---|---|
↑ / ↓ |
Navigate |
← / → |
Cycle value |
Enter |
Edit baud rate (type custom value) |
Esc |
Close |
Building from Source
# binary at target/release/stuart
Shell Completions
# zsh
# bash
# fish
# elvish and powershell also supported
Roadmap
- 0.2.0 - config file support
Contributing
Contributions are welcome, but make sure to file an issue first to discuss features and implementation.