# Resource CLI Reference ## Resource Type Commands ### `agents resource type add` Register a custom resource type from a YAML configuration file. ```bash agents resource type add --config ./resource-types/my-type.yaml agents resource type add --config ./resource-types/my-type.yaml --update ``` **Options:** - `--config, -c` (required): Path to the resource type YAML configuration file - `--update`: Update if type already exists - `--format, -f`: Output format (json, yaml, plain, table, rich) ### `agents resource type remove` Remove a custom resource type. Built-in types cannot be removed. ```bash agents resource type remove local/my-type agents resource type remove --yes local/my-type ``` **Arguments:** - `name` (required): Name of the resource type to remove **Options:** - `--yes, -y`: Skip confirmation prompt ### `agents resource type list` List all registered resource types (built-in and custom). ```bash agents resource type list agents resource type list --format json ``` **Options:** - `--format, -f`: Output format (json, yaml, plain, table, rich) ### `agents resource type show` Show details of a registered resource type. ```bash agents resource type show git-checkout agents resource type show --format json local/my-type ``` **Arguments:** - `name` (required): Name of the resource type **Options:** - `--format, -f`: Output format (json, yaml, plain, table, rich) ## Resource Commands ### `agents resource add` Add a new resource instance of the specified type. ```bash agents resource add git-checkout local/my-repo --path /home/user/repo agents resource add git-checkout local/my-repo --path /repo --branch main agents resource add fs-directory local/data --path /data --read-only ``` **Arguments:** - `type_name` (required): Resource type name (e.g., git-checkout, fs-directory) - `name` (required): Resource name (e.g., local/my-repo) **Options:** - `--path, -p`: Path for physical resources - `--branch, -b`: Branch for git-checkout resources - `--description, -d`: Resource description - `--read-only`: Mark resource as read-only - `--format, -f`: Output format (json, yaml, plain, table, rich) ### `agents resource list` List registered resources with optional type filtering. ```bash agents resource list agents resource list --type git-checkout agents resource list --format json ``` **Options:** - `--type, -t`: Filter by resource type - `--format, -f`: Output format (json, yaml, plain, table, rich) ### `agents resource show` Show details of a specific resource by name or ULID. ```bash agents resource show local/my-repo agents resource show 01HXYZ1234567890ABCDEFGHIJ ``` **Arguments:** - `resource` (required): Resource name or ULID **Options:** - `--format, -f`: Output format (json, yaml, plain, table, rich) ### `agents resource remove` Remove a resource from the registry. ```bash agents resource remove local/my-repo agents resource remove --yes local/my-repo ``` **Arguments:** - `resource` (required): Resource name or ULID to remove **Options:** - `--yes, -y`: Skip confirmation prompt