xerg init is the default first-run path for the CLI.
initis interactive. Use directdoctor/auditcommands when you need non-interactive behavior or explicit flags immediately.
What xerg init does
Run:
init:
- checks the local OpenClaw, Hermes, and Claude Code defaults
- auto-selects the only detected runtime or asks you to choose when more than one is present
- runs the first audit with local snapshot persistence enabled
- prints the normal terminal summary
- tells you to use
audit --compareafter the next fix - offers optional hosted follow-up with
connectandmcp-setup
Supported local runtimes
init covers local OpenClaw, Hermes, and Claude Code detection.
Current defaults:
- OpenClaw gateway logs:
/tmp/openclaw/openclaw-*.log - OpenClaw session transcripts:
~/.openclaw/agents/*/sessions/*.jsonl - Hermes v0.17+ state database:
~/.hermes/state.db(preferred, read-only) - Optional Hermes observer ledger:
~/.hermes/xerg/events/; legacy files remain fallback inputs - Claude Code session transcripts:
~/.claude/projects/
doctor / audit --cursor-usage-csv workflow rather than part of init.
When to use init versus audit
Use init when:
- you are onboarding for the first time
- you want the CLI to choose between detected local runtimes
- you want a guided path from first audit to optional hosted setup
audit directly when:
- you need non-interactive behavior
- you already know the runtime
- you want JSON, Markdown, CI gates, or explicit path flags immediately
- you want remote OpenClaw audits over SSH or Railway
What happens when no local data is found
init does not guess. It prints:
- the default local paths it checked (OpenClaw, Hermes, and Claude Code)
- explicit local-path commands for OpenClaw, Hermes, and Claude Code
- the Cursor usage CSV alternative (
audit --cursor-usage-csv ./usage.csv) - remote OpenClaw-only next steps:
npx @xerg/cli@latest audit --remote user@hostnpx @xerg/cli@latest audit --railway
What happens after a successful audit
After the first audit,init tells you to re-run:
connectfor authentication and pushing the latest auditmcp-setupfor generating hosted MCP config for Cursor, Claude Code, Codex, or another client