Skip to content

feat(cli): add nemohermes alias for Hermes agent - #2462

Merged
ericksoa merged 49 commits into
mainfrom
feat/nemohermes-alias
Apr 30, 2026
Merged

ericksoa merged 49 commits into
mainfrom
feat/nemohermes-alias

Conversation

@ericksoa

@ericksoa ericksoa commented Apr 24, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Adds a nemohermes CLI binary that wraps nemoclaw with NEMOCLAW_AGENT=hermes pre-set via bin/nemohermes.js
  • Help text, version output, and error messages automatically show nemohermes branding when launched through the alias
  • Updates onboard-command.ts usage lines to reflect the alias name
  • Adds docs section in docs/reference/commands.md and regenerated agent skills

Test plan

  • npx tsc -p tsconfig.src.json builds clean
  • npx tsc -p tsconfig.cli.json type-checks clean
  • 5 new tests in test/nemohermes-alias.test.ts (executable exists, version branding, help header, env var, nemoclaw unchanged)
  • All 11 onboard-command.test.ts tests pass
  • Full suite: 2371 passed (2 pre-existing failures unrelated to this PR: ssrf-parity missing plugin build, migration-state missing json5)
  • Manual: npm link && nemohermes --version prints nemohermes vX.Y.Z (nemoclaw)
  • Manual: nemohermes onboard behaves like nemoclaw onboard --agent hermes

Summary by CodeRabbit

  • New Features

    • New nemohermes CLI alias that launches the CLI with the Hermes agent pre-selected.
    • Dynamic agent-aware branding: CLI names, help, and messaging reflect the active agent.
    • HTTP probe retry behavior for transient 429 responses to improve reliability.
  • Documentation

    • Installer and reference docs updated to document the nemohermes alias and installation behavior.
  • Tests

    • New end-to-end and unit tests covering the alias, branding, installer checks, and retry logic.

Adds a `nemohermes` CLI command that wraps `nemoclaw` with
`NEMOCLAW_AGENT=hermes` pre-set. Help text, version output, and error
messages automatically adjust when launched through the alias.
@coderabbitai

coderabbitai Bot commented Apr 24, 2026 •

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a new nemohermes CLI wrapper that pre-selects the Hermes agent, centralizes agent branding into src/lib/branding.ts, parameterizes user-facing CLI text across the codebase, makes the installer agent-aware, adds retry logic for HTTP 429 probe results, and expands tests for the alias, probes, and provisioning compatibility.

Changes

Cohort / File(s) Summary
Branding Infrastructure
src/lib/branding.ts
New module introducing AgentBranding interface, getAgentBranding() and exported constants CLI_NAME, CLI_DISPLAY_NAME, AGENT_PRODUCT_NAME computed from NEMOCLAW_AGENT.
CLI Executable & Package Configuration
bin/nemohermes.js, package.json
Adds nemohermes executable that sets NEMOCLAW_AGENT=hermes then delegates to ../dist/nemoclaw. Registers nemohermes in package.json bin.
Docs / Reference
.agents/.../commands.md, docs/reference/commands.md
Documents the nemohermes alias, command equivalences, install behavior, and runtime branding/messages.
Core Command Parameterization
src/nemoclaw.ts, src/lib/onboard-command.ts, src/lib/onboard.ts, src/lib/command-registry.ts
Replaces hardcoded nemoclaw/NemoClaw/OpenClaw strings with branding constants; adds brandedUsage() and integrates branding initialization into onboard/resume flows.
Secondary Message & Hints
src/lib/build-context.ts, src/lib/inventory-commands.ts, src/lib/services.ts, src/lib/sandbox-config.ts
Updates user-facing recovery, example commands, startup banners, and comments to use branding constants instead of hardcoded names (mostly text changes).
Probe Logic
src/lib/onboard-inference-probes.ts
Adds retry wrapper for HTTP probes that retries on HTTP 429 when curlStatus === 0 with backoff delays (5s/15s/30s).
Installer / Shell Helpers
scripts/install.sh, test/install-preflight.test.ts
Installer becomes agent-aware, derives CLI display/bin names, refactors shim creation into ensure_cli_shim(), and generalizes CLI verification. Tests updated to assert verification uses active _CLI_BIN.
Tests — Alias & CLI
test/nemohermes-alias.test.ts
New E2E tests validating nemohermes binary presence, permissions, and correct branding in --help/--version outputs and launch wiring.
Tests — Onboard & Probes
test/onboard-selection.test.ts, test/wsl2-probe-timeout.test.ts
Adjusts onboarding selection indices; adds unit test verifying HTTP 429 retry behavior and probe retry invocation.
Tests — Provisioning & CI
test/sandbox-provisioning.test.ts, test/e2e/test-cloud-onboard-e2e.sh, .github/workflows/nightly-e2e.yaml
Adds Dockerfile migration/regression test for legacy .openclaw-data layout, documents NEMOCLAW_INSTALL_REF in e2e script, and exposes NEMOCLAW_INSTALL_REF in CI job env.
Minor / Formatting
src/lib/sandbox-config.ts, misc formatting
Small comment punctuation and formatting adjustments across a few files.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant nemohermes as nemohermes (wrapper)
  participant CLI as nemoclaw (runtime)
  participant Branding as branding.ts
  User->>nemohermes: run `nemohermes ...`
  nemohermes->>nemohermes: export NEMOCLAW_AGENT=hermes
  nemohermes->>CLI: exec main CLI entry (`../dist/nemoclaw`)
  CLI->>Branding: import branding constants (reads NEMOCLAW_AGENT)
  Branding-->>CLI: provide CLI_NAME / CLI_DISPLAY_NAME / AGENT_PRODUCT_NAME
  CLI-->>User: render help/version/messages using branding
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

Poem

🐰 I set the agent, Hermes takes the lead,
A tiny wrapper plants a branding seed.
Tests hop around, the installer hums,
Retry beats drum when 429 comes.
Hooray — one CLI, many names to heed.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 42.35% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(cli): add nemohermes alias for Hermes agent' accurately and concisely summarizes the main change: adding a new nemohermes CLI alias for the Hermes agent. It is specific, clear, and directly reflects the primary feature being introduced.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/nemohermes-alias

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
src/nemoclaw.ts (1)

28-32: Consider centralizing Hermes-alias detection in a shared helper.

The same env+argv predicate now exists in both src/nemoclaw.ts and src/lib/onboard-command.ts; extracting one shared utility would reduce branding drift risk.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/nemoclaw.ts` around lines 28 - 32, The IS_HERMES_ALIAS logic (used to set
CLI_NAME and CLI_DISPLAY_NAME) is duplicated; extract the predicate into a
shared helper function (e.g., isHermesAlias()) exported from a new utility
module and replace the inline predicate in both places with calls to that
helper; update the constants CLI_NAME and CLI_DISPLAY_NAME to use
isHermesAlias() and remove the duplicated env/argv check from
src/lib/onboard-command.ts so both modules rely on the single source of truth.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/reference/commands.md`:
- Around line 759-760: The sentence "Every `nemohermes` command is equivalent to
running `nemoclaw` with `--agent hermes` (for onboard) or
`NEMOCLAW_AGENT=hermes` (for all commands)." is wrapped across two source lines;
update the docs so that entire sentence appears on a single source line (replace
the broken line break so the full sentence is on one line) to follow the "one
sentence per line" guideline.

In `@test/nemohermes-alias.test.ts`:
- Around line 51-66: The test "nemoclaw --version does not contain nemohermes"
currently swallows errors in its try/catch, hiding failures; update the it block
(the test using NEMOCLAW_CLI) to let command failures fail the test instead of
an empty catch: either remove the try/catch so exceptions propagate, or replace
the empty catch with a failing assertion (e.g., call fail(error) or throw the
caught error) and include the caught error message in the failure so any
regression in `node "${NEMOCLAW_CLI}" --version` surfaces.

---

Nitpick comments:
In `@src/nemoclaw.ts`:
- Around line 28-32: The IS_HERMES_ALIAS logic (used to set CLI_NAME and
CLI_DISPLAY_NAME) is duplicated; extract the predicate into a shared helper
function (e.g., isHermesAlias()) exported from a new utility module and replace
the inline predicate in both places with calls to that helper; update the
constants CLI_NAME and CLI_DISPLAY_NAME to use isHermesAlias() and remove the
duplicated env/argv check from src/lib/onboard-command.ts so both modules rely
on the single source of truth.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 18dac6f4-1535-4f54-82d5-22470b2494d4

📥 Commits

Reviewing files that changed from the base of the PR and between f7a4c23 and 3f91d60.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (7)
  • .agents/skills/nemoclaw-user-reference/references/commands.md
  • bin/nemohermes.js
  • docs/reference/commands.md
  • package.json
  • src/lib/onboard-command.ts
  • src/nemoclaw.ts
  • test/nemohermes-alias.test.ts

Comment thread docs/reference/commands.md Resolved
Comment thread test/nemohermes-alias.test.ts Resolved
- Join wrapped sentence onto one source line in docs (one-sentence-per-line rule)
- Remove silent catch in nemoclaw --version test so failures surface

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@test/nemohermes-alias.test.ts`:
- Around line 45-49: The positive-path tests call runHermes and only assert on
stdout; they must also assert the process exit code is successful. Update the
affected tests (the "--version outputs nemohermes branding" case and the other
similar cases around lines referenced) to capture and assert the exit code from
runHermes by adding expect(code).toBe(0) after the runHermes call (use the same
destructured result that provides out and code from runHermes) so failures with
non-zero exits don’t slip through.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 811a22c7-999a-48c6-9375-f0c98f1a2b10

📥 Commits

Reviewing files that changed from the base of the PR and between a6287fd and cc0ca94.

📒 Files selected for processing (2)
  • docs/reference/commands.md
  • test/nemohermes-alias.test.ts
✅ Files skipped from review due to trivial changes (1)
  • docs/reference/commands.md

Comment thread test/nemohermes-alias.test.ts Resolved
Add expect(code).toBe(0) to version and help tests so a non-zero exit
cannot silently pass via partial or error output.
Introduces src/lib/branding.ts which maps NEMOCLAW_AGENT to CLI_NAME,
CLI_DISPLAY_NAME, and AGENT_PRODUCT_NAME. Both bin/nemoclaw.js and
bin/nemohermes.js now set NEMOCLAW_AGENT (openclaw / hermes) before
entering the shared CLI, making neither binary the "real" one.

Every user-visible console.log/error that previously hardcoded
"nemoclaw", "NemoClaw", or "OpenClaw" now uses the branding constants,
so a Hermes user never sees "claw" anywhere in their terminal.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)
src/nemoclaw.ts (4)

1014-1016: ⚠️ Potential issue | 🟡 Minor

Inconsistency: Hardcoded "nemoclaw onboard" in user-facing message.

🔧 Suggested fix
     console.error(
-      "  Recreate this sandbox with `nemoclaw onboard` once the gateway runtime is stable.",
+      `  Recreate this sandbox with \`${CLI_NAME} onboard\` once the gateway runtime is stable.`,
     );
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/nemoclaw.ts` around lines 1014 - 1016, The message in src/nemoclaw.ts
currently hardcodes "nemoclaw onboard" in the console.error, which causes
inconsistency if the CLI binary name changes; update the error to use a single
source of truth (e.g., import the CLI name from package.json's bin field or a
shared constant like CLI_COMMAND) or derive it from process.argv[1], then
interpolate that value instead of the literal "nemoclaw onboard" in the
console.error call so the displayed command always matches the actual CLI name.

976-979: ⚠️ Potential issue | 🟡 Minor

Inconsistency: Hardcoded "nemoclaw" in user-facing message.

These lines still use hardcoded nemoclaw instead of the branding constant.

🔧 Suggested fix
     console.error(
-      "  Run `nemoclaw list` to confirm the remaining sandboxes, or `nemoclaw onboard` to create a new one.",
+      `  Run \`${CLI_NAME} list\` to confirm the remaining sandboxes, or \`${CLI_NAME} onboard\` to create a new one.`,
     );
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/nemoclaw.ts` around lines 976 - 979, Replace the hardcoded "nemoclaw" in
the console.error message with the project's branding constant used elsewhere
(rather than a literal string) so user-facing output is consistent; locate the
console.error call and the surrounding exit (process.exit) in src/nemoclaw.ts
and interpolate or concatenate the branding constant (the same symbol used in
other messages in this file/project) into the string before calling
process.exit(1).

2633-2634: ⚠️ Potential issue | 🟡 Minor

Inconsistency: Hardcoded "nemoclaw onboard".

🔧 Suggested fix
     console.error("  Start it first or recreate with `nemoclaw onboard --recreate-sandbox`.");
+    console.error(`  Start it first or recreate with \`${CLI_NAME} onboard --recreate-sandbox\`.`);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/nemoclaw.ts` around lines 2633 - 2634, The message hardcodes "nemoclaw
onboard"; change it to use the runtime CLI name instead (e.g., a shared constant
like CLI_NAME or derive from process.argv[1]/path.basename(process.argv[1])) so
the message follows the actual binary name; update the string in the
console.error call that currently contains "nemoclaw onboard" (near sandboxName
and bail(...) usage) to interpolate the dynamic CLI name (e.g., `${CLI_NAME}
onboard` or `${path.basename(process.argv[1])} onboard`) and ensure the same
style is used wherever that help text appears.

1779-1781: ⚠️ Potential issue | 🟡 Minor

Inconsistency: Hardcoded "nemoclaw onboard".

🔧 Suggested fix
     console.log(
-      "  Recreate this sandbox with `nemoclaw onboard` once the gateway runtime is stable.",
+      `  Recreate this sandbox with \`${CLI_NAME} onboard\` once the gateway runtime is stable.`,
     );
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/nemoclaw.ts` around lines 1779 - 1781, The console.log call currently
hardcodes the string "nemoclaw onboard", which is inconsistent; replace it with
a dynamically derived CLI command instead (e.g., use an existing constant like
CLI_NAME/CLI_COMMAND or derive the package bin name from package.json via a
small helper such as getCliCommand()) and interpolate that result into the
message so the line using console.log prints "<dynamic-cli-name> onboard" rather
than the hardcoded "nemoclaw onboard".
🧹 Nitpick comments (3)
src/lib/inventory-commands.ts (1)

5-5: Consider using ES6 import for consistency.

The file uses ES6 import for type imports (line 4) but require() for branding. While this works, using consistent import syntax would improve readability.

♻️ Suggested change
 import type { GatewayInference } from "./inference-config";
-const { CLI_NAME } = require("./branding");
+import { CLI_NAME } from "./branding";
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/lib/inventory-commands.ts` at line 5, The file mixes CommonJS require
with ES6 imports—replace the require usage for branding by switching the require
line (const { CLI_NAME } = require("./branding");) to an ES6 import from
"./branding" so all imports use the same syntax and improve readability; update
any references to CLI_NAME to remain unchanged after the import.
src/lib/services.ts (1)

5-5: Same note: consider ES6 import for consistency.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/lib/services.ts` at line 5, The code uses CommonJS require to load
branding constants (const { CLI_DISPLAY_NAME, AGENT_PRODUCT_NAME } =
require("./branding");) which is inconsistent with ES6 modules—replace that
require with an ES6 named import (import { CLI_DISPLAY_NAME, AGENT_PRODUCT_NAME
} from "./branding";), ensure the surrounding module file uses export/import
consistently (or update export style in branding if needed), and run the
build/tests to confirm no module-format breakage.
src/lib/build-context.ts (1)

9-10: Same note: consider ES6 import for consistency.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/lib/build-context.ts` around lines 9 - 10, Replace the CommonJS require
with an ES6 import for consistency: change the require of CLI_NAME to a
top-level ES module import (import { CLI_NAME } from "./branding";) in
build-context.ts and remove the require statement so the module uses ES6 imports
throughout; ensure the import targets the existing exported symbol CLI_NAME.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/lib/onboard.ts`:
- Line 3278: The user-facing strings are using literal "${CLI_DISPLAY_NAME}" and
"${CLI_NAME}" instead of interpolating the constants; update the objects that
reference DASHBOARD_PORT and other places to use template literals or string
concatenation so the actual constant values are shown (e.g., change "{ port:
DASHBOARD_PORT, label: "${CLI_DISPLAY_NAME} dashboard" }" to use `label:
`${CLI_DISPLAY_NAME} dashboard`` or label: CLI_DISPLAY_NAME + " dashboard");
locate occurrences around the variables DASHBOARD_PORT, CLI_DISPLAY_NAME, and
CLI_NAME and replace the quoted placeholder strings with properly interpolated
values.

In `@src/lib/services.ts`:
- Line 312: The banner line using `console.log` that prints "Messaging: via
${AGENT_PRODUCT_NAME} native channels..." can misalign the box when
`AGENT_PRODUCT_NAME` is shorter; update that print to pad the product name
(e.g., use `AGENT_PRODUCT_NAME.padEnd(...)`) or otherwise pad the whole message
to the banner's fixed inner width so the trailing "│" aligns with other lines;
change the `console.log` instance that constructs the messaging banner to apply
padding rather than inserting the raw `AGENT_PRODUCT_NAME`.

In `@src/nemoclaw.ts`:
- Around line 824-826: The string passed to writer(...) uses double quotes so
${CLI_DISPLAY_NAME} will not interpolate; update the call in src/nemoclaw.ts
(the writer invocation that references CLI_DISPLAY_NAME) to use a template
literal (backticks) or explicitly concatenate CLI_DISPLAY_NAME into the message
so the gateway name is inserted at runtime.
- Around line 853-855: The string passed to writer uses "${CLI_DISPLAY_NAME}"
inside a regular quoted string and hardcodes "nemoclaw onboard"; change this to
a template literal so CLI_DISPLAY_NAME is interpolated (e.g., use backticks
around the whole message) and replace the hardcoded "nemoclaw onboard" with the
interpolated `${CLI_NAME} onboard` to ensure both variables are evaluated;
update the call to writer(...) accordingly (refer to the writer invocation and
the CLI_DISPLAY_NAME / CLI_NAME symbols).
- Line 2990: The console.log call currently prints a regular string containing a
template expression; update the console.log in src/nemoclaw.ts (the line calling
console.log("  Run `${CLI_NAME} upgrade-sandboxes` to rebuild them.");) to use a
template literal so the CLI_NAME variable is interpolated (use backticks and
${CLI_NAME} in the string) so the actual CLI name is printed.
- Around line 1062-1067: The error messages mix hardcoded "nemoclaw" with the
branded constant CLI_DISPLAY_NAME; update the strings in src/nemoclaw.ts so all
occurrences use CLI_DISPLAY_NAME (e.g., replace hardcoded "nemoclaw" in the
messages around the `Installed OpenShell...` and `Upgrade OpenShell...`
console.error calls) to ensure consistent branding and formatting while
preserving the existing message wording and template literal style.

---

Outside diff comments:
In `@src/nemoclaw.ts`:
- Around line 1014-1016: The message in src/nemoclaw.ts currently hardcodes
"nemoclaw onboard" in the console.error, which causes inconsistency if the CLI
binary name changes; update the error to use a single source of truth (e.g.,
import the CLI name from package.json's bin field or a shared constant like
CLI_COMMAND) or derive it from process.argv[1], then interpolate that value
instead of the literal "nemoclaw onboard" in the console.error call so the
displayed command always matches the actual CLI name.
- Around line 976-979: Replace the hardcoded "nemoclaw" in the console.error
message with the project's branding constant used elsewhere (rather than a
literal string) so user-facing output is consistent; locate the console.error
call and the surrounding exit (process.exit) in src/nemoclaw.ts and interpolate
or concatenate the branding constant (the same symbol used in other messages in
this file/project) into the string before calling process.exit(1).
- Around line 2633-2634: The message hardcodes "nemoclaw onboard"; change it to
use the runtime CLI name instead (e.g., a shared constant like CLI_NAME or
derive from process.argv[1]/path.basename(process.argv[1])) so the message
follows the actual binary name; update the string in the console.error call that
currently contains "nemoclaw onboard" (near sandboxName and bail(...) usage) to
interpolate the dynamic CLI name (e.g., `${CLI_NAME} onboard` or
`${path.basename(process.argv[1])} onboard`) and ensure the same style is used
wherever that help text appears.
- Around line 1779-1781: The console.log call currently hardcodes the string
"nemoclaw onboard", which is inconsistent; replace it with a dynamically derived
CLI command instead (e.g., use an existing constant like CLI_NAME/CLI_COMMAND or
derive the package bin name from package.json via a small helper such as
getCliCommand()) and interpolate that result into the message so the line using
console.log prints "<dynamic-cli-name> onboard" rather than the hardcoded
"nemoclaw onboard".

---

Nitpick comments:
In `@src/lib/build-context.ts`:
- Around line 9-10: Replace the CommonJS require with an ES6 import for
consistency: change the require of CLI_NAME to a top-level ES module import
(import { CLI_NAME } from "./branding";) in build-context.ts and remove the
require statement so the module uses ES6 imports throughout; ensure the import
targets the existing exported symbol CLI_NAME.

In `@src/lib/inventory-commands.ts`:
- Line 5: The file mixes CommonJS require with ES6 imports—replace the require
usage for branding by switching the require line (const { CLI_NAME } =
require("./branding");) to an ES6 import from "./branding" so all imports use
the same syntax and improve readability; update any references to CLI_NAME to
remain unchanged after the import.

In `@src/lib/services.ts`:
- Line 5: The code uses CommonJS require to load branding constants (const {
CLI_DISPLAY_NAME, AGENT_PRODUCT_NAME } = require("./branding");) which is
inconsistent with ES6 modules—replace that require with an ES6 named import
(import { CLI_DISPLAY_NAME, AGENT_PRODUCT_NAME } from "./branding";), ensure the
surrounding module file uses export/import consistently (or update export style
in branding if needed), and run the build/tests to confirm no module-format
breakage.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: cc30dac3-9df0-478c-945b-e76fc8cfc4c2

📥 Commits

Reviewing files that changed from the base of the PR and between 0284666 and e334abf.

📒 Files selected for processing (11)
  • bin/nemoclaw.js
  • src/lib/branding.ts
  • src/lib/build-context.ts
  • src/lib/command-registry.ts
  • src/lib/inventory-commands.ts
  • src/lib/onboard-command.ts
  • src/lib/onboard.ts
  • src/lib/sandbox-config.ts
  • src/lib/services.ts
  • src/nemoclaw.ts
  • test/nemohermes-alias.test.ts
✅ Files skipped from review due to trivial changes (2)
  • bin/nemoclaw.js
  • src/lib/sandbox-config.ts

Comment thread src/lib/onboard.ts Resolved
Comment thread src/lib/services.ts Resolved
Comment thread src/nemoclaw.ts Resolved
Comment thread src/nemoclaw.ts Resolved
Comment thread src/nemoclaw.ts Resolved
Comment thread src/nemoclaw.ts Resolved
bin/nemoclaw.js is a guarded legacy path — CI rejects edits to it.
Move the NEMOCLAW_AGENT=openclaw default into src/nemoclaw.ts (before
any imports that read the env var) so the guard passes.
…late literals

Several writer/console strings used double quotes with ${CLI_NAME}
or ${CLI_DISPLAY_NAME} placeholders, causing literal text output
instead of interpolation. Convert all to backtick template literals.
Also fix services box alignment for variable-length product names.
require("./branding") fails when vitest imports the TS source directly
(the CJS require can't resolve TS modules). Switch to ESM import in
inventory-commands.ts and services.ts. Also fix remaining
non-interpolated branding strings and hardcoded nemoclaw references.
Reads NEMOCLAW_AGENT and derives _CLI_DISPLAY, _AGENT_PRODUCT, and
_CLI_BIN so all user-visible text (banner footer, step labels, spin
messages, completion output, warnings) shows the correct product name
when installing for Hermes vs OpenClaw.
Show agent-specific ASCII art in the installer banner — NEMOHERMES
block letters when NEMOCLAW_AGENT=hermes, NEMOCLAW otherwise.
Combines CLI_NAME branding from this branch with --fresh flag from main.
@ericksoa ericksoa self-assigned this Apr 25, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/lib/onboard.ts (1)

7119-7142: ⚠️ Potential issue | 🟠 Major

Successful dashboard output still says OpenClaw UI.

This branch updated the fallback label to ${AGENT_PRODUCT_NAME} UI, but the normal/tokenized success path still hardcodes "OpenClaw UI ..." at Line 7132. That means a successful nemohermes onboard run still shows the old branding in the primary path.

Suggested fix
-    console.log(
-      "  OpenClaw UI (tokenized URL; treat it like a password; save it now - it will not be printed again)",
-    );
+    console.log(
+      `  ${AGENT_PRODUCT_NAME} UI (tokenized URL; treat it like a password; save it now - it will not be printed again)`,
+    );
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/lib/onboard.ts` around lines 7119 - 7142, Replace the hardcoded "OpenClaw
UI (tokenized URL; ...)" string in the tokenized-success branch with the
AGENT_PRODUCT_NAME variable so the branding is consistent; locate the block in
src/lib/onboard.ts where it checks "if (agent) { ... } else if (token) {
console.log('  OpenClaw UI (tokenized URL;...') ... }" and change that
console.log to use `${AGENT_PRODUCT_NAME} UI (tokenized URL; treat it like a
password; save it now - it will not be printed again)` while leaving the
following loops over guidanceLines and dashboardAccess unchanged.
scripts/install.sh (1)

1101-1129: ⚠️ Potential issue | 🟠 Major

verify_nemoclaw still validates only nemoclaw, not the active $_CLI_BIN.

With Hermes selected, the installer can mark readiness based on nemoclaw while later instructions tell users to run nemohermes. This can produce false-positive readiness and broken next-step commands.

Proposed fix
-is_real_nemoclaw_cli() {
-  local bin_path="${1:-nemoclaw}"
+is_real_nemoclaw_cli() {
+  local bin_path="$1"
+  local expected_cli="$2"
   local version_output
   version_output="$("$bin_path" --version 2>/dev/null)" || return 1
-  [[ "$version_output" =~ ^nemoclaw[[:space:]]+v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?$ ]]
+  [[ "$version_output" =~ ^${expected_cli}[[:space:]]+v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?$ ]]
 }
 
 verify_nemoclaw() {
-  if command_exists nemoclaw; then
-    if is_real_nemoclaw_cli "$(command -v nemoclaw)"; then
+  local cli_bin="${_CLI_BIN}"
+  if command_exists "$cli_bin"; then
+    if is_real_nemoclaw_cli "$(command -v "$cli_bin")" "$cli_bin"; then
       NEMOCLAW_READY_NOW=true
       ensure_nemoclaw_shim || true
-      info "Verified: nemoclaw is available at $(command -v nemoclaw)"
+      info "Verified: ${cli_bin} is available at $(command -v "$cli_bin")"
       return 0
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/install.sh` around lines 1101 - 1129, The readiness check is
hard-coded to "nemoclaw" and related helpers (is_real_nemoclaw_cli,
ensure_nemoclaw_shim, NEMOCLAW_SHIM_DIR, etc.), causing false positives when
$_CLI_BIN (e.g., nemohermes) is the active binary; update the logic to use the
active CLI variable instead. Replace literal "nemoclaw" occurrences with
"${_CLI_BIN}", call the generic validator like is_real_cli
"$npm_bin/${_CLI_BIN}" (or add such a wrapper) instead of is_real_nemoclaw_cli,
invoke the shim installer as ensure_cli_shim or ensure_shim "${_CLI_BIN}" rather
than ensure_nemoclaw_shim, and use generic recovery vars (e.g.,
CLI_RECOVERY_SHIM_DIR) when choosing between
"$CLI_RECOVERY_SHIM_DIR/${_CLI_BIN}" and "$npm_bin/${_CLI_BIN}"; ensure
command_exists is invoked against "${_CLI_BIN}" and all messages/logs reference
"${_CLI_DISPLAY}" and "${_CLI_BIN}" appropriately so readiness reflects the
actual selected CLI.
♻️ Duplicate comments (1)
src/nemoclaw.ts (1)

1006-1011: ⚠️ Potential issue | 🟡 Minor

Old-OpenShell guidance still hardcodes the base CLI name.

This path will tell nemohermes users to run nemoclaw logs, which breaks the alias-branding goal for error output.

🔧 Proposed fix
 function printOldLogsCompatibilityGuidance(installedVersion = null) {
   const versionText = installedVersion ? ` (${installedVersion})` : "";
   console.error(
-    `  Installed OpenShell${versionText} is too old or incompatible with \`nemoclaw logs\`.`,
+    `  Installed OpenShell${versionText} is too old or incompatible with \`${CLI_NAME} logs\`.`,
   );
   console.error(`  ${CLI_DISPLAY_NAME} expects \`openshell logs <name>\` and live streaming via \`--tail\`.`);
   console.error(
     `  Upgrade OpenShell by rerunning \`${CLI_NAME} onboard\`, or reinstall the OpenShell CLI and try again.`,
   );
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/nemoclaw.ts` around lines 1006 - 1011, The error strings hardcode other
CLI names; replace the backticked hardcoded commands with the appropriate
template vars so branding/aliases are respected: use CLI_NAME for command
examples (e.g. change `nemoclaw logs` and `openshell logs` to `${CLI_NAME}
logs`) and keep CLI_DISPLAY_NAME for display-only mentions; update the
console.error calls that currently contain the literal backticked commands so
they interpolate CLI_NAME/CLI_DISPLAY_NAME (refer to the console.error lines and
the CLI_NAME and CLI_DISPLAY_NAME symbols).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@scripts/install.sh`:
- Line 1219: The log message uses ${_CLI_BIN} but the onboarding command still
calls the hardcoded agent name `nemoclaw`; update the onboarding invocation to
use the ${_CLI_BIN} variable (preserving any quoting/flags) so the script
respects agent aliases/mode. Locate the onboarding call in scripts/install.sh
that currently references `nemoclaw` and replace it with ${_CLI_BIN} (or
"${_CLI_BIN}" if other uses are quoted), keeping the same arguments and
redirections so behavior and error handling remain unchanged.

In `@src/lib/onboard.ts`:
- Line 8: The module currently snapshots branding via the module-scope require
of CLI_NAME, CLI_DISPLAY_NAME, AGENT_PRODUCT_NAME which makes onboarding use
whatever NEMOCLAW_AGENT was set at import time; instead resolve branding at
runtime after the selected agent is known. Replace the top-level
require("./branding") constants with runtime calls to branding getters (e.g.,
require("./branding").getCLIName/getCLIDisplayName/getAgentProductName or a new
getBranding(agent) function) inside the onboarding flow that prints names (refer
to the existing uses of CLI_NAME, CLI_DISPLAY_NAME, AGENT_PRODUCT_NAME and the
NEMOCLAW_AGENT selection logic) so the displayed names reflect the resolved
agent rather than the module-load snapshot.

---

Outside diff comments:
In `@scripts/install.sh`:
- Around line 1101-1129: The readiness check is hard-coded to "nemoclaw" and
related helpers (is_real_nemoclaw_cli, ensure_nemoclaw_shim, NEMOCLAW_SHIM_DIR,
etc.), causing false positives when $_CLI_BIN (e.g., nemohermes) is the active
binary; update the logic to use the active CLI variable instead. Replace literal
"nemoclaw" occurrences with "${_CLI_BIN}", call the generic validator like
is_real_cli "$npm_bin/${_CLI_BIN}" (or add such a wrapper) instead of
is_real_nemoclaw_cli, invoke the shim installer as ensure_cli_shim or
ensure_shim "${_CLI_BIN}" rather than ensure_nemoclaw_shim, and use generic
recovery vars (e.g., CLI_RECOVERY_SHIM_DIR) when choosing between
"$CLI_RECOVERY_SHIM_DIR/${_CLI_BIN}" and "$npm_bin/${_CLI_BIN}"; ensure
command_exists is invoked against "${_CLI_BIN}" and all messages/logs reference
"${_CLI_DISPLAY}" and "${_CLI_BIN}" appropriately so readiness reflects the
actual selected CLI.

In `@src/lib/onboard.ts`:
- Around line 7119-7142: Replace the hardcoded "OpenClaw UI (tokenized URL;
...)" string in the tokenized-success branch with the AGENT_PRODUCT_NAME
variable so the branding is consistent; locate the block in src/lib/onboard.ts
where it checks "if (agent) { ... } else if (token) { console.log('  OpenClaw UI
(tokenized URL;...') ... }" and change that console.log to use
`${AGENT_PRODUCT_NAME} UI (tokenized URL; treat it like a password; save it now
- it will not be printed again)` while leaving the following loops over
guidanceLines and dashboardAccess unchanged.

---

Duplicate comments:
In `@src/nemoclaw.ts`:
- Around line 1006-1011: The error strings hardcode other CLI names; replace the
backticked hardcoded commands with the appropriate template vars so
branding/aliases are respected: use CLI_NAME for command examples (e.g. change
`nemoclaw logs` and `openshell logs` to `${CLI_NAME} logs`) and keep
CLI_DISPLAY_NAME for display-only mentions; update the console.error calls that
currently contain the literal backticked commands so they interpolate
CLI_NAME/CLI_DISPLAY_NAME (refer to the console.error lines and the CLI_NAME and
CLI_DISPLAY_NAME symbols).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 4198fa13-5ef0-42e1-9c0f-722cf9bd3aa2

📥 Commits

Reviewing files that changed from the base of the PR and between 0284666 and 19720e1.

📒 Files selected for processing (12)
  • .agents/skills/nemoclaw-user-reference/references/commands.md
  • scripts/install.sh
  • src/lib/branding.ts
  • src/lib/build-context.ts
  • src/lib/command-registry.ts
  • src/lib/inventory-commands.ts
  • src/lib/onboard-command.ts
  • src/lib/onboard.ts
  • src/lib/sandbox-config.ts
  • src/lib/services.ts
  • src/nemoclaw.ts
  • test/nemohermes-alias.test.ts
✅ Files skipped from review due to trivial changes (3)
  • src/lib/inventory-commands.ts
  • src/lib/build-context.ts
  • src/lib/sandbox-config.ts
🚧 Files skipped from review as they are similar to previous changes (5)
  • src/lib/branding.ts
  • src/lib/services.ts
  • .agents/skills/nemoclaw-user-reference/references/commands.md
  • test/nemohermes-alias.test.ts
  • src/lib/command-registry.ts

Comment thread scripts/install.sh Resolved
Comment thread src/lib/onboard.ts Resolved
…rmes alias

- Replace hardcoded "OpenClaw UI" with AGENT_PRODUCT_NAME in onboard.ts
  tokenized-success and inference-drift messages
- Replace hardcoded `nemoclaw logs` with CLI_NAME in nemoclaw.ts
  compatibility guidance
- Switch build-context.ts from require() to ES6 import for branding
- Use $_CLI_BIN in install.sh error messages and onboarding invocations
  instead of hardcoded "nemoclaw"
- Make nemoclaw --version test fail explicitly on non-zero exit

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
scripts/install.sh (1)

1337-1346: ⚠️ Potential issue | 🟡 Minor

post_install_message() still contains hardcoded nemoclaw references.

While other functions were updated for agent-aware branding, this function still uses hardcoded 'nemoclaw' at lines 1337 and 1346:

warn "Your current shell cannot resolve 'nemoclaw' yet."
# ...
echo "    nemoclaw onboard"

These should use $_CLI_BIN for consistency with the rest of the branding update.

Proposed fix
-  warn "Your current shell cannot resolve 'nemoclaw' yet."
+  warn "Your current shell cannot resolve '${_CLI_BIN}' yet."
   echo ""
-  echo "  To use nemoclaw now, run:"
+  echo "  To use ${_CLI_BIN} now, run:"
   echo ""
   echo "    export PATH=\"${NEMOCLAW_RECOVERY_EXPORT_DIR}:\$PATH\""
   echo "    source ${NEMOCLAW_RECOVERY_PROFILE}"
   echo ""
   echo "  Then run:"
   echo ""
-  echo "    nemoclaw onboard"
+  echo "    ${_CLI_BIN} onboard"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/install.sh` around lines 1337 - 1346, In post_install_message(),
replace the hardcoded 'nemoclaw' occurrences with the CLI variable so branding
is consistent: change the warn line to expand $_CLI_BIN (e.g. warn "Your current
shell cannot resolve '$_CLI_BIN' yet.") and change the final instruction echo
from "nemoclaw onboard" to use "$_CLI_BIN onboard" (preserve surrounding
quoting/escaping as in other messages and keep existing
NEMOCLAW_RECOVERY_EXPORT_DIR and NEMOCLAW_RECOVERY_PROFILE usage).
♻️ Duplicate comments (1)
src/lib/onboard.ts (1)

8-8: ⚠️ Potential issue | 🟠 Major

Resolve branding after agent selection, not at module load.

CLI_NAME / CLI_DISPLAY_NAME / AGENT_PRODUCT_NAME are still snapshotted at import time (Line 8), but agent resolution happens later (Line 7418). That can surface incorrect branding in output (starting with the onboarding header at Line 7413) when runtime-selected agent differs from import-time env. Move branding resolution to runtime after agent selection (or use a getter-based branding API at call sites).

Also applies to: 7413-7418

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/lib/onboard.ts` at line 8, The module currently requires and destructures
CLI_NAME, CLI_DISPLAY_NAME, and AGENT_PRODUCT_NAME at import time which
snapshots branding before runtime agent selection; change this by removing the
top-level destructure and instead resolve branding after agent selection (or
implement and export getter functions like
getCliName/getCliDisplayName/getAgentProductName) and call those getters from
the onboarding header / onboarding display code (the code path that prints the
onboarding header after agent resolution). Update all usages of CLI_NAME,
CLI_DISPLAY_NAME, and AGENT_PRODUCT_NAME in this module to invoke the runtime
getter (or call the branding-resolution function) so the displayed branding
reflects the selected agent.
🧹 Nitpick comments (1)
scripts/install.sh (1)

450-463: Unused variable _AGENT_PRODUCT defined but never referenced.

The variable _AGENT_PRODUCT is set on lines 455 and 460 but is never used anywhere in the script. Lines 249 and 272 use ${NEMOCLAW_AGENT^} and ${agent_name^} respectively for capitalization instead.

Either remove the unused variable or replace the direct capitalizations with $_AGENT_PRODUCT for consistency with the branding pattern.

Option 1: Remove unused variable
 case "${NEMOCLAW_AGENT:-openclaw}" in
   hermes)
     _CLI_DISPLAY="NemoHermes"
-    _AGENT_PRODUCT="Hermes"
     _CLI_BIN="nemohermes"
     ;;
   *)
     _CLI_DISPLAY="NemoClaw"
-    _AGENT_PRODUCT="OpenClaw"
     _CLI_BIN="nemoclaw"
     ;;
 esac
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/install.sh` around lines 450 - 463, The script defines _AGENT_PRODUCT
inside the agent branding case but never uses it; replace direct capitalizations
(${NEMOCLAW_AGENT^} and ${agent_name^}) with $_AGENT_PRODUCT for consistent
branding and remove any remaining direct ^-capitalization uses, keeping the case
block assignments for _AGENT_PRODUCT (alongside _CLI_DISPLAY and _CLI_BIN) and
updating all occurrences to reference _AGENT_PRODUCT so the variable is actually
used.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@scripts/install.sh`:
- Around line 1337-1346: In post_install_message(), replace the hardcoded
'nemoclaw' occurrences with the CLI variable so branding is consistent: change
the warn line to expand $_CLI_BIN (e.g. warn "Your current shell cannot resolve
'$_CLI_BIN' yet.") and change the final instruction echo from "nemoclaw onboard"
to use "$_CLI_BIN onboard" (preserve surrounding quoting/escaping as in other
messages and keep existing NEMOCLAW_RECOVERY_EXPORT_DIR and
NEMOCLAW_RECOVERY_PROFILE usage).

---

Duplicate comments:
In `@src/lib/onboard.ts`:
- Line 8: The module currently requires and destructures CLI_NAME,
CLI_DISPLAY_NAME, and AGENT_PRODUCT_NAME at import time which snapshots branding
before runtime agent selection; change this by removing the top-level
destructure and instead resolve branding after agent selection (or implement and
export getter functions like getCliName/getCliDisplayName/getAgentProductName)
and call those getters from the onboarding header / onboarding display code (the
code path that prints the onboarding header after agent resolution). Update all
usages of CLI_NAME, CLI_DISPLAY_NAME, and AGENT_PRODUCT_NAME in this module to
invoke the runtime getter (or call the branding-resolution function) so the
displayed branding reflects the selected agent.

---

Nitpick comments:
In `@scripts/install.sh`:
- Around line 450-463: The script defines _AGENT_PRODUCT inside the agent
branding case but never uses it; replace direct capitalizations
(${NEMOCLAW_AGENT^} and ${agent_name^}) with $_AGENT_PRODUCT for consistent
branding and remove any remaining direct ^-capitalization uses, keeping the case
block assignments for _AGENT_PRODUCT (alongside _CLI_DISPLAY and _CLI_BIN) and
updating all occurrences to reference _AGENT_PRODUCT so the variable is actually
used.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 416410ba-a317-40f5-b900-2cfd203111b1

📥 Commits

Reviewing files that changed from the base of the PR and between 19720e1 and 127e81a.

📒 Files selected for processing (5)
  • scripts/install.sh
  • src/lib/build-context.ts
  • src/lib/onboard.ts
  • src/nemoclaw.ts
  • test/nemohermes-alias.test.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/lib/build-context.ts
  • src/nemoclaw.ts
  • test/nemohermes-alias.test.ts

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/lib/onboard.ts (1)

7053-7098: ⚠️ Potential issue | 🟡 Minor

One fallback instruction still hardcodes nemoclaw.

The token-recovery hint still prints nemoclaw directly, which breaks alias branding consistency in this path.

Suggested fix
-    console.log(
-      `  Token:       nemoclaw ${sandboxName} connect  →  jq -r '.gateway.auth.token' /sandbox/.openclaw/openclaw.json`,
-    );
+    console.log(
+      `  Token:       ${CLI_NAME} ${sandboxName} connect  →  jq -r '.gateway.auth.token' /sandbox/.openclaw/openclaw.json`,
+    );
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/lib/onboard.ts` around lines 7053 - 7098, The token-recovery hint
hardcodes "nemoclaw"; update the string construction that prints the Token hint
so it uses the CLI_NAME variable and sandboxName (the same variables used
elsewhere) instead of the literal "nemoclaw" (refer to CLI_NAME and sandboxName
in the block that prints `Token:       ... connect  →  jq -r
'.gateway.auth.token' /sandbox/.openclaw/openclaw.json`). Ensure the rest of the
message formatting and spacing remains unchanged and that any subsequent
instructions referring to appending "#token=<token>" still follow the same
CLI_NAME replacement.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@src/lib/onboard.ts`:
- Around line 7053-7098: The token-recovery hint hardcodes "nemoclaw"; update
the string construction that prints the Token hint so it uses the CLI_NAME
variable and sandboxName (the same variables used elsewhere) instead of the
literal "nemoclaw" (refer to CLI_NAME and sandboxName in the block that prints
`Token:       ... connect  →  jq -r '.gateway.auth.token'
/sandbox/.openclaw/openclaw.json`). Ensure the rest of the message formatting
and spacing remains unchanged and that any subsequent instructions referring to
appending "#token=<token>" still follow the same CLI_NAME replacement.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: bd8def80-cdd8-4dac-8027-50bcc2290a8d

📥 Commits

Reviewing files that changed from the base of the PR and between 127e81a and 1a3ef25.

📒 Files selected for processing (1)
  • src/lib/onboard.ts

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
src/nemoclaw.ts (1)

780-790: ⚠️ Potential issue | 🟡 Minor

One gateway recovery branch still hardcodes NemoClaw.

The connection-refused path in printGatewayLifecycleHint() still prints NemoClaw literally, so nemohermes falls back to the old brand on that error path. This should use CLI_DISPLAY_NAME, like the surrounding branches.

🔧 Suggested fix
     writer(
-      "  The selected NemoClaw gateway exists in metadata, but its API is refusing connections after restart.",
+      `  The selected ${CLI_DISPLAY_NAME} gateway exists in metadata, but its API is refusing connections after restart.`,
     );
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/nemoclaw.ts` around lines 780 - 790, In printGatewayLifecycleHint, the
connection-refused branch still hardcodes "NemoClaw"; update the three
writer(...) calls inside the if that matches connection errors and
/Gateway:\s+nemoclaw/i to use the CLI_DISPLAY_NAME constant instead of the
literal string so the message reflects the current brand (replace "NemoClaw"
with CLI_DISPLAY_NAME in those writer invocations).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/nemoclaw.ts`:
- Around line 4-9: The current defaulting of process.env.NEMOCLAW_AGENT in this
module is unreliable because static ES imports are hoisted and may run before
the assignment; either move the defaulting logic into the launcher scripts that
set the env (bin/nemoclaw.js and bin/nemohermes.js) so the env is guaranteed
before any imports, or change the static imports in this entrypoint to dynamic
require() calls executed after you set process.env.NEMOCLAW_AGENT; update the
file to implement one of these two approaches and ensure any import that cares
about NEMOCLAW_AGENT (e.g., the module currently imported statically from this
entrypoint) happens after the env is set.

---

Duplicate comments:
In `@src/nemoclaw.ts`:
- Around line 780-790: In printGatewayLifecycleHint, the connection-refused
branch still hardcodes "NemoClaw"; update the three writer(...) calls inside the
if that matches connection errors and /Gateway:\s+nemoclaw/i to use the
CLI_DISPLAY_NAME constant instead of the literal string so the message reflects
the current brand (replace "NemoClaw" with CLI_DISPLAY_NAME in those writer
invocations).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: d8a9ae02-a29d-43c1-94c3-bdd274de8c49

📥 Commits

Reviewing files that changed from the base of the PR and between 1a3ef25 and 1f71676.

📒 Files selected for processing (2)
  • src/lib/sandbox-config.ts
  • src/nemoclaw.ts
✅ Files skipped from review due to trivial changes (1)
  • src/lib/sandbox-config.ts

Comment thread src/nemoclaw.ts Resolved
ericksoa added 16 commits April 29, 2026 22:37
Adds a `nemohermes` CLI command that wraps `nemoclaw` with
`NEMOCLAW_AGENT=hermes` pre-set. Help text, version output, and error
messages automatically adjust when launched through the alias.
- Join wrapped sentence onto one source line in docs (one-sentence-per-line rule)
- Remove silent catch in nemoclaw --version test so failures surface
Add expect(code).toBe(0) to version and help tests so a non-zero exit
cannot silently pass via partial or error output.
Introduces src/lib/branding.ts which maps NEMOCLAW_AGENT to CLI_NAME,
CLI_DISPLAY_NAME, and AGENT_PRODUCT_NAME. Both bin/nemoclaw.js and
bin/nemohermes.js now set NEMOCLAW_AGENT (openclaw / hermes) before
entering the shared CLI, making neither binary the "real" one.

Every user-visible console.log/error that previously hardcoded
"nemoclaw", "NemoClaw", or "OpenClaw" now uses the branding constants,
so a Hermes user never sees "claw" anywhere in their terminal.
bin/nemoclaw.js is a guarded legacy path — CI rejects edits to it.
Move the NEMOCLAW_AGENT=openclaw default into src/nemoclaw.ts (before
any imports that read the env var) so the guard passes.
…late literals

Several writer/console strings used double quotes with ${CLI_NAME}
or ${CLI_DISPLAY_NAME} placeholders, causing literal text output
instead of interpolation. Convert all to backtick template literals.
Also fix services box alignment for variable-length product names.
require("./branding") fails when vitest imports the TS source directly
(the CJS require can't resolve TS modules). Switch to ESM import in
inventory-commands.ts and services.ts. Also fix remaining
non-interpolated branding strings and hardcoded nemoclaw references.
Reads NEMOCLAW_AGENT and derives _CLI_DISPLAY, _AGENT_PRODUCT, and
_CLI_BIN so all user-visible text (banner footer, step labels, spin
messages, completion output, warnings) shows the correct product name
when installing for Hermes vs OpenClaw.
Show agent-specific ASCII art in the installer banner — NEMOHERMES
block letters when NEMOCLAW_AGENT=hermes, NEMOCLAW otherwise.
…rmes alias

- Replace hardcoded "OpenClaw UI" with AGENT_PRODUCT_NAME in onboard.ts
  tokenized-success and inference-drift messages
- Replace hardcoded `nemoclaw logs` with CLI_NAME in nemoclaw.ts
  compatibility guidance
- Switch build-context.ts from require() to ES6 import for branding
- Use $_CLI_BIN in install.sh error messages and onboarding invocations
  instead of hardcoded "nemoclaw"
- Make nemoclaw --version test fail explicitly on non-zero exit
@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ❌ Some jobs failed

Run: 25149631166
Branch: feat/nemohermes-alias
Requested jobs: all (no filter)
Summary: 19 passed, 1 failed, 1 skipped

Job Result
cloud-e2e ✅ success
cloud-inference-e2e ✅ success
cloud-onboard-e2e ✅ success
deployment-services-e2e ✅ success
diagnostics-e2e ✅ success
docs-validation-e2e ✅ success
gpu-e2e ⏭️ skipped
hermes-e2e ✅ success
inference-routing-e2e ✅ success
messaging-providers-e2e ✅ success
network-policy-e2e ✅ success
overlayfs-autofix-e2e ✅ success
rebuild-hermes-e2e ✅ success
rebuild-openclaw-e2e ✅ success
sandbox-operations-e2e ✅ success
sandbox-survival-e2e ✅ success
shields-config-e2e ✅ success
skill-agent-e2e ✅ success
snapshot-commands-e2e ✅ success
token-rotation-e2e ❌ failure
upgrade-stale-sandbox-e2e ✅ success

Failed jobs: token-rotation-e2e. Check run artifacts for logs.

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 25149631166
Branch: feat/nemohermes-alias
Requested jobs: all (no filter)
Summary: 20 passed, 0 failed, 1 skipped

Job Result
cloud-e2e ✅ success
cloud-inference-e2e ✅ success
cloud-onboard-e2e ✅ success
deployment-services-e2e ✅ success
diagnostics-e2e ✅ success
docs-validation-e2e ✅ success
gpu-e2e ⏭️ skipped
hermes-e2e ✅ success
inference-routing-e2e ✅ success
messaging-providers-e2e ✅ success
network-policy-e2e ✅ success
overlayfs-autofix-e2e ✅ success
rebuild-hermes-e2e ✅ success
rebuild-openclaw-e2e ✅ success
sandbox-operations-e2e ✅ success
sandbox-survival-e2e ✅ success
shields-config-e2e ✅ success
skill-agent-e2e ✅ success
snapshot-commands-e2e ✅ success
token-rotation-e2e ✅ success
upgrade-stale-sandbox-e2e ✅ success

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 25168280928
Branch: feat/nemohermes-alias
Requested jobs: double-onboard-e2e
Summary: 0 passed, 0 failed, 21 skipped

Job Result
cloud-e2e ⏭️ skipped
cloud-inference-e2e ⏭️ skipped
cloud-onboard-e2e ⏭️ skipped
deployment-services-e2e ⏭️ skipped
diagnostics-e2e ⏭️ skipped
docs-validation-e2e ⏭️ skipped
gpu-e2e ⏭️ skipped
hermes-e2e ⏭️ skipped
inference-routing-e2e ⏭️ skipped
messaging-providers-e2e ⏭️ skipped
network-policy-e2e ⏭️ skipped
overlayfs-autofix-e2e ⏭️ skipped
rebuild-hermes-e2e ⏭️ skipped
rebuild-openclaw-e2e ⏭️ skipped
sandbox-operations-e2e ⏭️ skipped
sandbox-survival-e2e ⏭️ skipped
shields-config-e2e ⏭️ skipped
skill-agent-e2e ⏭️ skipped
snapshot-commands-e2e ⏭️ skipped
token-rotation-e2e ⏭️ skipped
upgrade-stale-sandbox-e2e ⏭️ skipped

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ❌ Some jobs failed

Run: 25170927871
Branch: feat/nemohermes-alias
Requested jobs: all (no filter)
Summary: 19 passed, 1 failed, 1 skipped

Job Result
cloud-e2e ✅ success
cloud-inference-e2e ✅ success
cloud-onboard-e2e ✅ success
deployment-services-e2e ✅ success
diagnostics-e2e ✅ success
docs-validation-e2e ✅ success
gpu-e2e ⏭️ skipped
hermes-e2e ✅ success
inference-routing-e2e ✅ success
messaging-providers-e2e ✅ success
network-policy-e2e ✅ success
overlayfs-autofix-e2e ✅ success
rebuild-hermes-e2e ✅ success
rebuild-openclaw-e2e ✅ success
sandbox-operations-e2e ❌ failure
sandbox-survival-e2e ✅ success
shields-config-e2e ✅ success
skill-agent-e2e ✅ success
snapshot-commands-e2e ✅ success
token-rotation-e2e ✅ success
upgrade-stale-sandbox-e2e ✅ success

Failed jobs: sandbox-operations-e2e. Check run artifacts for logs.

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 25170927871
Branch: feat/nemohermes-alias
Requested jobs: all (no filter)
Summary: 20 passed, 0 failed, 1 skipped

Job Result
cloud-e2e ✅ success
cloud-inference-e2e ✅ success
cloud-onboard-e2e ✅ success
deployment-services-e2e ✅ success
diagnostics-e2e ✅ success
docs-validation-e2e ✅ success
gpu-e2e ⏭️ skipped
hermes-e2e ✅ success
inference-routing-e2e ✅ success
messaging-providers-e2e ✅ success
network-policy-e2e ✅ success
overlayfs-autofix-e2e ✅ success
rebuild-hermes-e2e ✅ success
rebuild-openclaw-e2e ✅ success
sandbox-operations-e2e ✅ success
sandbox-survival-e2e ✅ success
shields-config-e2e ✅ success
skill-agent-e2e ✅ success
snapshot-commands-e2e ✅ success
token-rotation-e2e ✅ success
upgrade-stale-sandbox-e2e ✅ success

@ericksoa
ericksoa merged commit 8aa2c06 into main Apr 30, 2026
150 of 154 checks passed
@wscurran wscurran added area: cli Command line interface, flags, terminal UX, or output feature PR adds or expands user-visible functionality and removed priority: high labels Jun 3, 2026
@cv
cv deleted the feat/nemohermes-alias branch June 28, 2026 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli Command line interface, flags, terminal UX, or output feature PR adds or expands user-visible functionality integration: hermes Hermes integration behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants