cli

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 50 Imported by: 0

Documentation

Overview

cmd/moat/cli/grant.go

cmd/moat/cli/grant_mcp.go

cmd/moat/cli/grant_ssh.go

cmd/agent/cli/revoke.go

Package cli implements the moat command-line interface using Cobra. It provides commands for managing AI agent runs, credentials, containers, and observability features.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddExecFlags

func AddExecFlags(cmd *cobra.Command, flags *ExecFlags)

AddExecFlags adds the common execution flags to a command.

func Execute

func Execute() error

Execute runs the root command.

func ExecuteRun

func ExecuteRun(ctx context.Context, opts intcli.ExecOptions) (*run.Run, error)

ExecuteRun runs a containerized command with the given options. It handles creating the run, starting it, and managing the lifecycle. Returns the run for further inspection if needed.

func RegisterProviderCLI

func RegisterProviderCLI()

RegisterProviderCLI registers CLI commands for all agent providers. This must be called after providers have registered themselves (e.g., after providers.RegisterAll() in main.go).

func RunAttached

func RunAttached(ctx context.Context, manager *run.Manager, r *run.Run) error

RunAttached runs in attached mode where output is streamed but stdin is not connected. Ctrl+C detaches (leaves run active), double Ctrl+C stops the run.

func RunInteractive

func RunInteractive(ctx context.Context, manager *run.Manager, r *run.Run) error

RunInteractive runs in interactive mode with stdin connected and TTY allocated.

func RunInteractiveAttached

func RunInteractiveAttached(ctx context.Context, manager *run.Manager, r *run.Run, command []string, tracePath string) error

RunInteractiveAttached runs in interactive mode using StartAttached to ensure the TTY is connected before the container process starts. This is required for TUI applications (like Codex CLI) that need to detect terminal capabilities immediately on startup (e.g., reading cursor position).

func Version

func Version() string

Version returns the build version string.

Types

type ExecFlags

type ExecFlags = intcli.ExecFlags

Re-export types from internal/cli for backward compatibility with code in cmd/moat/cli that uses these types.

type ExecOptions

type ExecOptions = intcli.ExecOptions

Jump to

Keyboard shortcuts

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