Expand description
Optional Unix-socket control plane. When ebman is launched with
--control-socket PATH, this module opens a listener at PATH and accepts
one-shot requests:
SCREEN\n→ returns a plain-text rendering of the current TUI frame.KEY <SPEC>\n→ injects a synthesised key event into the run loop. Spec syntax:Down,Up,Enter,Esc,Tab,BackTab,Backspace,Home,End,PageUp,PageDown,Space,F1–F12, a single character, orChar(j). Combine withCtrl+,Shift+,Alt+.CMD <text>\n→ runs the given:command(leading colon optional).STATE\n→ returns a flat JSON object with current mode / profile / region / env count / selected env / load state.
Each TCP connection is a single request → response → close cycle, so the
ebman ctl … subcommand can stay stateless (and so the server is robust
against half-disconnected clients).
Security: the listener creates the socket with 0600 permissions so only
the current user can connect. Anyone with read access to that socket has
full control of the running ebman process, including dispatch of
destructive AWS actions — keep the socket path private.
Enums§
- Control
Op - One request received over the control socket. The main run loop drains
these from an mpsc channel and dispatches them inside
tokio::select!.
Functions§
- default_
socket_ path - Default control-socket path if the user doesn’t pass one explicitly.
~/.cache/ebman/control.sock. Theebman ctlsubcommand uses the same default so the two halves rendezvous without any flag. - parse_
key_ spec - Parse a key spec into a crossterm
KeyEvent. See the module-level docs for the grammar. ReturnsNoneif no terminal key code could be parsed. - render_
buffer_ as_ text - Render a ratatui
Bufferto plain text by walking its cells row by row. Trailing whitespace per line is stripped so the output is grep-friendly. - spawn_
listener - Open the Unix socket at
pathand spawn a listener task that translates inbound text requests intoControlOpmessages ontx. Silently returns on bind failure after logging the error — the TUI must keep running.