cli

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: Apache-2.0 Imports: 58 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute() error

Types

type Agent

type Agent struct {
	// Name is the user-facing runner argument (`clawk run <name>`).
	// Must be unique. Lowercase ASCII, no whitespace. Also the command
	// resolved on the guest agent's PATH (which carries the image
	// config's Env), so it lands wherever the image installed the tool.
	Name string

	// DefaultArgs are prepended to whatever the user passes through
	// `-- <args>`. Every runner that can be told "you are already
	// externally sandboxed" is told so here: claude and codex have
	// explicit modes for it, pi has project trust.
	DefaultArgs []string

	// MCPConfigFlag is the runner's flag for loading an external MCP
	// server config file, or "" if clawk doesn't know how to hand this
	// runner one. When set and the sandbox declares servers, the flag and
	// sandbox.GuestMCPConfigPath are appended to the launch args.
	//
	// A per-runner flag rather than a line in DefaultArgs because the
	// value is conditional (a sandbox with no `mcp ( … )` block must not
	// get a flag pointing at a file that isn't there) and because each
	// runner spells this differently — codex and opencode use their own
	// config formats and pi loads MCP through an extension, so they stay
	// empty until someone renders those too.
	MCPConfigFlag string
}

Agent describes how a coding-agent runner is launched inside a sandbox. Treating each agent (claude, codex, pi, opencode, ...) as a data-driven entry rather than a per-agent code path keeps the CLI surface symmetric: every agent's verb works the same way, and adding another runner is a one-line registry change.

Jump to

Keyboard shortcuts

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