xerg

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Xerg

Xerg

Xerg is a local-first CLI for finding wasted AI runtime spend. Runtime audits separate three evidence-strict monetary findings from seven neutral signals, report detector coverage, and use
--compare
to measure compatible changes. Runtime costs may be observed, locally estimated, or unpriced; they are not authoritative provider invoices.
Xerg是一款本地优先的CLI工具,用于发现AI运行时的浪费性支出。运行时审计会将三类有严格证据支撑的货币化发现与七类中性信号区分开来,报告检测器覆盖率,并使用
--compare
参数衡量兼容变更的效果。运行时成本可以是观测值、本地估算值或未定价的数值;它们并非权威的服务商发票金额。

Cold-fetch setup

冷获取配置流程

When this file was fetched from
https://xerg.ai/skill.md
rather than loaded from an installed skill:
  1. Identify the current agent host. OpenClaw, Hermes, QM, Claude Code, Cursor, and Codex are setup hosts; they are not automatically the data source being audited. QM can also be the audit source, but only through its explicit administrator-provisioned Xerg connection.
  2. Check whether Xerg is already installed for this host. Before writing to a persistent or global skill directory, explain the destination and ask the user for permission.
  3. If the host has a supported skill installer, use it after permission. OpenClaw can install
    xerg
    from ClawHub. Agent Skills hosts can install the public
    xergai/skills
    repository. Hermes can use Xerg's well-known skill discovery. Deterministic host-specific commands live at xerg.ai/agents.
  4. If persistent installation is unavailable or declined, use these fetched instructions for the current session. Do not invent an install location.
  5. Run
    npx @xerg/cli@latest doctor
    , use its output to choose the non-interactive audit command below, and offer to run the first audit locally. On QM, do not use bare doctor: follow the private-scope QM procedure below.
Always ask before uploading. A local audit needs no account and must not be pushed automatically. After a successful local result, offer to connect and push it with:
bash
npx @xerg/cli@latest activate --push-latest
activate
opens Xerg in the browser. The signed-in user explicitly approves the currently active workspace; the page shows its full organization ID, live plan, and API environment before any credential is issued. If the intended Clerk ID is already known, recommend
--organization-id org_...
so both the page and API reject another active workspace. The organization switcher preserves the pairing code. The workspace key is encrypted to the initiating CLI and stored with owner-only, environment-bound metadata; never ask the user to paste a key into chat or expose one in a command.
If approval covers pairing only, use
activate --connect-only --organization-id org_...
. It must stop after verified credential storage and must not be combined with a source or push flag. A later audit or push requires its own explicit approval.
Codex is an execution host, not a native Xerg audit source. A Codex user audits whatever
doctor
finds: OpenClaw, Hermes, Claude Code, a Cursor export, or a generic ingest payload.
If the current host is QM, a cold
set up https://xerg.ai/skill.md
request can explain prerequisites but cannot claim it persisted an admin skill pack, created PostgreSQL privileges, or provisioned secrets. Require an administrator-only private scope. Refuse deployment-wide output in public/shared scopes. Never ask anyone to paste a DSN, identity key, Fly token, provider credential, or Xerg API key into Slack or chat.
当本文件是从
https://xerg.ai/skill.md
获取,而非从已安装的skill加载时:
  1. 识别当前Agent宿主。OpenClaw、Hermes、QM、Claude Code、Cursor和Codex均为支持的配置宿主,但它们并非默认的审计数据源。QM也可作为审计源,但仅能通过管理员明确配置的Xerg连接实现。
  2. 检查当前宿主是否已安装Xerg。在写入持久化或全局skill目录前,需向用户说明目标路径并获取许可。
  3. 若宿主支持skill安装器,获取许可后使用对应方式安装:OpenClaw可从ClawHub安装
    xerg
    ;Agent Skills宿主可安装公开的
    xergai/skills
    仓库;Hermes可使用Xerg的知名skill发现机制。宿主专属的确定性命令可查看xerg.ai/agents
  4. 若无法进行持久化安装或用户拒绝,仅在当前会话中使用本次获取的指令,不得自行指定安装位置。
  5. 运行
    npx @xerg/cli@latest doctor
    ,根据输出选择下方的非交互式审计命令,并主动提出在本地执行首次审计。在QM环境中,请勿直接使用doctor命令,需遵循下方的私有域QM操作流程。
上传前务必征得用户同意。本地审计无需账户,且禁止自动推送。本地审计成功后,可提议通过以下命令连接并推送结果:
bash
npx @xerg/cli@latest activate --push-latest
activate
命令会在浏览器中打开Xerg。已登录用户需明确批准当前激活的工作区;页面会在颁发任何凭证前显示完整的组织ID、当前套餐及API环境。若已知目标Clerk ID,建议添加
--organization-id org_...
参数,这样页面和API都会拒绝其他活跃工作区。组织切换器会保留配对码。工作区密钥会加密后存储到发起命令的CLI中,并仅绑定所有者可见、环境专属的元数据;切勿要求用户在聊天中粘贴密钥或在命令中暴露密钥。
若仅需完成配对授权,使用
activate --connect-only --organization-id org_...
。该命令在验证凭证存储后必须停止,不得与数据源或推送参数组合使用。后续的审计或推送操作需单独获取明确批准。
Codex是执行宿主,而非Xerg原生审计源。Codex用户需根据
doctor
命令的结果选择审计对象:OpenClaw、Hermes、Claude Code、Cursor导出文件或通用导入负载。
若当前宿主为QM,通过
set up https://xerg.ai/skill.md
发起的冷配置请求仅可说明前置条件,不得声称已持久化admin skill包、创建PostgreSQL权限或配置密钥。需要求使用管理员专属的私有域,拒绝在公共/共享域中输出部署级内容。切勿要求任何人在Slack或聊天中粘贴DSN、身份密钥、Fly令牌、服务商凭证或Xerg API密钥。

First run (agent execution path)

首次运行(Agent执行路径)

Use the non-interactive commands. Do not run
xerg init
unless the user explicitly asks for guided interactive setup — it is TTY-only and prompts for input.
bash
npx @xerg/cli@latest doctor
npx @xerg/cli@latest audit --json
  1. Run
    doctor
    first. It reports which local sources exist (OpenClaw, Hermes, Claude Code) and which default paths were checked. QM is never auto-probed.
  2. Run
    audit --json
    . If more than one runtime is detected, add
    --runtime openclaw
    ,
    --runtime hermes
    , or
    --runtime claude-code
    .
  3. Summarize the result for the user in dollars: total spend, identified waste (
    wasteSpendUsd
    ), assessed spend from
    detectionCoverage
    , active findings, neutral signals, and the per-agent spend breakdown (
    spendByAgent
    ) when present. Never monetize a signal or describe
    $0
    as no waste when active-finding coverage is none, partial, unsupported, or unknown.
  4. If the user applies a fix, re-run the same audit with
    --compare
    to report the before/after delta:
bash
npx @xerg/cli@latest audit --json --compare
If no local data is found,
doctor
prints the paths it checked. Fallbacks:
  • Cursor usage CSV export:
    npx @xerg/cli@latest audit --cursor-usage-csv ./cursor-usage.csv
  • Claude Code transcripts elsewhere:
    --claude-code-dir <path>
  • Hermes profile database:
    --runtime hermes --state-db <path>
  • Any framework's exported event payload:
    npx @xerg/cli@latest ingest --file payload.json
  • Existing sanitized OpenClaw trace capture:
    npx @xerg/cli@latest audit --otlp-file <capture.jsonl>
  • New local OpenClaw trace capture:
    npx @xerg/cli@latest collect openclaw
    (interactive until
    Ctrl-C
    ; use only when the user asks to collect a workload)
  • Certified local Hermes trace enrichment:
    npx @xerg/cli@latest collect hermes --state-db <path>
    (interactive until
    Ctrl-C
    ; state.db remains required)
  • Remote OpenClaw over SSH:
    npx @xerg/cli@latest audit --remote user@host
  • Railway-hosted OpenClaw:
    npx @xerg/cli@latest audit --railway
  • Existing QM snapshot:
    npx @xerg/cli@latest audit --runtime qm --qm-snapshot <snapshot.jsonl>
  • Configured QM direct/Fly source: an operator collects outside Slack; follow the private-scope procedure below only for an authorized snapshot
If
xerg
is installed globally, use
xerg
in place of
npx @xerg/cli@latest
.
使用非交互式命令。除非用户明确要求引导式交互式配置,否则请勿运行
xerg init
——该命令仅支持TTY交互并会提示输入信息。
bash
npx @xerg/cli@latest doctor
npx @xerg/cli@latest audit --json
  1. 先运行
    doctor
    命令。它会报告本地存在的数据源(OpenClaw、Hermes、Claude Code)及已检查的默认路径。QM不会被自动探测。
  2. 运行
    audit --json
    。若检测到多个运行时环境,添加
    --runtime openclaw
    --runtime hermes
    --runtime claude-code
    参数。
  3. 以美元为单位向用户总结结果:总支出、已识别的浪费成本(
    wasteSpendUsd
    )、基于
    detectionCoverage
    评估的支出、有效发现项、中性信号,以及(若存在)按Agent划分的支出明细(
    spendByAgent
    )。当有效发现项的覆盖率为无、部分、不支持或未知时,切勿将信号货币化,也不得将
    $0
    描述为无浪费。
  4. 若用户应用了修复方案,使用
    --compare
    参数重新运行相同的审计以报告变更前后的差异:
bash
npx @xerg/cli@latest audit --json --compare
若未找到本地数据,
doctor
命令会打印已检查的路径。可使用以下备选方案:
  • Cursor使用情况CSV导出:
    npx @xerg/cli@latest audit --cursor-usage-csv ./cursor-usage.csv
  • 其他位置的Claude Code会话记录:
    --claude-code-dir <path>
  • Hermes配置数据库:
    --runtime hermes --state-db <path>
  • 任意框架导出的事件负载:
    npx @xerg/cli@latest ingest --file payload.json
  • 已脱敏的OpenClaw跟踪捕获文件:
    npx @xerg/cli@latest audit --otlp-file <capture.jsonl>
  • 新的本地OpenClaw跟踪捕获:
    npx @xerg/cli@latest collect openclaw
    (交互式运行,直到按下
    Ctrl-C
    ;仅在用户要求收集工作负载时使用)
  • 认证的本地Hermes跟踪增强:
    npx @xerg/cli@latest collect hermes --state-db <path>
    (交互式运行,直到按下
    Ctrl-C
    ;必须提供state.db)
  • SSH远程OpenClaw:
    npx @xerg/cli@latest audit --remote user@host
  • Railway托管的OpenClaw:
    npx @xerg/cli@latest audit --railway
  • 已有的QM快照:
    npx @xerg/cli@latest audit --runtime qm --qm-snapshot <snapshot.jsonl>
  • 已配置的QM直接/Fly数据源:由操作员在Slack外收集;仅针对授权快照遵循下方的私有域操作流程
若已全局安装
xerg
,可使用
xerg
替代
npx @xerg/cli@latest

What It Audits

审计范围

  • OpenClaw gateway logs and session transcripts
  • Optional independent OpenClaw trace captures created by the loopback traces-only collector
  • Hermes v0.17+
    state.db
    (read-only), with legacy log/transcript fallback where present
  • QM durable run/model economics and current retained activity through
    xerg_export/v1
    and
    qm-snapshot/v1
  • Claude Code session transcripts via
    xerg audit --runtime claude-code
  • Cursor usage CSV exports via
    xerg audit --cursor-usage-csv ./cursor-usage.csv
  • Any framework's exported event payload via
    xerg ingest --file payload.json
Xerg does not currently ingest provider bills, reconcile invoices, or convert runtime observations into FOCUS. If a user asks for one of those capabilities, explain the boundary and do not present modeled runtime spend as invoice-authoritative.
  • OpenClaw网关日志和会话记录
  • 可选的、由环回仅跟踪收集器创建的独立OpenClaw跟踪捕获文件
  • Hermes v0.17+版本的
    state.db
    (只读),若存在旧版日志/记录则作为备选
  • 通过
    xerg_export/v1
    qm-snapshot/v1
    获取的QM持久化运行/模型经济性数据及当前保留的活动记录
  • 通过
    xerg audit --runtime claude-code
    获取的Claude Code会话记录
  • 通过
    xerg audit --cursor-usage-csv ./cursor-usage.csv
    获取的Cursor使用情况CSV导出文件
  • 通过
    xerg ingest --file payload.json
    导入的任意框架导出的事件负载
Xerg目前不支持导入服务商账单、对账发票或将运行时观测值转换为FOCUS格式。若用户询问这些功能,需说明当前功能边界,且不得将建模的运行时支出视为发票权威数据。

What It Finds

审计发现

  • Retry waste only from a stable charged failed/aborted attempt chain that ends in a higher successful attempt
  • Tool-loop waste only from exact repeated tool name/input/result/state evidence with no progress and exact cost correlation
  • Cache churn only when a cache-entry lifecycle costs more than its uncached counterfactual
  • Neutral signals for deep loops, context outliers/growth, fixed cadence, premium-model routine labels, cache-read concentration, and Max Mode concentration; ordered metrics and optional associated spend remain descriptive, and signals have no avoidable-spend, recommendation, optimization, or CI effect
  • Per-agent spend attribution, including delegated sub-agent spend for Claude Code sidechains and ingest payloads
  • Cost per outcome when runs carry outcome signals; declare outcomes with
    xerg outcome --workflow <name> --status success|failure
  • Separate local Hermes mechanical metrics when the optional observer is enabled; these have no dollar classification, recommendation impact, or CI-gate effect
  • Shared local
    analysisCoverage
    ,
    toolActivity
    , and
    workloadEconomics
    blocks for OpenClaw and Hermes; these are neutral evidence and never affect findings, recommendations, waste totals, or CI gates
  • QM request-versus-aggregate reconciliation, pricing coverage, source stability, pseudonymous scope attribution, and current-window unassociated tool activity
Costs are priced across input, output, cache read, and cache write tokens using a catalog covering hundreds of current models. Run
xerg doctor --verbose
to see per-file extraction coverage (which economic signals the parser found).
For current Hermes, use
xerg audit --runtime hermes
; Xerg prefers
~/.hermes/state.db
. Use
--state-db
for another profile.
--state-db
is mutually exclusive with legacy
--log-file
and
--sessions-dir
. State-only audits retain aggregate spend, request/token/cache, workflow/model/tool, and delegated-workload totals, but first-request cost, initial context, request growth, retry sequences, and identical-input loops are unavailable. The optional
xergai/hermes-observer
plugin writes content-free local events under
~/.hermes/xerg/events/
; it never adds economics or sends content to Xerg Cloud. Complete observer evidence can split an aggregate only after exact request/token reconciliation.
After installing the observer, restart Hermes, start a new session, and run
xerg doctor --runtime hermes
. Report doctor status and assessed spend. Do not imply that historical aggregate sessions can be reconstructed. Use
--require-detection-coverage full|partial
for CI; unmet coverage exits
5
.
For OpenClaw traces,
xerg collect openclaw
binds only to
127.0.0.1
, accepts OTLP/HTTP protobuf traces, persists a bounded sanitized capture, and audits after shutdown. It does not modify OpenClaw configuration or push automatically. Without explicit
--runtime hermes
,
--otlp-file
is independent OpenClaw evidence and cannot be combined with transcript, log, other-runtime, or remote sources.
For certified Hermes traces,
xerg collect hermes
uses the same loopback traces-only protocol but HMACs identifiers with a persistent local key and requires
state.db
. Use only the exact certified
briancaffey/hermes-otel
commit printed in Xerg's docs. Xerg never installs or edits that plugin. The first-party observer stays primary; cache-inclusive plugin prompt totals are normalized into Xerg's separate input/cache buckets, optional enrichment preserves
economicAuditId
while analysis identity reflects changed coverage, and conflicting evidence restores the original aggregate. For non-default
HERMES_HOME
profiles, use the equivalent environment-variable block printed by the command because the pinned plugin resolves YAML under
~/.hermes
.
  • 仅针对稳定收费的失败/中止尝试链且最终以更高成本成功的重试浪费
  • 仅针对完全重复的工具名称/输入/结果/状态且无进展、成本完全相关的工具循环浪费
  • 仅当缓存条目生命周期成本高于未缓存替代方案时的缓存 churn
  • 针对深度循环、上下文异常/增长、固定节奏、高级模型常规标签、缓存读取集中化和Max Mode集中化的中性信号;有序指标及可选关联支出仅作描述用,这些信号无可避免支出、建议、优化或CI影响
  • 按Agent划分的支出归因,包括Claude Code侧链和导入负载的委托子Agent支出
  • 当运行携带结果信号时的单位结果成本;可使用
    xerg outcome --workflow <name> --status success|failure
    声明结果
  • 启用可选观测器后,会生成独立的本地Hermes机械指标;这些指标无货币分类、建议影响或CI门禁作用
  • OpenClaw和Hermes共享的本地
    analysisCoverage
    toolActivity
    workloadEconomics
    模块;这些为中性证据,绝不会影响发现项、建议、浪费总额或CI门禁
  • QM请求与聚合对账、定价覆盖率、数据源稳定性、匿名域归因及当前窗口中未关联的工具活动
成本会根据涵盖数百种当前模型的目录,对输入、输出、缓存读取和缓存写入Token进行定价。运行
xerg doctor --verbose
可查看每个文件的提取覆盖率(解析器已识别的经济信号)。
对于当前版本的Hermes,使用
xerg audit --runtime hermes
;Xerg默认优先读取
~/.hermes/state.db
。可使用
--state-db
指定其他配置文件。
--state-db
与旧版的
--log-file
--sessions-dir
互斥。仅基于状态的审计会保留聚合支出、请求/Token/缓存、工作流/模型/工具及委托工作负载的总计,但无法获取首次请求成本、初始上下文、请求增长、重试序列和相同输入循环数据。可选的
xergai/hermes-observer
插件会在
~/.hermes/xerg/events/
下写入无内容的本地事件;它绝不会添加经济数据或向Xerg Cloud发送内容。仅在完成精确的请求/Token对账后,完整的观测器证据才能拆分聚合数据。
安装观测器后,重启Hermes并启动新会话,然后运行
xerg doctor --runtime hermes
。报告doctor状态及评估支出。不得暗示可重建历史聚合会话。CI场景下可使用
--require-detection-coverage full|partial
;未达到覆盖率要求时会以状态码5退出。
对于OpenClaw跟踪,
xerg collect openclaw
仅绑定到
127.0.0.1
,接受OTLP/HTTP protobuf跟踪,持久化有限的脱敏捕获数据,并在关闭后执行审计。它不会修改OpenClaw配置或自动推送。若未明确指定
--runtime hermes
--otlp-file
为独立的OpenClaw证据,无法与记录、日志、其他运行时或远程数据源组合使用。
对于认证的Hermes跟踪,
xerg collect hermes
使用相同的环回仅跟踪协议,但会使用持久化本地密钥对标识符进行HMAC加密,且需要
state.db
。仅使用Xerg文档中指定的
briancaffey/hermes-otel
提交版本。Xerg绝不会安装或编辑该插件。官方观测器为首选;包含缓存的插件提示总计会被归一化到Xerg的独立输入/缓存桶中,可选增强功能会保留
economicAuditId
,同时分析标识会反映变更后的覆盖率,冲突证据会恢复原始聚合数据。对于非默认
HERMES_HOME
配置文件,使用命令输出的等效环境变量块,因为固定版本的插件会解析
~/.hermes
下的YAML文件。

QM private-scope procedure

QM私有域操作流程

QM currently supports bounded one-shot collection through a host-independent snapshot adapter. An operator outside Slack creates
qm-snapshot/v1
through either a strict view-only direct reader or the Fly-contained one-shot exporter. Fly contained mode uses QM core's existing
DATABASE_URL
only inside the hidden exporter, records a process boundary with no database-level least-privilege claim, and never exposes that credential to this skill. Do not mutate setup, install/persist the skill, activate, or push without explicit approval.
In a QM Slack scope, never initiate live database or Fly collection. Accept only an authorized sanitized snapshot already made available in an administrator-only private scope, and use only the exact CLI the operator has explicitly provisioned and version-verified inside that runtime. Current Fly Sprites do not apply the configured sandbox OCI image to persistent Sprites, so never assume an image pin installed the CLI. If it is absent, explain that prerequisite instead of installing it without explicit approval. Continuous follow capture, durable tool-history capture beyond QM's retention window, and live Slack-triggered collection are not currently supported. Never request or receive a DSN, identity key, Fly token, provider credential, or Xerg API key.
Run doctor before every first audit:
bash
xerg doctor --runtime qm --qm-snapshot <snapshot.jsonl>
xerg audit --runtime qm --qm-snapshot <snapshot.jsonl> --since 7d --json
Operator documentation may explain
--database-url-env
,
--fly-app
,
--print-sql
, and
--print-views-sql
, but the agent must not execute or provision those live paths from Slack. Direct, Fly, and
--qm-snapshot
modes are mutually exclusive.
Explain the result conservatively:
  • positive QM cost is observed; an explicit deterministic model may be catalog-estimated
  • zero/negative placeholders and unresolved
    openrouter/auto
    are unpriced, never free or actual
    $0
  • unpriced patterns say “monetary impact unavailable” and monetary gates exit
    5
  • Pi/OpenCode timestamps are flush/capture time; Claude is near result-step recording; Codex rows are turn aggregates
  • request-sequence detectors run only on exactly reconciled request observations; aggregate rows are excluded
  • QM keeps activity for one hour, so older tool history is unavailable and tool-to-model association is not claimed
  • retry attempts are neutral evidence without spend attribution; unsupported findings are not described as assessed
Local snapshot audit is the default. Ask for explicit approval before
xerg activate --runtime qm
,
audit --push
, or any other hosted write. Xerg's hosted MCP can read an already-pushed pseudonymous summary but has no native QM database or Fly access.
QM目前通过宿主独立的快照适配器支持有限的一次性收集。操作员需在Slack外通过严格的只读直接读取器或Fly托管的一次性导出器创建
qm-snapshot/v1
。Fly托管模式仅在隐藏的导出器内部使用QM核心已有的
DATABASE_URL
,记录进程边界且无数据库级最小权限声明,绝不会向本skill暴露该凭证。未经明确批准,不得修改配置、安装/持久化skill、激活或推送数据。
在QM Slack域中,绝不能启动实时数据库或Fly收集操作。仅接受已在管理员专属私有域中提供的授权脱敏快照,并仅使用操作员在该运行时中明确配置并验证版本的CLI。当前Fly Sprites不会将配置的沙箱OCI镜像应用到持久化Sprites,因此切勿假设镜像固定安装了CLI。若CLI缺失,需说明该前置条件,不得未经明确批准自行安装。目前不支持持续跟踪捕获、超出QM保留窗口的持久化工具历史捕获及Slack触发的实时收集操作。切勿请求或接收DSN、身份密钥、Fly令牌、服务商凭证或Xerg API密钥。
每次首次审计前需运行doctor命令:
bash
xerg doctor --runtime qm --qm-snapshot <snapshot.jsonl>
xerg audit --runtime qm --qm-snapshot <snapshot.jsonl> --since 7d --json
操作员文档可能会说明
--database-url-env
--fly-app
--print-sql
--print-views-sql
参数,但Agent不得从Slack执行或配置这些实时路径。直接模式、Fly模式和
--qm-snapshot
模式互斥。
需保守地解释结果:
  • 正QM成本为观测值;可能会根据目录中的明确确定性模型进行估算
  • 零/负占位符及未解析的
    openrouter/auto
    为未定价,绝非免费或实际
    $0
  • 未定价模式需标注“货币影响不可用”,货币门禁会以状态码5退出
  • Pi/OpenCode时间戳为刷新/捕获时间;Claude时间戳接近结果步骤记录时间;Codex行为回合聚合数据
  • 请求序列检测器仅在精确对账的请求观测值上运行;聚合行被排除
  • QM仅保留一小时的活动记录,因此无法获取更早的工具历史,且不保证工具与模型的关联
  • 重试尝试为中性证据,无支出归因;不支持的发现项不得描述为已评估
本地快照审计为默认方式。执行
xerg activate --runtime qm
audit --push
或其他托管写入操作前需获取明确批准。Xerg的托管MCP可读取已推送的匿名摘要,但无原生QM数据库或Fly访问权限。

Optional Cloud

可选云端功能

Local audits need no account. To connect a workspace and push the latest local result, ask permission and run:
bash
npx @xerg/cli@latest activate --push-latest
For a website-first user with no cached audit,
npx @xerg/cli@latest activate
securely connects, detects a supported local source, runs the audit, and pushes it. Hosted sync and hosted MCP remain optional and never run without explicit user action.
本地审计无需账户。如需连接工作区并推送最新本地结果,需征得用户同意后运行:
bash
npx @xerg/cli@latest activate --push-latest
对于无缓存审计结果的网页端优先用户,
npx @xerg/cli@latest activate
会安全连接,检测支持的本地数据源,运行审计并推送结果。托管同步和托管MCP均为可选功能,绝不会在未经用户明确操作的情况下运行。

Advanced authentication

高级认证方式

Use
xerg login --replace
only as a manual recovery path when browser pairing is unavailable. It opens Workspace Settings and masks the key pasted into the terminal. Never ask for or paste a workspace key in agent chat.
Use
XERG_API_KEY
only for non-interactive CI or deployment automation. Store it in the CI provider's secret manager; never place it inline in a shell command, source file, log, URL, or conversation.
仅当浏览器配对不可用时,才可将
xerg login --replace
作为手动恢复路径。它会打开工作区设置并隐藏终端中粘贴的密钥。切勿在Agent聊天中要求或粘贴工作区密钥。
仅在非交互式CI或部署自动化场景中使用
XERG_API_KEY
。需将其存储在CI服务商的密钥管理器中;切勿在shell命令、源文件、日志、URL或对话中明文放置。

Links

链接