@xerg/cli 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,6 +4,8 @@ Audit OpenClaw and Hermes workflows in dollars, compare fixes, and optionally co
4
4
 
5
5
  Xerg runs locally by default. Local audits and `--compare` are free. No account is required for local value, and no data leaves your machine unless you explicitly push results to Xerg Cloud.
6
6
 
7
+ The `npx @xerg/cli` path fetches and executes the published npm package before running Xerg. If you want to avoid a runtime fetch, install once with `npm install -g @xerg/cli` or run a local build from source.
8
+
7
9
  ## Fastest first run
8
10
 
9
11
  ```bash
@@ -54,6 +56,8 @@ node_modules/@xerg/cli/skills/xerg/SKILL.md
54
56
 
55
57
  For a global install, the same file lives inside the global npm package directory instead. That file is a packaged copy of the canonical repo skill at [`skills/xerg/SKILL.md`](../../skills/xerg/SKILL.md). Use it if your agent platform imports skills from disk; installing the npm package does not automatically register the skill with every agent product.
56
58
 
59
+ The bundled skill frontmatter declares the CLI/package surface plus optional Xerg Cloud, SSH, rsync, and Railway requirements so registries can distinguish the default local audit workflow from opt-in hosted sync and remote audit workflows.
60
+
57
61
  ## Supported runtime
58
62
 
59
63
  `@xerg/cli` supports Node `22` and `24`.
@@ -152,7 +156,7 @@ xerg mcp-setup
152
156
  ```
153
157
 
154
158
  - `connect` resolves auth from `XERG_API_KEY`, `~/.xerg/config.json`, or stored browser credentials, then offers to push the latest audit
155
- - `mcp-setup` prints or writes hosted MCP config for Cursor, Claude Code, or another client
159
+ - `mcp-setup` prints or writes hosted MCP config for Cursor, Claude Code, Codex, or another client
156
160
 
157
161
  You can skip both and keep using local audits and compare.
158
162
 
package/dist/index.js CHANGED
@@ -5989,6 +5989,7 @@ function renderRailwayDoctorReport(report) {
5989
5989
  import { existsSync as existsSync2, mkdirSync as mkdirSync6, readFileSync as readFileSync9, writeFileSync as writeFileSync2 } from "fs";
5990
5990
  import { dirname as dirname3, join as join8 } from "path";
5991
5991
  var HOSTED_MCP_URL = "https://mcp.xerg.ai/mcp";
5992
+ var MCP_SERVER_NAME = "xerg";
5992
5993
  async function runMcpSetupCommand() {
5993
5994
  await runMcpSetupFlow();
5994
5995
  }
@@ -6031,6 +6032,11 @@ async function runMcpSetupFlow() {
6031
6032
  value: "claude-code",
6032
6033
  description: "Project-scoped Claude Code MCP config"
6033
6034
  },
6035
+ {
6036
+ name: "Codex",
6037
+ value: "codex",
6038
+ description: "Codex config.toml snippet"
6039
+ },
6034
6040
  {
6035
6041
  name: "Other",
6036
6042
  value: "other",
@@ -6042,6 +6048,14 @@ async function runMcpSetupFlow() {
6042
6048
  await handleCursorSetup(snippet, config);
6043
6049
  return;
6044
6050
  }
6051
+ if (client === "codex") {
6052
+ process.stdout.write(`${buildCodexMcpConfig(config)}
6053
+ `);
6054
+ process.stderr.write(
6055
+ "Add this to `~/.codex/config.toml`, then restart Codex so it loads the Xerg MCP tools.\n"
6056
+ );
6057
+ return;
6058
+ }
6045
6059
  process.stdout.write(`${snippet}
6046
6060
  `);
6047
6061
  if (client === "claude-code") {
@@ -6079,7 +6093,7 @@ async function handleCursorSetup(snippet, config) {
6079
6093
  function buildHostedMcpConfig(config) {
6080
6094
  return {
6081
6095
  mcpServers: {
6082
- xerg: {
6096
+ [MCP_SERVER_NAME]: {
6083
6097
  type: "http",
6084
6098
  url: HOSTED_MCP_URL,
6085
6099
  headers: {
@@ -6089,6 +6103,19 @@ function buildHostedMcpConfig(config) {
6089
6103
  }
6090
6104
  };
6091
6105
  }
6106
+ function buildCodexMcpConfig(config) {
6107
+ return [
6108
+ `[mcp_servers.${MCP_SERVER_NAME}]`,
6109
+ "enabled = true",
6110
+ `url = ${tomlString(HOSTED_MCP_URL)}`,
6111
+ "",
6112
+ `[mcp_servers.${MCP_SERVER_NAME}.http_headers]`,
6113
+ `Authorization = ${tomlString(`Bearer ${config.apiKey}`)}`
6114
+ ].join("\n");
6115
+ }
6116
+ function tomlString(value) {
6117
+ return JSON.stringify(value);
6118
+ }
6092
6119
  function writeCursorConfig(filePath, config) {
6093
6120
  mkdirSync6(dirname3(filePath), { recursive: true });
6094
6121
  let parsed = {};
@@ -6425,7 +6452,7 @@ Notes:
6425
6452
  function renderMcpSetupHelp(commandPrefix) {
6426
6453
  return `${formatCommand("mcp-setup", commandPrefix)}
6427
6454
 
6428
- Generate hosted MCP client configuration for Cursor, Claude Code, or another MCP client.
6455
+ Generate hosted MCP client configuration for Cursor, Claude Code, Codex, or another MCP client.
6429
6456
 
6430
6457
  Usage:
6431
6458
  ${formatCommand("mcp-setup", commandPrefix)}
@@ -6434,6 +6461,7 @@ Notes:
6434
6461
  - Interactive in v1 because client selection is prompt-driven
6435
6462
  - Uses the hosted MCP endpoint at https://mcp.xerg.ai/mcp
6436
6463
  - Can write a project-scoped Cursor config when .cursor/ already exists
6464
+ - Prints a Codex config.toml snippet when Codex is selected
6437
6465
  - Local audits and compare stay available even if you skip hosted MCP setup
6438
6466
 
6439
6467
  -h, --help Show help