Skip to main content

Documentation Index

Fetch the complete documentation index at: https://xerg.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

If you install @xerg/cli globally, replace npx @xerg/cli with xerg.

1. Run the default first-run flow

npx @xerg/cli init
init is interactive in v1. It:
  • checks local OpenClaw and Hermes defaults
  • asks you to choose the runtime when both are detected
  • runs the first audit and stores the local snapshot
  • prints the normal terminal summary
  • offers optional hosted follow-up after the audit succeeds
If no local data is found, init prints the default paths it checked plus the next-step commands for:
  • explicit local paths
  • npx @xerg/cli audit --remote user@host
  • npx @xerg/cli audit --railway
Remote SSH and Railway guidance remain OpenClaw-only in this phase.

2. Make one workflow or model change, then compare

npx @xerg/cli audit --compare
--compare looks for the newest compatible cached snapshot on your machine and adds before and after deltas. If no compatible baseline exists yet, Xerg does not fail. It adds a note telling you to run the same audit again after a fix.

3. Use direct commands when you want explicit control

Use the direct flows instead of init when you need non-interactive behavior, CI gates, or a specific output mode immediately:
npx @xerg/cli doctor
npx @xerg/cli audit
npx @xerg/cli audit --json
npx @xerg/cli audit --markdown
If both local runtimes are present, add --runtime openclaw or --runtime hermes.

4. Export or automate

Shareable Markdown:
npx @xerg/cli audit --markdown > xerg-audit.md
Machine-readable JSON:
npx @xerg/cli audit --json
Fail CI if confirmed waste is too high:
npx @xerg/cli audit --fail-above-waste-rate 0.30
Push an audit summary to the Xerg API explicitly:
npx @xerg/cli audit --push

5. Optional hosted follow-up

If you have Xerg Pro or Enterprise and want hosted features after the first local result:
npx @xerg/cli connect
npx @xerg/cli mcp-setup
  • connect reuses existing auth when present, or starts browser login and offers to push the latest audit
  • mcp-setup prints or writes hosted MCP config for Cursor, Claude Code, Codex, or another client
You can skip both and keep using Xerg locally.

Common next steps

  • Use init when you want the exact first-run behavior documented command-by-command.
  • Use audit to learn the full command surface.
  • Use remote audits if OpenClaw is running on SSH or Railway.
  • Use compare if you want to understand how snapshot compatibility works.
  • Use waste taxonomy and metrics if you want the concepts behind the report.
  • Use authentication and push or hosted MCP if you want the hosted Pro workflow after your first audit.