Liking cljdoc? Tell your friends :D

hive-tmux.python.tmux-ops

High-level libtmux operations — server/session/pane lifecycle.

Topology: One tmux session named 'hive' (configurable). Each ling gets its own window (full-width, not a split).

All operations are synchronous (<10ms) — no asyncio needed.

High-level libtmux operations — server/session/pane lifecycle.

Topology: One tmux session named 'hive' (configurable).
Each ling gets its own window (full-width, not a split).

All operations are synchronous (<10ms) — no asyncio needed.
raw docstring

*socket-name*clj

tmux -L socket name every operation here targets; nil is the default server. e2e tests bind a private one, so they can never reach the server an operator runs.

tmux -L socket name every operation here targets; nil is the default
server. e2e tests bind a private one, so they can never reach the server
an operator runs.
sourceraw docstring

capture-outputclj

(capture-output pane)
(capture-output pane {:keys [lines] :or {lines 50}})

Capture the current pane content (last N lines).

Arguments: pane - libtmux pane object opts - {:lines int} (default 50)

Returns: Vector of strings (lines).

Capture the current pane content (last N lines).

Arguments:
  pane - libtmux pane object
  opts - {:lines int} (default 50)

Returns:
  Vector of strings (lines).
sourceraw docstring

create-pane!clj

(create-pane! {:keys [ling-id cwd session-name]
               :or {session-name default-session-name}})

Create a new window with a pane for a ling. Each ling gets its own window (full-width).

Arguments: opts - {:ling-id str, :cwd str, :session-name str}

Returns: {:pane-id str, :window-id str, :pane obj, :window obj}

Create a new window with a pane for a ling.
Each ling gets its own window (full-width).

Arguments:
  opts - {:ling-id str, :cwd str, :session-name str}

Returns:
  {:pane-id str, :window-id str, :pane obj, :window obj}
sourceraw docstring

ensure-server!clj

(ensure-server!)

Connect to the tmux server *socket-name* names. Cached per socket name. Returns the libtmux Server object or throws with actionable message.

Connect to the tmux server `*socket-name*` names. Cached per socket name.
Returns the libtmux Server object or throws with actionable message.
sourceraw docstring

ensure-session!clj

(ensure-session!)
(ensure-session! {:keys [session-name] :or {session-name default-session-name}})

Get or create the hive tmux session. Falls back to tmux new-session -d shell command when libtmux's new_session fails (e.g. 'not a terminal' in headless/nREPL contexts). Returns the session object.

Get or create the hive tmux session.
Falls back to `tmux new-session -d` shell command when libtmux's
new_session fails (e.g. 'not a terminal' in headless/nREPL contexts).
Returns the session object.
sourceraw docstring

kill-pane!clj

(kill-pane! pane)

Kill a tmux pane (and its window if it's the only pane).

Arguments: pane - libtmux pane object

Kill a tmux pane (and its window if it's the only pane).

Arguments:
  pane - libtmux pane object
sourceraw docstring

pane-alive?clj

(pane-alive? pane-id)

Check if a pane still exists on the tmux server.

Arguments: pane-id - string pane id (e.g. "%42")

Returns: true if pane exists, false otherwise.

Check if a pane still exists on the tmux server.

Arguments:
  pane-id - string pane id (e.g. "%42")

Returns:
  true if pane exists, false otherwise.
sourceraw docstring

reset-server!clj

(reset-server!)

Clear cached server. For testing.

Clear cached server. For testing.
sourceraw docstring

send-bracketed-paste!clj

(send-bracketed-paste! pane text)
(send-bracketed-paste! pane text opts)
(send-bracketed-paste! pane
                       text
                       {:keys [enter?] :or {enter? true}}
                       {:keys [call attr]})

Paste one literal CLI input frame, preserving LF, then submit one Enter. Requires a bracketed-paste-aware CLI (the self-steer Codex/Claude targets). Uses an owned temporary file/buffer; generic keyboard sending is unchanged.

Paste one literal CLI input frame, preserving LF, then submit one Enter.
Requires a bracketed-paste-aware CLI (the self-steer Codex/Claude targets).
Uses an owned temporary file/buffer; generic keyboard sending is unchanged.
sourceraw docstring

send-interrupt!clj

(send-interrupt! pane)

Send C-c interrupt to a tmux pane.

Arguments: pane - libtmux pane object

Send C-c interrupt to a tmux pane.

Arguments:
  pane - libtmux pane object
sourceraw docstring

send-keys!clj

(send-keys! pane text)
(send-keys! pane text opts)
(send-keys! pane
            text
            {:keys [enter? literal?] :or {enter? true literal? true}}
            {:keys [call attr]})

Send text literally; libtmux submits Enter separately. opts: :enter? and :literal? both default true. The final arity accepts transport operations for isolated adapters/tests.

Send text literally; libtmux submits Enter separately.
opts: :enter? and :literal? both default true.
The final arity accepts transport operations for isolated adapters/tests.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close