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 ¶
- func AddExecFlags(cmd *cobra.Command, flags *ExecFlags)
- func Execute() error
- func ExecuteRun(ctx context.Context, opts intcli.ExecOptions) (*run.Run, error)
- func RegisterProviderCLI()
- func RunInteractiveAttached(ctx context.Context, manager *run.Manager, r *run.Run, command []string, ...) error
- func Version() string
- type ExecFlags
- type ExecOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddExecFlags ¶
AddExecFlags adds the common execution flags to a command.
func ExecuteRun ¶
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 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).
Types ¶
type 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
Source Files
¶
- audit.go
- clean.go
- daemon.go
- deps.go
- destroy.go
- doctor.go
- doctor_claude.go
- exec.go
- grant.go
- grant_list.go
- grant_mcp.go
- grant_npm.go
- grant_providers.go
- grant_ssh.go
- helpers.go
- list.go
- logs.go
- proxy.go
- resolve.go
- revoke.go
- root.go
- run.go
- snapshot.go
- status.go
- stop.go
- system.go
- system_cleantemp.go
- system_containers.go
- system_images.go
- trace.go
- ttytrace.go
- version.go
- volumes.go
- wt.go