Skip to content

Cursor/offline docs key keeper#4568

Open
crab182 wants to merge 2 commits into
NVIDIA:mainfrom
crab182:cursor/offline-docs-key-keeper
Open

Cursor/offline docs key keeper#4568
crab182 wants to merge 2 commits into
NVIDIA:mainfrom
crab182:cursor/offline-docs-key-keeper

Conversation

@crab182
Copy link
Copy Markdown

@crab182 crab182 commented May 30, 2026

Summary

Related Issue

Changes

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Verification

  • npx prek run --all-files passes
  • npm test passes
  • Tests added or updated for new or changed behavior
  • No secrets, API keys, or credentials committed
  • Docs updated for user-facing behavior changes
  • npm run docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Signed-off-by: Your Name your-email@example.com

Summary by CodeRabbit

  • New Features

    • Added nemoclaw keys command to manage stored API credentials with list, set, remove, and path subcommands.
  • Documentation

    • Added offline setup and secure key management guide covering dependency installation and credential storage.
    • Added terminal frontend architecture planning document.
    • Updated navigation with new documentation links.
  • Tests

    • Added integration tests for key management functionality.
    • Added CLI health check test.

Review Change Stack

crab182 and others added 2 commits May 30, 2026 13:18
Add credential store override support for safe isolated testing, introduce key management CLI commands, and document offline setup plus terminal frontend planning for NemoClaw operators.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented May 30, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 30, 2026

📝 Walkthrough

Walkthrough

This PR introduces NemoClaw's credential key management system, enabling users to securely store and manage API keys via CLI. Core changes add environment-configurable credential storage with delete/list operations, a nemoclaw keys command with path/list/set/remove subcommands, full integration test coverage, and offline setup documentation.

Changes

Credential Key Management System

Layer / File(s) Summary
Credential Storage Infrastructure
bin/lib/credentials.js
Environment variable constants (CREDS_DIR_ENV, CREDS_FILE_ENV) enable configurable credential storage location. Refactored getCredsDir() supports caching and prioritized overrides: file-path-derived directory, then directory override, then default ~/.nemoclaw. New deleteCredential() and listCredentialKeys() functions manage stored keys.
Keys CLI Command Handler
bin/nemoclaw.js
New nemoclaw keys top-level command with subcommands: path (prints credential store location), list (displays stored key names with masked values), set (validates format, accepts --value flag or interactive prompt for secret), remove/rm/delete (removes keys). Imports expanded to include credential helpers and interactive prompt function.
CLI Integration Tests
test/keys-cli.test.js, test/cli.test.js
New keys-cli.test.js file integration-tests the full keys set → list → remove lifecycle with temporary credential files; verifies empty-state behavior. Additional status command test assertion in cli.test.js.
Offline Setup and TUI Plan Documentation
docs/get-started/offline-setup.md, docs/reference/terminal-frontend-plan.md, docs/index.md
Added comprehensive offline setup guide with repo updates, offline npm install, Sphinx doc building, and API key management workflow. Created terminal frontend architecture plan. Updated navigation index to include both new docs.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • NVIDIA/NemoClaw#1800: Extends existing credentials.js module tests to cover the new deleteCredential and listCredentialKeys exports added in this PR.

Suggested labels

NemoClaw CLI, enhancement: testing

Suggested reviewers

  • ericksoa
  • miyoungc

Poem

🐰 A CLI to keep keys secure and neat,
With list, set, remove—oh, what a treat!
Environment overrides dance in the code,
Tests prove each path down the credential road,
No more secrets scattered—just organized glee! 🔐

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 7.69% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Cursor/offline docs key keeper' is vague and uses non-descriptive terms that don't clearly convey the main change. Revise the title to be more specific and descriptive—e.g., 'Add key management CLI commands and offline setup documentation' or 'Implement credentials manager with nemoclaw keys CLI'.
✅ Passed checks (3 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

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

⚠️ Outside diff range comments (2)
docs/get-started/offline-setup.md (1)

1-99: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add required docs frontmatter and a bottom “Next Steps” section.

This new page is missing required frontmatter metadata and does not include a “Next Steps” section with related links.

As per coding guidelines, new docs/** pages must include frontmatter fields and “A ‘Next Steps’ section at the bottom links to related pages.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/get-started/offline-setup.md` around lines 1 - 99, The new "Offline
Setup and Secure Keys" page is missing required Sphinx/markdown frontmatter and
a bottom "Next Steps" section; add standard frontmatter (e.g., title,
description, sidebar or toc metadata used by the docs framework) at the top of
the "Offline Setup and Secure Keys" document and append a "Next Steps" section
at the bottom that links to related pages (for example: Get Started, Onboarding,
Keys CLI, and Troubleshooting) so the page conforms to the docs/** guidelines
and provides navigational links for readers.
docs/reference/terminal-frontend-plan.md (1)

1-58: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add required frontmatter and a “Next Steps” section.

This new reference page is missing required frontmatter metadata and does not end with a “Next Steps” section linking related docs.

As per coding guidelines, new docs/** pages must include frontmatter fields and a bottom “Next Steps” section.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/reference/terminal-frontend-plan.md` around lines 1 - 58, Add the
required frontmatter block at the top of
docs/reference/terminal-frontend-plan.md (e.g., title: "Terminal Frontend Plan",
description, slug or permalink, tags/category, and sidebar positioning) so the
page is recognized by the docs site, and append a "Next Steps" section at the
bottom linking related docs (for example links to bin/nemoclaw.js,
bin/lib/tui.js, and any design or operator UX pages) and to the `nemoclaw ui`
command; ensure the frontmatter sits before the "# Terminal Frontend Plan"
heading and the Next Steps section follows the "Validation checklist" so the doc
passes guidelines.
🧹 Nitpick comments (2)
docs/get-started/offline-setup.md (1)

10-10: ⚡ Quick win

Remove numbering from section titles.

Headings like ## 1) ... and ## 5) ... violate the docs title rule.

As per coding guidelines, “Do not number section titles.”

Also applies to: 16-16, 28-28, 39-39, 86-86

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/get-started/offline-setup.md` at line 10, Remove the leading numbered
prefixes from section headings in docs/get-started/offline-setup.md (e.g.,
change "## 1) Update the repository", "## 5) ...", and the other headings
referenced) so they comply with the docs rule "Do not number section titles";
locate the headings by their exact text (the strings starting with "## "
followed by a digit and ")") and edit them to keep the descriptive title only
(e.g., "## Update the repository") ensuring spacing and heading level remain
unchanged.
docs/reference/terminal-frontend-plan.md (1)

18-29: ⚡ Quick win

Simplify flow/panel bullets by removing bold-label + colon formatting.

This pattern triggers two style violations: unnecessary bold on routine instructions and colons used as clause punctuation. LLM pattern detected.

As per coding guidelines, “Unnecessary bold on routine instructions … should be flagged” and “Colons should only introduce a list.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/reference/terminal-frontend-plan.md` around lines 18 - 29, The bullets
use bold-label + colon patterns (e.g., "Launch flow:", "Home panel:", "Keys
panel:") which must be simplified; edit each bullet in the diff to remove bold
markup and the trailing colon so they read as plain phrases or short noun
phrases (e.g., "Launch flow — create/select sandbox, start services, attach
logs, open chat entrypoint" or "Home panel — default sandbox summary and quick
actions"), keeping the same content and comma-separated actions, and apply this
change for "Launch flow", "Status flow", "Credential flow", "Recovery flow",
"Home panel", "Sandboxes panel", "Services panel", "Keys panel", and "Logs
panel".
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/get-started/offline-setup.md`:
- Around line 12-14: Replace the CLI code fences that currently use the "bash"
language tag with "console" and add a leading "$ " prompt to each command so
examples follow the project's guideline; update the block containing "git pull
--rebase --autostash" and the other CLI blocks referenced (lines 20-26, 32-35,
47-49, 53-56, 60-62, 66-68, 90-92, 96-98) to use console fenced blocks and
prefix each command with "$ " (e.g., "$ git pull --rebase --autostash") to
ensure consistent CLI formatting across offline-setup.md.

---

Outside diff comments:
In `@docs/get-started/offline-setup.md`:
- Around line 1-99: The new "Offline Setup and Secure Keys" page is missing
required Sphinx/markdown frontmatter and a bottom "Next Steps" section; add
standard frontmatter (e.g., title, description, sidebar or toc metadata used by
the docs framework) at the top of the "Offline Setup and Secure Keys" document
and append a "Next Steps" section at the bottom that links to related pages (for
example: Get Started, Onboarding, Keys CLI, and Troubleshooting) so the page
conforms to the docs/** guidelines and provides navigational links for readers.

In `@docs/reference/terminal-frontend-plan.md`:
- Around line 1-58: Add the required frontmatter block at the top of
docs/reference/terminal-frontend-plan.md (e.g., title: "Terminal Frontend Plan",
description, slug or permalink, tags/category, and sidebar positioning) so the
page is recognized by the docs site, and append a "Next Steps" section at the
bottom linking related docs (for example links to bin/nemoclaw.js,
bin/lib/tui.js, and any design or operator UX pages) and to the `nemoclaw ui`
command; ensure the frontmatter sits before the "# Terminal Frontend Plan"
heading and the Next Steps section follows the "Validation checklist" so the doc
passes guidelines.

---

Nitpick comments:
In `@docs/get-started/offline-setup.md`:
- Line 10: Remove the leading numbered prefixes from section headings in
docs/get-started/offline-setup.md (e.g., change "## 1) Update the repository",
"## 5) ...", and the other headings referenced) so they comply with the docs
rule "Do not number section titles"; locate the headings by their exact text
(the strings starting with "## " followed by a digit and ")") and edit them to
keep the descriptive title only (e.g., "## Update the repository") ensuring
spacing and heading level remain unchanged.

In `@docs/reference/terminal-frontend-plan.md`:
- Around line 18-29: The bullets use bold-label + colon patterns (e.g., "Launch
flow:", "Home panel:", "Keys panel:") which must be simplified; edit each bullet
in the diff to remove bold markup and the trailing colon so they read as plain
phrases or short noun phrases (e.g., "Launch flow — create/select sandbox, start
services, attach logs, open chat entrypoint" or "Home panel — default sandbox
summary and quick actions"), keeping the same content and comma-separated
actions, and apply this change for "Launch flow", "Status flow", "Credential
flow", "Recovery flow", "Home panel", "Sandboxes panel", "Services panel", "Keys
panel", and "Logs panel".
🪄 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: cac8925a-1a96-4a50-982a-b87ec3b5b8a5

📥 Commits

Reviewing files that changed from the base of the PR and between e79461c and e1d213d.

📒 Files selected for processing (7)
  • bin/lib/credentials.js
  • bin/nemoclaw.js
  • docs/get-started/offline-setup.md
  • docs/index.md
  • docs/reference/terminal-frontend-plan.md
  • test/cli.test.js
  • test/keys-cli.test.js

Comment on lines +12 to +14
```bash
git pull --rebase --autostash
```
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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Use console code fences with $ prompts for CLI examples.

All CLI blocks currently use bash without prompt prefixes.

As per coding guidelines, “CLI code blocks must use the console language tag with $ prompt prefix.”

Also applies to: 20-26, 32-35, 47-49, 53-56, 60-62, 66-68, 90-92, 96-98

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/get-started/offline-setup.md` around lines 12 - 14, Replace the CLI code
fences that currently use the "bash" language tag with "console" and add a
leading "$ " prompt to each command so examples follow the project's guideline;
update the block containing "git pull --rebase --autostash" and the other CLI
blocks referenced (lines 20-26, 32-35, 47-49, 53-56, 60-62, 66-68, 90-92, 96-98)
to use console fenced blocks and prefix each command with "$ " (e.g., "$ git
pull --rebase --autostash") to ensure consistent CLI formatting across
offline-setup.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant