cmd

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInitScript

func GetInitScript(shell string) string

getInitScript returns the shell integration script for the given shell

func IsInTmux

func IsInTmux() bool

inTmux returns true if running inside tmux

func IsMCPManageSubcommand added in v0.3.0

func IsMCPManageSubcommand(s string) bool

IsMCPManageSubcommand reports whether `nib mcp <s>` is a management command (as opposed to the server-serving forms: bare, --http, --stdio, --addr).

func RunCLI

func RunCLI(ctx context.Context, cfg types.Config, shellJobs *wizmcp.ShellJobs, transports ...mcp.Transport) error

func RunMCP added in v0.2.0

func RunMCP(ctx context.Context, cfg types.Config, args []string, shellJobs *wizmcp.ShellJobs, transports ...mcp.Transport) error

RunMCP serves nib's agent as an MCP server. args are the tokens after `nib mcp`; shellJobs is the shared background-shell registry; transports are the agent's tool servers.

func RunMCPCommand added in v0.3.0

func RunMCPCommand(args []string) int

RunMCPCommand dispatches `nib mcp <sub> ...` and returns an exit code.

func RunPluginCommand

func RunPluginCommand(args []string) int

RunPluginCommand dispatches `nib plugin <sub> ...` and returns an exit code.

func RunSkillCommand

func RunSkillCommand(args []string) int

RunSkillCommand dispatches `nib skill <sub> ...` and returns an exit code.

func RunTUI

func RunTUI(ctx context.Context, cfg types.Config, height int, shellJobs *wizmcp.ShellJobs, transports ...mcp.Transport) error

runTUI runs the Bubble Tea TUI

func RunTmuxSplit

func RunTmuxSplit(height string) error

runTmuxSplit runs nib in a tmux split pane (like fzf-tmux -d).

`tmux split-window` returns as soon as the pane is spawned, not when its command exits, so we can't capture the inner nib's selected command from its stdout directly. Instead the inner nib writes its command to a temp file and signals a tmux channel on exit; we block on that channel, then relay the file to our own stdout — which is what the Ctrl+Space shell widget captures.

Types

This section is empty.

Jump to

Keyboard shortcuts

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