원클릭으로
openape-shapes
OpenAPE Shapes — grant-aware CLI wrappers with adapter registry for structured, auditable command execution
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
OpenAPE Shapes — grant-aware CLI wrappers with adapter registry for structured, auditable command execution
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
When a task can't be done with the other curated tools (file.read, http.get, tasks.create, mail.list, etc.), use bash — runs any shell command on the agent host through the DDISA grant cycle.
When the user asks you to read, write, or check a file in your home directory, use the file.read / file.write tools — they're $HOME-jailed and safer than bash cat.
When the user asks to fetch a webpage, hit a REST API, or POST JSON to an endpoint, use the http.get / http.post tools — never invent URLs.
When the user asks about their inbox — what's there, search for an email, recent unread — use mail.list / mail.search.
When the user wants to see, create, or schedule a task/reminder/wiedervorlage on their personal task list, use tasks.list / tasks.create.
When the user asks for the current time, date, or wants a sanity-check that the runtime is alive, use the time.now tool — never guess.
| name | openape-shapes |
| description | OpenAPE Shapes — grant-aware CLI wrappers with adapter registry for structured, auditable command execution |
| metadata | {"openclaw":{"emoji":"🔳","requires":{"bins":["shapes"]},"install":[{"kind":"node","package":"@openape/shapes","bins":["shapes"]}]}} |
Shapes wraps arbitrary CLI tools with structured adapters that describe what each command does, what permissions it needs, and how to verify execution. Every command runs through the OpenAPE grant system — no autonomous execution of wrapped commands.
shapes binary installed (npm install -g @openape/shapes)apes CLI for grant management and authenticationescapes binary (see openape-escapes skill)Adapters are TOML files that describe CLI tools: their commands, operations, required permissions, and resource chains. The registry is hosted on GitHub and cached locally.
shapes adapter search "<query>"
Searches by ID, name, description, tags, and category.
shapes adapter install <id> [--local] [--refresh]
~/.openape/shapes/adapters/--local: installs to .openape/shapes/adapters/ (project-scoped)--refresh: bypass the registry cache (useful after pushing new adapters)# List locally installed adapters
shapes adapter list
# List all adapters in the remote registry
shapes adapter list --remote
# JSON output
shapes adapter list --json
shapes adapter info <id>
Shows: ID, name, description, category, tags, author, executable, digest, install status.
# Update a specific adapter
shapes adapter update <id> [--yes]
# Update all installed adapters
shapes adapter update [--yes]
Without --yes, shows digest changes and requires confirmation (existing grants for updated adapters are invalidated).
shapes adapter verify <id> [--local]
Checks the installed adapter's digest against the registry.
When shapes looks for an adapter, it searches these directories in order:
.openape/shapes/adapters/ — project-local~/.openape/shapes/adapters/ — user-global/etc/openape/shapes/adapters/ — system-wideThe first matching adapter wins. Matching is by adapter ID, filename, or executable name.
Before requesting a grant, understand what permission a command needs:
shapes explain [--adapter <file>] -- <cli> <args...>
Output (JSON):
{
"adapter": "gh",
"source": "~/.openape/shapes/adapters/gh.toml",
"operation": "pr.create",
"display": "Create pull request",
"permission": "repo:write",
"resource_chain": ["repo:openape-ai/protocol", "pr:new"],
"exact_command": false,
"adapter_digest": "SHA-256:abc123..."
}
The -- separator is mandatory — everything after it is the wrapped command.
shapes request [--idp <url>] [--approval once|timed|always] [--reason "<text>"] [--adapter <file>] -- <cli> <args...>
This:
Example:
shapes request --reason "merge release PR" -- gh pr merge 42 --squash
shapes --grant <jwt> [--adapter <file>] -- <cli> <args...>
Use when you already have a grant token (e.g. from apes grants token).
Example:
TOKEN=$(apes grants token $GRANT_ID)
shapes --grant $TOKEN -- gh pr merge 42 --squash
When executing with --grant, shapes:
cmd_hashonce grants)If verification fails, the command is not executed.
Complete flow for an agent executing a CLI command through shapes:
1. shapes adapter install gh # Install adapter (once)
2. shapes explain -- gh pr list --repo myorg/myrepo # Understand what it does
3. shapes request --reason "list PRs" -- gh pr list --repo myorg/myrepo
# → Creates grant, waits for approval, executes on approval
Or step-by-step with apes for more control:
1. shapes adapter install gh # Install adapter
2. shapes explain -- gh pr merge 42 --squash # Check permission needed
3. apes grants request-capability gh --resource "repo:myorg/myrepo" \
--action "pr:merge" --wait # Request grant
4. TOKEN=$(apes grants token <grant-id>) # Get token
5. shapes --grant $TOKEN -- gh pr merge 42 --squash # Execute
For commands that need root:
1. apes grants request "apt update" --audience escapes --reason "patches" --wait
2. TOKEN=$(apes grants token <grant-id>)
3. escapes --grant $TOKEN -- apt update
Use escapes directly (not shapes) when the command needs root privileges. Shapes is for user-level CLI wrappers.
The shapes package also exports a programmatic API:
import { fetchRegistry, findAdapter, installAdapter, loadAdapter } from '@openape/shapes'
// Browse the registry
const index = await fetchRegistry()
const entry = findAdapter(index, 'gh')
// Install an adapter
await installAdapter(entry)
// Load and use an adapter
const loaded = loadAdapter('gh')
The registry is cached locally for 1 hour at ~/.openape/shapes/cache/registry.json. After pushing new adapters to the shapes-registry repo, use --refresh to bypass the cache:
shapes adapter install <id> --refresh
shapes adapter list --remote --refresh
Or manually delete the cache:
rm ~/.openape/shapes/cache/registry.json
Note: GitHub's raw CDN also caches files. If --refresh still shows stale data, wait 1–2 minutes for the CDN to propagate.
shapes request checks for existing approved grants via findExistingGrant(). If it creates a new grant instead of reusing an existing one, the most common cause is an adapter digest mismatch: the grant was created with an older version of the adapter.
How it happens:
SHA-256:abc...shapes adapter update <id> --yes → local digest changes to SHA-256:def...findExistingGrant() skips the old grant because req.execution_context.adapter_digest !== resolved.digestFix:
shapes adapter update <id> --yesImportant: Adapter updates invalidate ALL existing grants for that adapter. This is intentional — the adapter defines what permissions mean, so a changed adapter requires re-approval.
If you created a grant via apes grants request-capability and shapes request doesn't find it, check that the resource chain matches. The covering logic requires:
cli_id (adapter ID)actionExample: a grant with --resource account --resource mail --action list covers o365-mail-cli mail list --account foo@bar.com because the granted account resource has no selector (wildcard) which covers {email: foo@bar.com}.
--grant flag or the shapes request flow is mandatory.shapes explain before requesting grants to understand what permission you're asking for.shapes request (all-in-one) for simple flows; use apes step-by-step for complex flows.