Copy-paste smoke test recipe to verify the standalone CLI works. Run each section in order. Every expected output below has been verified against the live agentroot.io registry.
- Node.js >= 18
- pnpm (
npm install -g pnpm)
cd path/to/agent-root-cli
pnpm install
pnpm buildExpected: zero TypeScript errors. dist/bin/agentroot.js exists.
ls dist/bin/agentroot.jsLink the CLI globally so you can run agent-root from anywhere:
pnpm link --global
which agent-root # should resolve to the linked path
agent-root helpIf you prefer not to link globally, substitute node ./dist/bin/agentroot.js
for agent-root in every command below.
agent-root helpExpected: exit 0. Last paragraph mentions https://agentroot.io/docs/protocol.
agent-root resolve agentroot.ioExpected: exit 0. Prints a Manifest line plus at least 2 skill records
(register-domain, secondary-sales) with skill_md: URLs.
agent-root resolve agentroot.io --json | head -20Expected: exit 0. Valid JSON starting with {.
agent-root search paymentsExpected: exit 0. Either prints records or No records found (both are
correct, depending on what's in the live registry right now). When results
exist, the last lines are a pagination footer:
Page 1 of N (showing X of Y results).
agent-root search payments --jsonExpected: exit 0. Valid JSON. Top-level keys are
results, total, page, pages, limit, approximate. This is the full
envelope, not a bare array.
agent-root search doma --page 2 --limit 5 --jsonExpected: exit 0. page=2, limit=5, up to 5 entries in results.
agent-root search "skill to pay in USDC"
agent-root search "skill to pay in USDC" --no-semanticExpected: both exit 0. The first may print a
// no exact match — closest semantic matches: header with records tagged
{hybrid}/{vector}/{keyword} (the semantic fallback fires only when the
keyword search returns nothing); the second never shows that section.
agent-root healthExpected: exit 0 when the registry is up. Prints
status: ok and db: connected. Exits 1 if the API is unreachable
or reports a degraded state.
agent-root health --jsonExpected: valid JSON.
agent-root manifests --limit 3Expected: exit 0. Three manifest rows, each showing domain, manifest
URL, record counts, and verified date. Pagination footer at the end.
agent-root manifests --query doma --jsonExpected: exit 0. Valid JSON envelope with manifests, total,
page, pages, limit.
agent-root collectionsExpected: exit 0. At least one collection (featured-domains).
agent-root collections featured-domainsExpected: exit 0. Heading + per-item rows with domain and manifest URL.
agent-root collections does-not-existExpected: exit 1. Error message naming the missing slug.
agent-root submit doma.xyzExpected: exit 0. Found and indexed: ... records for doma.xyz.
The domain is already registered, so the registry re-verifies and
re-indexes.
agent-root submit definitely-not-a-real-domain-xyz123.testExpected: exit 1. Prints No _agentroot TXT record found ..., then
the exact TXT record to add and the spec link.
agent-root submit doma.xyz --jsonExpected: exit 0. Valid JSON with success: true, records_indexed,
and the resolved manifest.
# Valid manifest
mkdir -p /tmp/ar-test && cat > /tmp/ar-test/manifest.json <<'EOF'
{
"version": "1.0",
"domain": "example.com",
"records": [
{
"id": "test-skill",
"type": "skill",
"name": "Test",
"description": "Demo skill",
"skill_md": "https://example.com/.well-known/skills/test/SKILL.md"
}
]
}
EOF
agent-root validate /tmp/ar-test/manifest.jsonExpected: exit 0. Prints valid /tmp/ar-test/manifest.json plus a summary.
# Invalid manifest (missing domain)
echo '{"version":"1.0","records":[]}' > /tmp/ar-test/bad.json
agent-root validate /tmp/ar-test/bad.jsonExpected: exit 1. Prints invalid ... and lists Missing required field: "domain".
mkdir -p /tmp/ar-init && cd /tmp/ar-init
agent-root init
ls .well-known/Expected: exit 0. Creates .well-known/agentroot.json. Next-steps banner
prints 1. Edit .well-known/agentroot.json with your records.
cd - && rm -rf /tmp/ar-initagent-root listExpected: exit 0. Either prints installed records or "No records installed."
Run this before and after install below to see the change.
agent-root list --jsonExpected: exit 0. Valid JSON array.
# Use a temp HOME so this doesn't touch your real config
export AR_TEST_HOME=$(mktemp -d /tmp/ar-config-home.XXXXXX)
HOME=$AR_TEST_HOME agent-root config get
HOME=$AR_TEST_HOME agent-root config set api-base https://test.example.com
HOME=$AR_TEST_HOME agent-root config get api-base
HOME=$AR_TEST_HOME cat $AR_TEST_HOME/.agentroot/config.json
rm -rf $AR_TEST_HOME && unset AR_TEST_HOMEExpected:
config get(first run) prints "No configuration set. Defaults in use."config set ...prints "Saved to .../.agentroot/config.json"config get api-baseprintsapi-base = https://test.example.com- The config file contains
{"api-base":"https://test.example.com"}.
WORKDIR=$(mktemp -d /tmp/ar-install.XXXXXX)
ARHOME=$(mktemp -d /tmp/ar-install-home.XXXXXX)
cd $WORKDIR
# Install the secondary-sales skill into ./agents/skills/
HOME=$ARHOME agent-root install agentroot.io/secondary-sales --tool agents --project
ls .agents/skills/secondary-sales/SKILL.md # must exist
HOME=$ARHOME agent-root list # shows the install
# Re-fetch (should be a no-op since version_hash matches)
HOME=$ARHOME agent-root update agentroot.io/secondary-sales --tool agents --project
# Tear it down
HOME=$ARHOME agent-root uninstall agentroot.io/secondary-sales --tool agents --project
cd - && rm -rf $WORKDIR $ARHOMEExpected:
installexit0. Printsinstalled secondary-sales -> .agents/skills/secondary-sales/SKILL.mdand1 skill(s) installed successfully.listexit0. Showssecondary-sales [Skill] (agentroot.io).updateexit0. PrintsAlready up to date - no changes.uninstallexit0. Printsremoved agents: ...anduninstalled (1 tool copies removed).
pnpm unlink --global
which agent-root # should now print nothingIf you have the agentroot monorepo checked out alongside this repo, you can diff output side-by-side to confirm behavioral parity:
CLI=$(pwd)/dist/bin/agentroot.js
MONO=../agentroot/packages/cli/dist/bin/agentroot.js
# Build the monorepo CLI first if you haven't:
# (cd ../agentroot && pnpm --filter agent-root build)
diff <(node $CLI resolve agentroot.io) <(node $MONO resolve agentroot.io)
diff <(node $CLI list --json) <(node $MONO list --json)Expected: zero differences for resolve. list output should also match
(same on-disk store).
searchis intentionally no longer byte-for-byte with the monorepo CLI: the standalone adds the semantic-search fallback (/api/search) plus anapproximatefield in the--jsonenvelope, neither of which the monorepopackages/clihas. The standalone repo is the source of truth — do not diffsearchoutput against the monorepo.
For install --json parity (paths embed $HOME and $PWD, so normalize
those before diffing):
W1=$(mktemp -d) H1=$(mktemp -d) W2=$(mktemp -d) H2=$(mktemp -d)
cd $W1 && HOME=$H1 node $CLI install agentroot.io/secondary-sales --tool agents --project --json > /tmp/c.json
cd $W2 && HOME=$H2 node $MONO install agentroot.io/secondary-sales --tool agents --project --json > /tmp/m.json
sed "s|$H1|H|g;s|$W1|W|g" /tmp/c.json > /tmp/cn.json
sed "s|$H2|H|g;s|$W2|W|g" /tmp/m.json > /tmp/mn.json
diff /tmp/cn.json /tmp/mn.json # should be empty
cd - && rm -rf $W1 $H1 $W2 $H2 /tmp/c.json /tmp/m.json /tmp/cn.json /tmp/mn.jsonExpected: zero diff.