-
Notifications
You must be signed in to change notification settings - Fork 16
docs: add coding-agent CLI guidance #97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -12,14 +12,15 @@ SPDX-License-Identifier: Apache-2.0 | |||||
| [](https://www.npmjs.com/package/nemo-flow-wasm) | ||||||
| [](https://crates.io/crates/nemo-flow) | ||||||
| [](https://crates.io/crates/nemo-flow-adaptive) | ||||||
| [](https://crates.io/crates/nemo-flow-cli) | ||||||
| [](https://deepwiki.com/NVIDIA/NeMo-Flow) | ||||||
|
|
||||||
| # nemo-flow-cli | ||||||
|
|
||||||
| `nemo-flow-cli` is the coding-agent gateway CLI for NeMo Flow observability. | ||||||
| It installs the `nemo-flow` binary, which can configure supported coding-agent | ||||||
| hooks, run agents through an ephemeral gateway, and diagnose local agent and | ||||||
| exporter readiness. | ||||||
| `nemo-flow-cli` is the experimental coding-agent gateway CLI for NeMo Flow | ||||||
| observability. It installs the `nemo-flow` binary, which can configure | ||||||
| supported coding-agent hooks, run agents through an ephemeral gateway, and | ||||||
| diagnose local agent and exporter readiness. | ||||||
|
|
||||||
| The CLI is a Rust package in this repository, but most users should interact | ||||||
| with the installed `nemo-flow` command rather than link against the crate. | ||||||
|
|
@@ -50,10 +51,10 @@ with the installed `nemo-flow` command rather than link against the crate. | |||||
|
|
||||||
| ## Installation | ||||||
|
|
||||||
| Install the CLI from a repository checkout: | ||||||
| Install the CLI: | ||||||
|
|
||||||
| ```bash | ||||||
| cargo install --path crates/cli | ||||||
| cargo install nemo-flow-cli | ||||||
| ``` | ||||||
|
|
||||||
| That command installs the binary as: | ||||||
|
|
@@ -96,12 +97,47 @@ Use `run --dry-run` to inspect resolved config without spawning the agent: | |||||
| nemo-flow run --agent codex --dry-run | ||||||
| ``` | ||||||
|
|
||||||
| ## Benchmark And Eval Runs | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use lowercase for conjunctions in title case headings. The heading uses "Benchmark And Eval Runs" but standard title case rules require conjunctions like "and" to be lowercase unless they are the first or last word. As per coding guidelines, use title case consistently in technical documentation headings. Proposed fix-## Benchmark And Eval Runs
+## Benchmark and Eval Runs📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
|
|
||||||
| Use `nemo-flow run` for non-interactive benchmark tasks so each run gets an | ||||||
| ephemeral gateway and isolated observability artifacts. Prefer absolute | ||||||
| artifact directories when the benchmark harness runs from a different directory | ||||||
| than the task repository. | ||||||
|
|
||||||
| This example uses Codex CLI because it has a non-interactive `exec` mode. Use | ||||||
| the equivalent non-interactive command for another coding agent when one is | ||||||
| available. | ||||||
|
|
||||||
| ```bash | ||||||
| RUN_ID="$(date +%Y%m%d_%H%M%S)" | ||||||
| ART="/tmp/nemo-flow-eval/$RUN_ID" | ||||||
| mkdir -p "$ART/atif" "$ART/atof" | ||||||
|
|
||||||
| nemo-flow run \ | ||||||
| --atif-dir "$ART/atif" \ | ||||||
| --atof-dir "$ART/atof" \ | ||||||
| -- codex \ | ||||||
| --ask-for-approval never \ | ||||||
| exec \ | ||||||
| --cd /path/to/benchmark/repo \ | ||||||
| --sandbox workspace-write \ | ||||||
| --color never \ | ||||||
| "Run the benchmark task and report the result." | ||||||
|
|
||||||
| find "$ART" -maxdepth 3 -type f -print | ||||||
| ``` | ||||||
|
|
||||||
| The expected output includes one ATIF JSON file and one ATOF JSONL file for | ||||||
| the run. Remote or cloud-hosted tasks are outside the local gateway's LLM | ||||||
| capture boundary unless their model traffic reaches the local gateway. | ||||||
|
|
||||||
| ## Configuration | ||||||
|
|
||||||
| Project config lives at `./.nemo-flow/config.toml`; user config lives at | ||||||
| `~/.config/nemo-flow/config.toml` or `$XDG_CONFIG_HOME/nemo-flow/config.toml`. | ||||||
| The project layer overrides system config, and the user layer overrides the | ||||||
| project layer. | ||||||
| System config lives at `/etc/nemo-flow/config.toml`, project config lives at | ||||||
| the nearest `./.nemo-flow/config.toml`, and user config lives at | ||||||
| `$XDG_CONFIG_HOME/nemo-flow/config.toml` or `~/.config/nemo-flow/config.toml`. | ||||||
| The CLI loads those layers in that order, then applies `NEMO_FLOW_*` | ||||||
| environment variables and command flags. | ||||||
|
|
||||||
| Exporter config uses nested per-backend tables: | ||||||
|
|
||||||
|
|
@@ -118,6 +154,9 @@ filename_template = "{session_id}.jsonl" | |||||
| endpoint = "http://localhost:6006/v1/traces" | ||||||
| ``` | ||||||
|
|
||||||
| Use `plugin.toml` in the same system, project, or user config locations when | ||||||
| the gateway should activate process-level plugin config. | ||||||
|
|
||||||
| ## Documentation | ||||||
|
|
||||||
| NeMo Flow Documentation: https://nvidia.github.io/NeMo-Flow | ||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,159 @@ | ||||||||||||||||
| <!-- | ||||||||||||||||
| SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||||||||||||||||
| SPDX-License-Identifier: Apache-2.0 | ||||||||||||||||
| --> | ||||||||||||||||
|
|
||||||||||||||||
| # CLI Gateway Quick Start | ||||||||||||||||
|
|
||||||||||||||||
| The `nemo-flow` CLI gateway is experimental. Use it when you want to try local | ||||||||||||||||
| observability for coding agents without changing the agent implementation. The | ||||||||||||||||
| CLI can configure supported agent hooks, start a short-lived gateway around one | ||||||||||||||||
| agent run, run a long-running gateway, and diagnose local setup. | ||||||||||||||||
|
|
||||||||||||||||
| ## Install The CLI | ||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Normalize heading title case for articles. Headings capitalize As per coding guidelines, "Use title case consistently in technical documentation headings." Also applies to: 23-23, 48-48 🤖 Prompt for AI Agents |
||||||||||||||||
|
|
||||||||||||||||
| Install the CLI: | ||||||||||||||||
|
|
||||||||||||||||
| ```bash | ||||||||||||||||
| cargo install nemo-flow-cli | ||||||||||||||||
| ``` | ||||||||||||||||
|
|
||||||||||||||||
| That command installs the executable as `nemo-flow`. | ||||||||||||||||
|
|
||||||||||||||||
| ## Use The Wizard | ||||||||||||||||
|
|
||||||||||||||||
| Run the first-time setup wizard: | ||||||||||||||||
|
|
||||||||||||||||
| ```bash | ||||||||||||||||
| nemo-flow | ||||||||||||||||
| ``` | ||||||||||||||||
|
|
||||||||||||||||
| Bare `nemo-flow` launches setup when no config exists. After config exists, the | ||||||||||||||||
| same command runs `nemo-flow doctor` as a quick health check. | ||||||||||||||||
|
|
||||||||||||||||
| The wizard detects supported agent binaries on `PATH`, asks which agents to | ||||||||||||||||
| observe, asks where to save config, and enables local ATIF export by default. | ||||||||||||||||
| Re-run setup later with: | ||||||||||||||||
|
|
||||||||||||||||
| ```bash | ||||||||||||||||
| nemo-flow config | ||||||||||||||||
| nemo-flow config codex | ||||||||||||||||
| nemo-flow config hermes | ||||||||||||||||
| ``` | ||||||||||||||||
|
|
||||||||||||||||
| Use the scoped form when you only want to refresh one agent's settings. Use | ||||||||||||||||
| `nemo-flow config --reset` to remove the project config, or | ||||||||||||||||
| `nemo-flow config <agent> --reset` to remove one project-local agent block. | ||||||||||||||||
|
|
||||||||||||||||
| ## Run An Observed Agent | ||||||||||||||||
|
|
||||||||||||||||
| Use the agent shortcuts for day-to-day runs: | ||||||||||||||||
|
|
||||||||||||||||
| ```bash | ||||||||||||||||
| nemo-flow codex | ||||||||||||||||
| nemo-flow claude -- "summarize this repository" | ||||||||||||||||
| nemo-flow cursor | ||||||||||||||||
| nemo-flow hermes | ||||||||||||||||
| ``` | ||||||||||||||||
|
|
||||||||||||||||
| The shortcut starts an ephemeral gateway on `127.0.0.1`, injects the agent's | ||||||||||||||||
| hook and provider routing settings for that process, and stops the gateway when | ||||||||||||||||
| the agent exits. | ||||||||||||||||
|
|
||||||||||||||||
| Inspect readiness and detected agents with: | ||||||||||||||||
|
|
||||||||||||||||
| ```bash | ||||||||||||||||
| nemo-flow doctor | ||||||||||||||||
| nemo-flow doctor codex | ||||||||||||||||
| nemo-flow agents | ||||||||||||||||
| ``` | ||||||||||||||||
|
|
||||||||||||||||
| ## Config Layers | ||||||||||||||||
|
|
||||||||||||||||
| When no explicit `--config` path is passed, the CLI loads config from lowest to | ||||||||||||||||
| highest precedence: | ||||||||||||||||
|
|
||||||||||||||||
| 1. System: `/etc/nemo-flow/config.toml` | ||||||||||||||||
| 2. Project: nearest `.nemo-flow/config.toml`, walking up from the current | ||||||||||||||||
| directory | ||||||||||||||||
| 3. User: `$XDG_CONFIG_HOME/nemo-flow/config.toml`, or | ||||||||||||||||
| `~/.config/nemo-flow/config.toml` | ||||||||||||||||
| 4. Environment variables such as `NEMO_FLOW_ATIF_DIR` and | ||||||||||||||||
| `NEMO_FLOW_OPENAI_BASE_URL` | ||||||||||||||||
| 5. CLI flags on the current command | ||||||||||||||||
|
|
||||||||||||||||
| Passing `--config path/to/config.toml` disables automatic system, project, and | ||||||||||||||||
| user discovery for that command. | ||||||||||||||||
|
|
||||||||||||||||
| Use this minimal project config as a starting point: | ||||||||||||||||
|
|
||||||||||||||||
| ```toml | ||||||||||||||||
| [exporters.atif] | ||||||||||||||||
| dir = ".nemo-flow/atif" | ||||||||||||||||
|
|
||||||||||||||||
| [exporters.atof] | ||||||||||||||||
| dir = ".nemo-flow/atof" | ||||||||||||||||
| mode = "append" | ||||||||||||||||
| filename_template = "{session_id}.jsonl" | ||||||||||||||||
|
|
||||||||||||||||
| [agents.codex] | ||||||||||||||||
| command = "codex" | ||||||||||||||||
|
|
||||||||||||||||
| [agents.claude] | ||||||||||||||||
| command = "claude" | ||||||||||||||||
|
|
||||||||||||||||
| [agents.cursor] | ||||||||||||||||
| command = "cursor-agent" | ||||||||||||||||
| patch_restore_hooks = true | ||||||||||||||||
|
|
||||||||||||||||
| [agents.hermes] | ||||||||||||||||
| command = "hermes" | ||||||||||||||||
| ``` | ||||||||||||||||
|
|
||||||||||||||||
| Add provider and OpenInference settings only when you need to override defaults: | ||||||||||||||||
|
|
||||||||||||||||
| ```toml | ||||||||||||||||
| [upstream] | ||||||||||||||||
| openai_base_url = "https://api.openai.com" | ||||||||||||||||
| anthropic_base_url = "https://api.anthropic.com" | ||||||||||||||||
|
|
||||||||||||||||
| [exporters.openinference] | ||||||||||||||||
| endpoint = "http://localhost:6006/v1/traces" | ||||||||||||||||
| ``` | ||||||||||||||||
|
|
||||||||||||||||
| Plugin config can live in one of three places: `--plugin-config` JSON, | ||||||||||||||||
| `[plugins].config` inside `config.toml`, or a sibling/discovered `plugin.toml`. | ||||||||||||||||
| Do not mix these sources in one effective CLI invocation. | ||||||||||||||||
|
|
||||||||||||||||
| ## Advanced Commands | ||||||||||||||||
|
|
||||||||||||||||
| Use `run` when you need deterministic, non-interactive behavior: | ||||||||||||||||
|
|
||||||||||||||||
| ```bash | ||||||||||||||||
| nemo-flow run --agent codex --dry-run --print | ||||||||||||||||
| nemo-flow run --agent codex -- exec "fix the failing test" | ||||||||||||||||
| ``` | ||||||||||||||||
|
|
||||||||||||||||
| Use daemon mode when an agent or IDE is launched separately and can point its | ||||||||||||||||
| provider traffic or hooks at a long-running local gateway: | ||||||||||||||||
|
|
||||||||||||||||
| ```bash | ||||||||||||||||
| nemo-flow --bind 127.0.0.1:4040 | ||||||||||||||||
| ``` | ||||||||||||||||
|
|
||||||||||||||||
| Install shell completions when your package manager did not do that for you: | ||||||||||||||||
|
|
||||||||||||||||
| ```bash | ||||||||||||||||
| nemo-flow completions --install | ||||||||||||||||
| ``` | ||||||||||||||||
|
|
||||||||||||||||
| `nemo-flow hook-forward` is the internal hook entrypoint generated by setup and | ||||||||||||||||
| transparent runs. You normally do not call it directly except for smoke tests. | ||||||||||||||||
|
|
||||||||||||||||
| ## Next Steps | ||||||||||||||||
|
|
||||||||||||||||
| - [Advanced Guide: Coding-Agent Gateway](../integrate-frameworks/coding-agent-gateway.md) | ||||||||||||||||
|
Comment on lines
+154
to
+155
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial | ⚡ Quick win Add a lead-in sentence before the links list. The "Next Steps" section jumps directly from the heading to a list of links without a prose introduction. Suggested improvement ## Next Steps
+Refer to the following guides for detailed configuration and agent-specific setup:
+
- [Advanced Guide: Coding-Agent Gateway](../integrate-frameworks/coding-agent-gateway.md)As per coding guidelines, "All lists should have a complete lead-in sentence." 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||
| - [Claude Code Gateway Guide](../integrate-frameworks/coding-agent-claude-code.md) | ||||||||||||||||
| - [Codex Gateway Guide](../integrate-frameworks/coding-agent-codex.md) | ||||||||||||||||
| - [Cursor Gateway Guide](../integrate-frameworks/coding-agent-cursor.md) | ||||||||||||||||
| - [Hermes Gateway Guide](../integrate-frameworks/coding-agent-hermes.md) | ||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link the First Mention of CLI Gateway Documentation
Line 116 introduces the experimental CLI docs but does not link to the destination. Add a direct link at first mention to improve navigation.
As per coding guidelines, "Link the first mention of a product name when the destination helps the reader."
🤖 Prompt for AI Agents