Share an interactive terminal session (claude, codex) running on your PC with remote devices (ESP32, MCU, another machine) in real time — over MQTT.
vibetty runs a program in a PTY and publishes the terminal screen as ANSI text frames over MQTT. Remote clients subscribe to display the live screen and send keystrokes back. Both ends are just MQTT clients talking to the same broker, so no port on your PC needs to be exposed to the public internet.
MQTT is the primary sharing transport. It is opt-in: it turns on only when a
[mqtt]section exists in the config; otherwise MQTT is never touched. See the changelog.
⚠️ Firmware update required: vibetty0.4.xchanged the MQTT protocol (new topics,screen_texttag bytes,Sync.pixels/closefields, presenceformat). If you use a vibekeys keyboard device, update its firmware tov0.4.0+— older firmware will not be able to connect or display correctly.
- Live terminal sharing over MQTT — the screen is published as ANSI text frames (full baseline + raw PTY increments); remote devices subscribe and send keystrokes back.
- Built-in broker — pointing the broker URL at localhost makes vibetty auto-start an in-process rumqttd broker (TCP; optional WS for the debug page), so you need zero external infrastructure.
- Multi-instance discovery — each instance announces itself with a retained presence; a client discovers every one of your instances with a single wildcard subscription.
- Agent state detection — the terminal title is parsed to tell whether Codex / Claude Code is
workingorwaiting, and that state is broadcast alongside presence. - TUI controls — the terminal fills the window; a menu popup (agent status / MQTT / Fit / Quit) is toggled with a hotkey (
ctrl+oby default, configurable). The MQTT entry reflects the combined state (off/brkr/conn/on). - Cross-platform — Linux, macOS, Windows (via ConPTY).
One-liner (downloads the latest prebuilt binary to ~/.cargo/bin):
curl -fsSL https://raw.githubusercontent.com/second-state/vibetty/main/install.sh | bashUpgrading: just re-run the same command after a new release — the script installs the new version as vibetty-<version> and re-points the vibetty symlink, so running instances are never disturbed. If the latest version is already installed it says so and exits. To install a specific (pre)release instead, pass the tag: ... | bash -s -- v0.4.3-rc.1. Old versions accumulate in ~/.cargo/bin; the script offers to delete them after an upgrade.
Or download a prebuilt binary for your platform from the Releases page and put it on your PATH (e.g. ~/.cargo/bin).
Build from source
git clone https://github.com/second-state/vibetty
cd vibetty
cargo build --release
# binary: ./target/release/vibettyvibetty setupThis opens a TUI to fill in the [mqtt] fields and writes ~/.vibetty/config.toml. The simplest setup is the built-in broker — just point the broker at localhost; vibetty starts its built-in broker on that port automatically, no external service needed:
[mqtt]
broker = "mqtt://127.0.0.1:1883"Or point at your own broker / a free MQTT cloud:
[mqtt]
broker = "mqtt://user:pass@broker.example.com:1883" # mqtts:// for TLSWithout a
[mqtt]section, vibetty does not enable MQTT and never reaches the broker.
Optional UI settings: the menu popup (MQTT / Fit / Quit + agent status) is toggled with a
hotkey, ctrl+o by default (a plain ctrl+letter works on every platform — macOS, Linux and
Windows consoles; ctrl+shift combos are unreliable on the legacy Windows console). Override it in the same config file:
[ui]
menu_key = "ctrl+g" # modifiers: ctrl / shift / alt / super + a single character key
border = true # draw a ratatui border around the terminal (default on; toggled from
# the menu too); the border color follows the agent state and the
# top-right corner shows the current statusvibetty -- claude # share a `claude` session
vibetty -- codex # share a `codex` sessionBare vibetty (no -- <command>) shares your $SHELL. Explicit commands are still recommended for agents (-- claude); the MQTT entry in the menu popup (<menu_key> / ctrl+o) shows conn once it has connected and is sharing.
To keep it running in the background without occupying a terminal:
tmux new-session -d -s vibetty -c "$HOME/workspace" 'vibetty -- claude'
tmux capture-pane -t vibetty -p | tail -20 # check it's upTip: vibetty skill install --claude installs a run-vibetty skill that hands an agent the full background-session recipe.
vibetty -- <command> Run mode: share the given command in a TUI (default)
vibetty setup Configure [mqtt] via TUI
vibetty broker Start only the built-in MQTT broker (Ctrl-C to stop;
a second start just warns)
vibetty skill install --claude [--codex] Install the run-vibetty skill
vibetty skill uninstall --claude [--codex] Remove the run-vibetty skill
Run-mode options:
| Flag | Description | Default |
|---|---|---|
-- <command> |
Program to run in the PTY (e.g. -- claude) |
$SHELL |
--config <PATH> |
Override the config file path | ~/.vibetty/config.toml |
-a, --auto-submit |
Append Enter to input_text so a sent command is executed |
true |
--scrollback-lines <N> |
Local scrollback for device scroll_up/scroll_down on the main screen (full-screen apps such as Claude Code get PageUp/PageDown instead) |
8096 |
resources/mqtt_ws.html is a self-contained MQTT-over-WebSocket viewer: it connects to the built-in
broker's WS port (builtin_ws_port in the config; 0 disables it), discovers instances, shows the
screen, and can send input. vibetty no longer ships an HTTP server — host the file with any static
server (e.g. python3 -m http.server) and open it in a browser. Handy for testing without hardware.
vibetty ships a Herdr plugin manifest. Install it into Herdr with one command —
this fetches the repo, builds vibetty, and registers the plugin (the vibetty
binary ends up on your PATH, since Herdr resolves pane commands through PATH):
herdr plugin install second-state/vibettyFor local development, clone the repo and link it instead:
git clone https://github.com/second-state/vibetty && cd vibetty
herdr plugin link .Then configure MQTT once (vibetty setup), and trigger the share action from
the Herdr command palette — or bind a key (below).
Add this to ~/.config/herdr/config.toml (key = "" leaves it unset — pick your
own, e.g. prefix+i):
[[keys.command]]
key = "prefix+i"
type = "plugin_action"
command = "vibetty.share"
description = "Share this agent pane over Vibetty"Then reload Herdr's config (herdr server reload-config, or restart). Pressing
the key in any agent pane opens the vibetty status bar, which shows
<agent> ▸ <pane> · [MQTT · <X.XX MB>] · <title> ([MQTT ...] turns green once
connected). Press q (or Ctrl+C) in that pane to stop sharing.
MQTT not connecting? The [MQTT ...] bracket stays gray until vibetty
connects. If it never turns green, run vibetty setup to set the broker address
(writes ~/.vibetty/config.toml), then trigger share again.
- Detailed usage guide — configuration, the TUI, the full MQTT protocol, and an ESP32 / MCU integration guide. (中文版)
- Changelog · 中文更新日志
Linux, macOS, and Windows (via ConPTY).