Skip to main content
npx @xerg/cli doctor is the fastest way to confirm that Xerg can see local OpenClaw or Hermes data before you run an audit. Examples use npx @xerg/cli. If you installed the CLI globally, substitute xerg.

Local checks

npx @xerg/cli doctor
npx @xerg/cli doctor --verbose
Xerg reports:
  • the default gateway pattern
  • the default sessions pattern
  • detected source files
  • notes about what is missing
Use --verbose when you want progress messages on stderr while doctor is checking paths and transports. Use explicit local paths when your data is not in the defaults:
npx @xerg/cli doctor --runtime openclaw --log-file /path/to/openclaw.log
npx @xerg/cli doctor --runtime openclaw --sessions-dir /path/to/sessions
npx @xerg/cli doctor --runtime hermes --log-file ~/.hermes/logs/agent.log
npx @xerg/cli doctor --runtime hermes --sessions-dir ~/.hermes/sessions
If both OpenClaw and Hermes are present locally, pass --runtime openclaw or --runtime hermes so doctor checks the exact runtime you mean. To inspect a local Cursor usage export instead:
npx @xerg/cli doctor --cursor-usage-csv ~/Downloads/usage-events-2026-04-08.csv
Cursor CSV doctor validates the file shape, row count, date range, and current pricing coverage.

SSH checks

npx @xerg/cli doctor --remote [email protected]
SSH doctor checks:
  • SSH connectivity
  • whether rsync exists locally and remotely
  • default remote paths
  • optional custom remote paths when you pass --remote-log-file or --remote-sessions-dir
Custom remote paths:
npx @xerg/cli doctor \
  --remote [email protected] \
  --remote-log-file /var/log/openclaw \
  --remote-sessions-dir /srv/openclaw/sessions

Railway checks

npx @xerg/cli doctor --railway
By default, Railway doctor uses the Railway service linked to the current working directory in your local railway CLI context. If railway link in this directory points at a database, sidecar, or another non-OpenClaw service, doctor can authenticate successfully but still report that the linked service is unreachable or has no OpenClaw data. Re-run railway link in the directory where you invoke Xerg and choose the OpenClaw app service. Use explicit --project, --environment, and --service values when you want a deterministic Railway target instead of the service linked to the current directory. You can also target a specific service:
npx @xerg/cli doctor \
  --railway \
  --project <project-id> \
  --environment <environment-id> \
  --service <service-id>
Railway doctor checks:
  • whether the railway CLI is installed
  • whether the railway CLI is authenticated
  • whether the target service is reachable
  • default and alternate OpenClaw paths
  • optional custom remote paths when you pass --remote-log-file or --remote-sessions-dir
Railway checks these paths by default:
  • /tmp/openclaw for gateway logs
  • ~/.openclaw/agents for session files
  • /data/.clawdbot/agents/main/sessions as an alternate session directory when the default one is empty

When doctor says no data

If doctor cannot find any local OpenClaw or Hermes data:
  • verify that your runtime is writing gateway logs and session files
  • pass explicit paths with --log-file and --sessions-dir
  • run npx @xerg/cli doctor --remote user@host to inspect an SSH target directly from your machine
  • run npx @xerg/cli doctor --railway to inspect a linked Railway service
  • use --project, --environment, and --service when you want a deterministic Railway target instead of the service linked to the current directory
  • run npx @xerg/cli audit --remote user@host or npx @xerg/cli audit --railway when the data lives on another machine or service; see remote audits for the full workflow
  • remote audits still pull telemetry to the machine where you run Xerg and analyze it locally