UseDocumentation Index
Fetch the complete documentation index at: https://xerg.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
connect when you want the guided hosted path after the first local audit. Use audit --push or xerg push when you want explicit push behavior.
Local audits and compare are free. Hosted features such as the dashboard, Ask Xerg, and the hosted MCP server require a Pro or Enterprise workspace.
Recommended hosted flow
After your first local audit:connect:
- reuses auth from
XERG_API_KEY,~/.xerg/config.json, or stored browser credentials when available - prompts before browser login when auth is missing
- offers to push the latest cached audit, or the in-memory audit when called from
init - stays non-interactive when auth is already configured and no prompt is needed
Explicit push flows
Push immediately after computing an audit:audit --push --dry-run prints the push payload to stdout and suppresses the normal audit report.
Re-push a cached audit later
Push the most recent cached local snapshot:xerg push --file expects a JSON file that already matches the AuditPushPayload wire shape. It does not read an arbitrary local audit summary.
Authentication precedence
Xerg resolves API credentials in this order:XERG_API_KEY~/.xerg/config.json- stored browser credentials from
xerg login
XERG_API_URLapiUrlin~/.xerg/config.json
Browser login
Start the device flow directly when you want browser auth without the hosted push prompt:- Xerg starts device authentication against
https://api.xerg.ai - it opens the verification URL in your browser when possible
- it stores the resulting token at
~/.config/xerg/credentials.json
What gets pushed
The push payload contains:- a versioned audit summary
- daily spend and confirmed waste rollups
- top-level findings and taxonomy buckets
- ranked recommendations with where-to-change and validation guidance
- optional comparison deltas
- metadata such as CLI version, source ID, source host, environment, and push timestamp
sourceFiles and dbPath fields from the audit summary.
Push versus hosted MCP
Use push when you want to send audit summaries from the CLI into your hosted workspace. Use hosted MCP when you want a remote MCP client to read hosted audit history, trends, recommendations, or selected hosted control actions from that workspace. A common sequence is:- run
xerg initorxerg audit - run
xerg connect - verify the hosted audit in the dashboard
- run
xerg mcp-setupor connect a remote client to hosted MCP
Important gotchas
xerg pushreads from the default local database path. It does not accept--db.- If you used
xerg audit --db /custom/path, push immediately withxerg audit --push, or export the payload and usexerg push --file. --dry-runonxerg auditrequires--push.- If hosted MCP returns empty audit results, push an audit first so the workspace has hosted data to query.
- If you authenticated with a stored browser login and hosted MCP still needs a workspace API key, create one in the dashboard and set
XERG_API_KEY.