cli

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package cli implements CLI subcommands that communicate with a running rysh session via NATS.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LaneCreate

func LaneCreate(store *session.Store, sessionName, tabID string) error

LaneCreate creates a new lane in the specified tab.

func LaneDelete

func LaneDelete(store *session.Store, sessionName, tabID, laneID string) error

LaneDelete deletes a lane by ID.

func LaneList

func LaneList(store *session.Store, sessionName, tabID string) error

LaneList lists all lanes in a tab.

func PaneCreate

func PaneCreate(store *session.Store, sessionName, tabID, laneID, paneGroupID string) error

PaneCreate creates a new pane in the specified tab and lane. If paneGroupID is empty, a new pane-group is auto-created first. If paneGroupID is provided, a stacked pane is added to the existing group.

func PaneDelete

func PaneDelete(store *session.Store, sessionName, paneID string) error

PaneDelete deletes a pane by ID.

func PaneGroupCreate

func PaneGroupCreate(store *session.Store, sessionName, tabID, laneID string) error

PaneGroupCreate creates a new pane group (split down) in the specified lane.

func PaneGroupDelete

func PaneGroupDelete(store *session.Store, sessionName, tabID, laneID, paneGroupID string) error

PaneGroupDelete deletes a pane group by ID.

func PaneGroupList

func PaneGroupList(store *session.Store, sessionName, tabID, laneID string) error

PaneGroupList lists all pane groups.

func PaneList

func PaneList(store *session.Store, sessionName, tabID, laneID string) error

PaneList lists panes in the specified tab and lane.

func PaneSendInput

func PaneSendInput(store *session.Store, sessionName, paneID, text, mode string) error

PaneSendInput sends input (shell command or AI prompt) to a pane in a running or detached session. If paneID is empty, the input is sent to the active pane via the workspace inbox. If paneID is specified, the input is delivered directly to that pane's inbox as a MsgPaneExecShell or MsgPaneExecPrompt (the PaneActor does not handle MsgSubmitInput directly; that conversion is done by PaneGroupActor in the normal routing chain).

func PipelineDisable

func PipelineDisable(store *session.Store, sessionName, tabID string) error

PipelineDisable disables pipeline mode for a tab.

func PipelineEnable

func PipelineEnable(store *session.Store, sessionName, tabID string) error

PipelineEnable enables pipeline mode for a tab.

func PipelineList

func PipelineList(store *session.Store, sessionName string) error

PipelineList lists pipeline state for all tabs.

func RyshCommand

func RyshCommand(store *session.Store, sessionName, tabID, paneID, command string) error

RyshCommand runs a "##" system command on a running/detached session and prints its output. It is the command-line equivalent of typing a "##" command in a pane. command is the rysh command body WITHOUT the leading "##" (e.g. "cmd echo hailo", "pane info", "tab list"). tabID/paneID select the target pane; empty values fall back to the tab's / workspace's active pane.

func StackedPaneCreate

func StackedPaneCreate(store *session.Store, sessionName, tabID, laneID, paneGroupID string) error

StackedPaneCreate creates a new stacked pane in the specified pane group.

func StackedPaneList

func StackedPaneList(store *session.Store, sessionName, paneGroupID string) error

StackedPaneList lists stacked panes in a pane group.

func TabCreate

func TabCreate(store *session.Store, sessionName string) error

TabCreate creates a new tab.

func TabDelete

func TabDelete(store *session.Store, sessionName, tabID string) error

TabDelete deletes a tab by ID.

func TabList

func TabList(store *session.Store, sessionName string) error

TabList lists all tabs in the running session.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client connects to a running rysh session's NATS server.

func NewClient

func NewClient(port int, sessionName string) (*Client, error)

NewClient connects to the NATS server at the given port.

func (*Client) Close

func (c *Client) Close()

Close drains and closes the NATS connection.

func (*Client) Request

func (c *Client) Request(message interface{}, timeout time.Duration) (interface{}, error)

Request sends a request/reply message to the workspace inbox.

func (*Client) RequestFromSubject

func (c *Client) RequestFromSubject(subject string, message interface{}, timeout time.Duration) (interface{}, error)

RequestFromSubject sends a request/reply to a specific subject.

func (*Client) RequestSnapshot

func (c *Client) RequestSnapshot(timeout time.Duration) (interface{}, error)

RequestSnapshot requests the full workspace snapshot.

func (*Client) Send

func (c *Client) Send(message interface{}) error

Send publishes a fire-and-forget message to the workspace inbox. It flushes the connection so the message is delivered before the short-lived CLI process exits (Close drains asynchronously).

func (*Client) SendToSubject

func (c *Client) SendToSubject(subject string, message interface{}) error

SendToSubject publishes a fire-and-forget message to a specific subject. It flushes so the message is delivered before the CLI process exits.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL