Agent SDK CLI

LayerArc API access without raw curl.

Use the LayerArc Agent SDK CLI from coding agents, automation scripts, or local terminals to call project, page, and Google Search Console APIs with stable JSON output.

npx -y @layerarc/agent-sdk-cli@next pages list
npx -y @layerarc/agent-sdk-cli@next gsc url-inspection inspect \
  --inspection-url https://example.com/pricing

Install and configure

The CLI is designed for agents and power users. It is non-interactive, reads credentials from environment variables, and never prints your token. LayerArc is in early access, so use the @next npm channel unless a release has been promoted to latest.

export LAYERARC_AGENT_API_BASE_URL="https://agent.layerarc.com/v1"
export LAYERARC_AGENT_API_TOKEN="<YOUR_AUTH_TOKEN>"
export LAYERARC_PROJECT_ID="<OPTIONAL_DEFAULT_PROJECT_ID>"

npx -y @layerarc/agent-sdk-cli@next projects list

Why agents should use it

Typed command surface

Commands map to LayerArc APIs, so agents avoid fragile shell quoting and arbitrary URL construction.

Project defaults

Set LAYERARC_PROJECT_ID once so project-scoped commands stay short and deterministic.

Machine-readable output

Every command returns stable JSON with ok, data, or error.

Common commands

Use these examples directly, or ask your agent to inspect the built-in docs and skills first.

npx -y @layerarc/agent-sdk-cli@next projects list
npx -y @layerarc/agent-sdk-cli@next pages list --limit 20
npx -y @layerarc/agent-sdk-cli@next pages content get --page-id 123
npx -y @layerarc/agent-sdk-cli@next pages content put --page-id 123 --file page.html
npx -y @layerarc/agent-sdk-cli@next gsc sites get
npx -y @layerarc/agent-sdk-cli@next gsc search-analytics query --body query.json
npx -y @layerarc/agent-sdk-cli@next gsc sitemaps submit --feedpath https://example.com/sitemap.xml
npx -y @layerarc/agent-sdk-cli@next docs show pages

Docs and skills

The CLI can fetch LayerArc's agent-readable API docs and workflow skills from the same source used by the public docs pages.

npx -y @layerarc/agent-sdk-cli@next docs list
npx -y @layerarc/agent-sdk-cli@next docs show index
npx -y @layerarc/agent-sdk-cli@next skills list
npx -y @layerarc/agent-sdk-cli@next skills show create-page
npx -y @layerarc/agent-sdk-cli@next skills show gsc-get-summary

For browser-readable markdown, use CLI docs and CLI skills. Raw HTTP docs remain available at Agent API docs.