docs(cli): document guided plugin setup#359
Draft
ericevans-nv wants to merge 1 commit into
Draft
Conversation
Signed-off-by: Eric Evans <194135482+ericevans-nv@users.noreply.github.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
2 tasks
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Document the guided transition from base Relay configuration into plugin setup.
This documentation change is intentionally separated from the implementation in #358 and should be reviewed and merged after that PR.
Details
The CLI usage guide now explains that after
nemo-relay configsaves the baseconfig.toml, the wizard offers to open plugin configuration.It also documents:
nskips plugin setup without rolling back the saved base configuration.nemo-relay plugins edit.nemo-relay plugins edit --project.Validation:
just docs— passed with zero errorsNo breaking changes.
Where should the reviewer start?
Review the new paragraph in
docs/nemo-relay-cli/basic-usage.mdximmediately before “Add Model Pricing for Cost Estimates.”Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)