Files
cleveragents-core/docs/reference/resource_cli.md
T
HAL9000 18d00c04c4
CI / lint (pull_request) Failing after 1m15s
CI / quality (pull_request) Successful in 1m21s
CI / typecheck (pull_request) Successful in 1m34s
CI / security (pull_request) Successful in 1m37s
CI / coverage (pull_request) Has been skipped
CI / unit_tests (pull_request) Failing after 1m37s
CI / docker (pull_request) Has been skipped
CI / build (pull_request) Successful in 33s
CI / helm (pull_request) Successful in 26s
CI / push-validation (pull_request) Successful in 19s
CI / e2e_tests (pull_request) Successful in 3m20s
CI / integration_tests (pull_request) Successful in 4m32s
CI / status-check (pull_request) Failing after 3s
fix(skills): implement multi-scope agent skill discovery for global, project, and local tiers
Implements AgentSkillDiscovery class to support discovering Agent Skills from
multiple configured directories across three scopes (global, project, local).
Handles name collisions with precedence: local > project > global.

Adds comprehensive BDD test coverage for multi-scope discovery scenarios including:
- Global-only, project-only, and local-only discovery
- Combined discovery from all scopes
- Name collision resolution with proper precedence
- Non-existent and empty scope directory handling
- Multiple skills in same scope discovery

ISSUES CLOSED: #9369
2026-05-06 19:55:22 +00:00

4.0 KiB

Resource CLI Reference

The agents resource command group manages resource types and resource instances in the CleverAgents resource registry.

Resource Instance Commands

agents resource add

Add a new resource instance of a given type.

agents resource add git-checkout local/my-repo --path /home/user/repo
agents resource add fs-directory local/data --path /data --read-only

agents resource list

List registered resources with optional type filter.

agents resource list
agents resource list --type git-checkout
agents resource list --format json

agents resource show

Show details of a specific resource by name or ULID.

agents resource show local/my-repo
agents resource show 01HXYZ1234567890ABCDEFGHIJ

agents resource remove

Remove a resource from the registry.

agents resource remove local/my-repo
agents resource remove --yes local/my-repo

agents resource tree

Display a resource and its children as a tree (DAG). Output is deterministically ordered by resource name.

Options:

Option Description
--depth N Maximum tree depth (-1 for unlimited)
--type TYPE Filter children by resource type
--format Output format (json/yaml/plain/table/rich)

Examples:

# Show full tree
agents resource tree local/my-repo

# Limit depth to 2 levels
agents resource tree local/my-repo --depth 2

# Show only fs-directory children
agents resource tree local/my-repo --type fs-directory

# JSON output
agents resource tree local/my-repo --format json

agents resource inspect

Show detailed information about a resource. Optionally display the child tree or read file content.

Options:

Option Description
--tree Also show child tree
--file PATH Show file content (for git-checkout/fs-mount)
--format Output format (json/yaml/plain/table/rich)

Examples:

# Basic inspect
agents resource inspect local/my-repo

# Inspect with child tree
agents resource inspect local/my-repo --tree

# Read a file from a git-checkout resource
agents resource inspect local/my-repo --file README.md

# JSON output
agents resource inspect local/my-repo --format json

Create a DAG edge between two resources (parent -> child). The child's resource type must be allowed by the parent's type constraints. Cycles are rejected.

Examples:

agents resource link-child local/my-repo local/my-dir
agents resource link-child local/my-repo local/my-dir --format json

Remove a DAG edge between two resources. Requires confirmation unless --yes is passed.

Options:

Option Description
--yes Skip confirmation prompt
--format Output format

Examples:

agents resource unlink-child local/my-repo local/my-dir
agents resource unlink-child --yes local/my-repo local/my-dir

Resource Type Commands

agents resource type add

Register a custom resource type from a YAML configuration file.

agents resource type add --config ./resource-types/my-type.yaml

agents resource type list

List all registered resource types (built-in and custom).

agents resource type list
agents resource type list --format json

agents resource type show

Show details of a registered resource type.

agents resource type show git-checkout
agents resource type show --format json local/my-type

agents resource type remove

Remove a custom resource type. Built-in types cannot be removed.

agents resource type remove local/my-type
agents resource type remove --yes local/my-type