Skip to content

docs(cli): document guided plugin setup#359

Open
ericevans-nv wants to merge 3 commits into
NVIDIA:release/0.5from
ericevans-nv:docs/guided-plugin-setup
Open

docs(cli): document guided plugin setup#359
ericevans-nv wants to merge 3 commits into
NVIDIA:release/0.5from
ericevans-nv:docs/guided-plugin-setup

Conversation

@ericevans-nv

@ericevans-nv ericevans-nv commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Overview

Documents the guided interactive setup introduced in #358. The CLI guide now presents nemo-relay config as an end-to-end workflow, from choosing a configuration scope through optional plugin setup.

This replaces manual path and TOML examples in the Shared Configuration section with task-focused guidance so first-time users can understand what the wizard saves and what happens at each choice.

  • I confirm this contribution is my own work, or I have the right to submit it under this project's license.
  • I searched existing issues and open pull requests, and this does not duplicate existing work.

What changed

The guide now walks users through:

  1. Choosing whether setup applies to the current project, the user account, or both.
  2. Selecting the coding agents that Relay should observe.
  3. Reviewing and saving the base config.toml.
  4. Choosing whether to continue to the plugin editor.

It also explains that:

  • config.toml stores the base agent settings.
  • plugins.toml stores optional Relay component settings.
  • Project and global setup use their corresponding plugin configuration, while both continues with the project plugin configuration.
  • Selecting Yes opens the plugin editor.
  • Selecting No, canceling the prompt, or leaving the plugin editor does not remove the saved base configuration.
  • Plugin setup can be resumed with nemo-relay plugins edit or nemo-relay plugins edit --project.

User flow

nemo-relay config
  -> choose project, global, or both
  -> select coding agents
  -> review and save config.toml
  -> Configure Relay plugins now?
       -> Yes: open the plugin editor and save plugins.toml
       -> No or cancel: finish with config.toml still saved

Validation

  • just docs — passed with zero errors
  • Repository pre-commit hooks — passed
  • No runtime behavior or public API changes

Where should the reviewer start?

Review the Interactive Setup subsection in docs/nemo-relay-cli/basic-usage.mdx, immediately before Add Model Pricing for Cost Estimates.

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Documentation update replacing the "Shared Configuration" section with an "Interactive Setup" walkthrough in the NeMo Relay CLI docs, describing the nemo-relay config wizard flow, plugin editor step, and commands to reopen plugin editing.

Changes

Documentation update

Layer / File(s) Summary
Interactive Setup section rewrite
docs/nemo-relay-cli/basic-usage.mdx
Replaces config file location listing and example TOML snippets with a step-by-step description of the nemo-relay config interactive flow, base config saving, optional plugin editor, and revisit commands (nemo-relay plugins edit, nemo-relay plugins edit --project).

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

  • NVIDIA/NeMo-Relay#358: Implements the CLI wizard flow (prompting to continue into the plugin editor after saving config.toml) that this documentation update describes.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Title check ✅ Passed The title follows Conventional Commits and accurately summarizes the docs change with valid type and scope.
Description check ✅ Passed The description covers the required overview, change details, reviewer start, and related issues, with validation notes included.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@github-actions github-actions Bot added size:XS PR is extra small Documentation documentation-related labels Jul 2, 2026
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

@willkill07 willkill07 added this to the 0.5 milestone Jul 2, 2026
rapids-bot Bot pushed a commit that referenced this pull request Jul 3, 2026
#### Overview

The interactive `nemo-relay config` wizard currently ends after writing the base `config.toml`, leaving a first-time user to discover and run `nemo-relay plugins edit` as a separate step.

This change connects those existing flows. After the base configuration is saved, Relay asks whether the user wants to configure plugins now. Accepting the prompt opens the existing plugin editor in-process; declining keeps the completed base configuration and prints the exact command for resuming later.

- [x] I confirm this contribution is my own work, or I have the right to submit it under this project's license.
- [x] I searched existing issues and open pull requests, and this does not duplicate existing work.

#### Details

##### Guided setup flow

The interactive path now proceeds as follows:

1. Run `nemo-relay config`.
2. Choose where to save the base configuration: project, global, or both.
3. Choose which coding agents Relay should observe.
4. Review the generated `config.toml` and confirm `Looks good?`.
5. Relay writes the base configuration and prints the saved path or paths.
6. Relay asks `Configure Relay plugins now? [Y/n]`.
   - **Yes** (the default) opens the existing plugin editor.
   - **No** exits successfully, leaves the base configuration saved, and prints the correct resume command.

The new prompt controls only whether the plugin editor opens. It does not control the already-completed base configuration save, and selecting Yes does not save plugin changes automatically.

##### Plugin editor walkthrough

When the user selects Yes, the existing `plugins edit` menu opens:

- **Observability** — enabled by default; opens its available output and tracing sections.
- **Adaptive** — enables or configures adaptive runtime behavior.
- **NeMo Guardrails** — enables or configures guardrail behavior.
- **PII Redaction** — enables or configures request/response redaction.
- **Preview TOML** (`p`) — shows the resulting `plugins.toml` before writing it.
- **Save** (`s`) — writes `plugins.toml` and completes the guided flow.
- **Cancel** (`q`) — exits without saving plugin changes; the base `config.toml` remains saved.

The existing navigation remains unchanged: arrow keys or `j`/`k` move through the menu, Enter/Space selects, and the existing reset/clear/help shortcuts continue to work.

##### Scope mapping and resume behavior

| Base setup scope | Plugin editor target | Resume command |
| --- | --- | --- |
| Project | Project `plugins.toml` | `nemo-relay plugins edit --project` |
| Global | User `plugins.toml` | `nemo-relay plugins edit` |
| Both | Project `plugins.toml` because project configuration takes precedence | `nemo-relay plugins edit --project` |

##### Cancellation and partial setup

The base configuration is never rolled back after it has been saved:

- Declining the new prompt is treated as an intentional skip and exits successfully.
- Ctrl-C/EOF at the new prompt reports that plugin setup was cancelled, confirms the base configuration remains saved, and prints the resume command.
- Cancelling inside the plugin editor reports that no plugin changes were saved.
- Other plugin-editor failures retain their cause while explaining that the base configuration remains saved and how to resume.

##### Compatibility and implementation

- Reuses the existing `plugins::edit` implementation rather than adding a second editor or duplicating plugin logic.
- Leaves direct `nemo-relay plugins edit` usage and menu behavior unchanged, aside from clearer cancellation wording.
- Preserves explicit configuration and non-interactive workflows.
- Leaves `nemo-relay config --reset` unchanged.
- Adds no new configuration files, CLI flags, or persisted settings.
- Adds focused tests for project/global/both scope mapping, resume commands, and post-save prompt errors.
- User-facing documentation is intentionally separated into follow-up PR #359.

Validation completed:

- `cargo fmt --all --check`
- `cargo clippy -p nemo-relay-cli --all-targets -- -D warnings`
- `cargo test -p nemo-relay-cli` — 704 tests passed
- Repository pre-commit hooks — passed

No breaking changes.

#### Where should the reviewer start?

Start with `continue_to_plugins` in `crates/cli/src/setup.rs`. It contains the new post-save handoff and partial-setup error handling. Then review:

1. `crates/cli/src/setup/model.rs` for setup-scope to plugin-scope mapping.
2. `crates/cli/tests/coverage/setup_tests.rs` for mapping and error-message coverage.
3. `crates/cli/src/plugins.rs` for the cancellation wording clarification.

#### Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

- Relates to RELAY-315



## Summary by CodeRabbit

* **New Features**
  * Plugin configuration setup now prompts immediately after saving `config.toml`, with an option to continue now or resume later using a clear follow-up command.

* **Bug Fixes**
  * Standardized plugin edit cancellation messaging for interruption and end-of-file cases, consistently stating no plugin changes were saved.

* **Tests**
  * Added unit tests validating plugin command/resume command generation by scope and verifying cancellation/interruption detection behavior.

Authors:
  - Eric Evans II (https://github.com/ericevans-nv)

Approvers:
  - Will Killian (https://github.com/willkill07)

URL: #358
@willkill07 willkill07 changed the base branch from main to release/0.5 July 3, 2026 03:50
Signed-off-by: Eric Evans <194135482+ericevans-nv@users.noreply.github.com>
Signed-off-by: Eric Evans <194135482+ericevans-nv@users.noreply.github.com>
@ericevans-nv ericevans-nv force-pushed the docs/guided-plugin-setup branch from 70399ec to 0f9588f Compare July 6, 2026 17:23
@github-actions github-actions Bot added size:S PR is small and removed size:XS PR is extra small labels Jul 6, 2026
@ericevans-nv ericevans-nv added Under Review PR is under review and should not be marked as Stale and removed Under Review PR is under review and should not be marked as Stale labels Jul 6, 2026
Signed-off-by: Eric Evans <194135482+ericevans-nv@users.noreply.github.com>
@ericevans-nv ericevans-nv marked this pull request as ready for review July 6, 2026 17:54
@ericevans-nv ericevans-nv requested a review from lvojtku as a code owner July 6, 2026 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation documentation-related size:S PR is small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants