Repository navigation
feat(cli): add nemohermes alias for Hermes agent - #2462
Conversation
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.
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds a new Changes
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
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
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.tsandsrc/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
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (7)
.agents/skills/nemoclaw-user-reference/references/commands.mdbin/nemohermes.jsdocs/reference/commands.mdpackage.jsonsrc/lib/onboard-command.tssrc/nemoclaw.tstest/nemohermes-alias.test.ts
- Join wrapped sentence onto one source line in docs (one-sentence-per-line rule) - Remove silent catch in nemoclaw --version test so failures surface
There was a problem hiding this comment.
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
📒 Files selected for processing (2)
docs/reference/commands.mdtest/nemohermes-alias.test.ts
✅ Files skipped from review due to trivial changes (1)
- docs/reference/commands.md
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.
There was a problem hiding this comment.
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 | 🟡 MinorInconsistency: 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 | 🟡 MinorInconsistency: Hardcoded "nemoclaw" in user-facing message.
These lines still use hardcoded
nemoclawinstead 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 | 🟡 MinorInconsistency: 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 | 🟡 MinorInconsistency: 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
importfor type imports (line 4) butrequire()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
📒 Files selected for processing (11)
bin/nemoclaw.jssrc/lib/branding.tssrc/lib/build-context.tssrc/lib/command-registry.tssrc/lib/inventory-commands.tssrc/lib/onboard-command.tssrc/lib/onboard.tssrc/lib/sandbox-config.tssrc/lib/services.tssrc/nemoclaw.tstest/nemohermes-alias.test.ts
✅ Files skipped from review due to trivial changes (2)
- bin/nemoclaw.js
- src/lib/sandbox-config.ts
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.
There was a problem hiding this comment.
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 | 🟠 MajorSuccessful 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 successfulnemohermes onboardrun 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_nemoclawstill validates onlynemoclaw, not the active$_CLI_BIN.With Hermes selected, the installer can mark readiness based on
nemoclawwhile later instructions tell users to runnemohermes. 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 | 🟡 MinorOld-OpenShell guidance still hardcodes the base CLI name.
This path will tell
nemohermesusers to runnemoclaw 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
📒 Files selected for processing (12)
.agents/skills/nemoclaw-user-reference/references/commands.mdscripts/install.shsrc/lib/branding.tssrc/lib/build-context.tssrc/lib/command-registry.tssrc/lib/inventory-commands.tssrc/lib/onboard-command.tssrc/lib/onboard.tssrc/lib/sandbox-config.tssrc/lib/services.tssrc/nemoclaw.tstest/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
…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
There was a problem hiding this comment.
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 hardcodednemoclawreferences.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_BINfor 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 | 🟠 MajorResolve branding after agent selection, not at module load.
CLI_NAME/CLI_DISPLAY_NAME/AGENT_PRODUCT_NAMEare 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_PRODUCTdefined but never referenced.The variable
_AGENT_PRODUCTis 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_PRODUCTfor 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
📒 Files selected for processing (5)
scripts/install.shsrc/lib/build-context.tssrc/lib/onboard.tssrc/nemoclaw.tstest/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
There was a problem hiding this comment.
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 | 🟡 MinorOne fallback instruction still hardcodes
nemoclaw.The token-recovery hint still prints
nemoclawdirectly, 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
📒 Files selected for processing (1)
src/lib/onboard.ts
# Conflicts: # src/lib/sandbox-config.ts
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
src/nemoclaw.ts (1)
780-790:⚠️ Potential issue | 🟡 MinorOne gateway recovery branch still hardcodes
NemoClaw.The connection-refused path in
printGatewayLifecycleHint()still printsNemoClawliterally, sonemohermesfalls back to the old brand on that error path. This should useCLI_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
📒 Files selected for processing (2)
src/lib/sandbox-config.tssrc/nemoclaw.ts
✅ Files skipped from review due to trivial changes (1)
- src/lib/sandbox-config.ts
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
Selective E2E Results — ❌ Some jobs failedRun: 25149631166
|
Selective E2E Results — ✅ All requested jobs passedRun: 25149631166
|
Selective E2E Results — ✅ All requested jobs passedRun: 25168280928
|
Selective E2E Results — ❌ Some jobs failedRun: 25170927871
|
Selective E2E Results — ✅ All requested jobs passedRun: 25170927871
|
Summary
nemohermesCLI binary that wrapsnemoclawwithNEMOCLAW_AGENT=hermespre-set viabin/nemohermes.jsnemohermesbranding when launched through the aliasonboard-command.tsusage lines to reflect the alias namedocs/reference/commands.mdand regenerated agent skillsTest plan
npx tsc -p tsconfig.src.jsonbuilds cleannpx tsc -p tsconfig.cli.jsontype-checks cleantest/nemohermes-alias.test.ts(executable exists, version branding, help header, env var, nemoclaw unchanged)onboard-command.test.tstests passssrf-paritymissing plugin build,migration-statemissingjson5)npm link && nemohermes --versionprintsnemohermes vX.Y.Z (nemoclaw)nemohermes onboardbehaves likenemoclaw onboard --agent hermesSummary by CodeRabbit
New Features
Documentation
Tests