37 resources, one flag syntax
Command reference
Every invocation has the same shape:
node subagent.js <resource> [id] [flags]
resource selects which family API to hit and supplies its default host. [id] is optional — when present, the script requests /api/<endpoint>/<id> instead of the list route. Flags come after.
Resources
contracts
node subagent.js contracts
tasks
node subagent.js tasks --query=status:pending
identities
node subagent.js identities
citations
node subagent.js citations
cache
node subagent.js cache --query=source:manual_dashboard_paste
rubrics
node subagent.js rubrics rbc_worker_quality
outcomes
node subagent.js outcomes
evaluations
node subagent.js evaluations --query=target_site:subagentidentities.com
brands
node subagent.js brands
code
node subagent.js code --query=model:claude-fable-5
prompts
node subagent.js prompts --query=category:guardrail
skills
node subagent.js skills --query=plugin:cwc-deploy
roles
node subagent.js roles --query=kind:domain_coworker
memories
node subagent.js memories
models
node subagent.js models --query=family:fable
rust
node subagent.js rust --query=crate:schema
python
node subagent.js python
typescript
node subagent.js typescript
permissions
node subagent.js permissions
vaults
node subagent.js vaults
sessions
node subagent.js sessions
tools
node subagent.js tools
hooks
node subagent.js hooks --query=category:vault
handoffs
node subagent.js handoffs
graphql
node subagent.js graphql
html
node subagent.js html
swift
node subagent.js swift
engineering
node subagent.js engineering
legal
node subagent.js legal
finance
node subagent.js finance
managers
node subagent.js managers
support
node subagent.js support
plugins
node subagent.js plugins
sdk
node subagent.js sdk
servers
node subagent.js servers
spec
node subagent.js spec
protocols
node subagent.js protocols --query=category:x402
Flags
| Flag | Meaning |
|---|---|
--site=host | Override the default host for the chosen resource — useful for pointing at a staging deploy or a fork. |
--query=key:value,key2:value2 | Comma-separated key:value pairs, translated into ?key=value&key2=value2 query-string parameters on the request. |
--data='{"json":"body"}' | A raw JSON string sent as the request body. Supplying --data without an explicit --method automatically switches the request to POST. |
--method=GET|POST|PATCH | Explicit HTTP method. Defaults to POST when --data is set, otherwise GET. |
--token=SECRET | Sent as Authorization: Bearer SECRET — required by every family site's write endpoints (e.g. CACHE_WRITE_SECRET, IDENTITIES_WRITE_SECRET, CITATIONS_WRITE_SECRET). |
Reading the response
The script always tries to parse the response body as JSON and pretty-print it with two-space indentation. If parsing fails (not every family route returns JSON), it falls back to printing the raw response text. A non-2xx HTTP status sets a non-zero exit code, so subagent.js composes cleanly with shell && chains and CI scripts.
Full examples
node subagent.js contracts
node subagent.js contracts ctr_devices_catalog
node subagent.js tasks --query=status:pending
node subagent.js tasks tsk_wire_live_cache_graphql --method=PATCH --data='{"status":"completed"}' --token=$TASKS_WRITE_SECRET
node subagent.js cache --query=source:manual_dashboard_paste
node subagent.js evaluations --query=target_site:subagentidentities.com
node subagent.js rubrics rbc_worker_quality
node subagent.js identities --site=staging.subagentidentities.com
Download the script at /subagent.js, or read the install page for the one-liner.