Skip to content

commands

commands

Command registry for terok-sandbox.

Follows the same :class:CommandDef / :class:ArgDef pattern as terok_shield.registry. Higher-level consumers (terok, terok-agent) can import COMMANDS to build their own CLI frontends without duplicating argument definitions or handler logic.

Shield commands are delegated to terok-shield's own registry — SHIELD_COMMANDS re-exports the non-standalone subset.

ArgDef(name, help='', type=None, default=None, action=None, dest=None, nargs=None, required=False) dataclass

Definition of a single CLI argument.

CommandDef(name, help='', handler=None, args=(), group='') dataclass

Definition of a sandbox subcommand.

Attributes:

Name Type Description
name str

Subcommand name (e.g. "gate start").

help str

One-line help string.

handler Callable[..., None] | None

Callable implementing the command.

args tuple[ArgDef, ...]

Argument definitions.

group str

Command group (e.g. "gate", "shield").