Repository navigation
Description
Epic: CLI usability improvements -- first class CLI experience
Use cases, pain points, and background
Most modern CLI tools use a tool subcommand pattern (docker run, git status, kubectl apply). Gym should have a single top-level command i.e. gym with grouped subcommands would be more intuitive and easier to discover.
The goal is to replace the ng_* / nemo_gym_* entry points with a single gym CLI. Top-level commands for common operations, with subcommand groups for related clusters (e.g. gym data * for all data operations, gym benchmark * for benchmark operations). Keep the ng_* aliases around as deprecated shims during a transition period, with a deprecation warning pointing users to the new command.
Why now: The user base and the catalog are both about to grow significantly. The current CLI surface scales poorly with either. Fixing the shell once, before adoption peaks, is far cheaper than retrofitting later — and unblocks every subsequent CLI feature (discoverability, status, info, etc.) from inheriting a unified surface for free.
The scope of this project is to deliver a new, unified CLI using the current capabilities in Gym, creating a foundation for additional features and user-experience from the CLI. Expansion of this foundation will be added by #1583
Problems
- Inconsistent conventions. The current CLI has 40+ entry points across two naming conventions (
ng_*andnemo_gym_*), all using underscore-separated names, e.g.,ng_collect_rollouts, ng_init_resources_server, ng_e2e_collect_rollouts, ng_upload_dataset_to_gitlab, etc. - Benchmark-centric, need to improve UX for agent-centric. The current evaluation flow starts from "pick a benchmark" which bundles the agent, environment, and data together in a single config. Agent developers think the other way: "I have an agent, I want to evaluate it against environments." We need to improve the UX of this path.
- Config paths require familiarity with project structure. Users need to specify exact paths like
resources_servers/gpqa/configs/gpqa.yaml. This requires familiarity with the internal project structure — you need to know that model configs live inresponses_api_models/and benchmark configs inresources_servers/ or benchmarks/. Ref: #1205. - CLI terminology is training-centric, not eval-centric. "Collect rollouts" and "reward profiling" are RL training terms — an agent developer who wants to evaluate their agent thinks in terms of "run evaluation" and "get metrics/scores." The current naming assumes the user's goal is to generate training data, not to assess agent performance. Similarly,
responses_create_params,verifier_metadata, andresources_serverare abstractions that don't map to how an agent developer thinks about their workflow ("tasks," "scores," "environments"). The help text explains the current concepts well, but users searching for evaluation workflows may not discover the right commands. - 3 commands to compose agentic eval.
ng_run→ng_collect_rollouts→ng_reward_profileexposes the microservice infrastructure (start servers, collect, score) rather than abstracting it into the user's goal: "evaluate my agent on this task set." Ideally the user could specify tasks, model, agent, and environment in a single command. Ref: #1188.
Product Requirements
- CLI Ergonomics. CLI commands should be structured according to overall workflow (Data -> Environments -> Evaluate <-> Improve -> Deploy). Gym is for evaluating and improving models and agents through iterative evaluation and experimentation. The CLI structure should reflect this workflow, not internal implementation details (server types, rollout collection mechanics).
- Discoverability. Users should be able to discover what environments (Dataset + Agent Harness Resources Server) are available in Gym from the CLI, without needing to browse GitHub or read source code.
- Environments. CLI should support both building and using environments — Users need to create new environments (scaffold, develop, test) and use existing ones (discover, configure, run, evaluate, train). The CLI should make both paths clear.
- Components. CLI must account for clean composition: an environment is a dataset + agent harness + resources server + model server.
- Extensible via plugins. External NeMo tools (Data Designer, Safe Synthesizer, Anonymizer) and training frameworks (NeMo RL, VeRL, Unsloth) should be able to register commands into the CLI without modifying Gym core. This is a first-class design constraint, not a nice-to-have.
- Skills. Agent skills should be available via the CLI so that agents are able to navigate using the product well without needing to refer to Github
- Backward compatibility. Existing ng_* commands must continue to work during a deprecation period, emitting a migration notice. Users have these in scripts, CI pipelines, and muscle memory.
UX Standards
- Single entry point with --help everywhere. One gym command exposes all capabilities. Every group and subcommand supports -h/--help. No hidden commands.
- Standard flag syntax. --flag value for common inputs. Hydra +key=value is an escape hatch for advanced config overrides, not the default interface. No shell-quoting gymnastics for arrays.Hydra is powerful for config composition, but its override syntax is designed for config management, not for user-facing CLI ergonomics. Most CLI tools in the ecosystem (kubectl, docker, git, pip, etc.) follow the POSIX/GNU convention: long flags (
--input data.jsonl) and short flags (-i data.jsonl) with--helpdiscoverability. Users coming from these tools find the+key=valuesyntax unfamiliar and need to consult documentation, adding to developer friction. - Machine-readable output. Every list/inspect/status command supports --json for piping into jq, CI assertions, or dashboards.
- Helpful failure paths. Typos get "did you mean?" suggestions. Validation errors explain what's wrong and what to do. No bare asserts or raw stack traces.
Description
A user should be able to:
- Discover every Gym capability from
gym --help, drill into any subcommand withgym <cmd> --help. - Use familiar
--flag valuesyntax for common inputs, without learning Hydra override grammar to do basic things. - Get JSON output from any list/inspect/status command and pipe it.
- Recover from typos with helpful suggestions.
- Turn on debug logging with
-vfrom any subcommand.
Hydra remains the config-composition engine underneath — it just stops being the user-facing flag syntax.
Design
- Single
gymentry point with subparsers (argparse orsimple-parsing). Group existing scripts under nouns/verbs:gym run,gym test,gym ls …,gym dataset {upload,download,migrate},gym prepare {benchmark,data,prompts},gym init,gym status, etc.. - Keep every existing
ng_*/nemo_gym_*console script as a thin shim that calls into the new router, with a one-line deprecation warning. Removal happens at least one release later. - Translate the most common
+key=valueoverrides into first-class--flagson each subcommand (e.g.gym run --config a.yaml --config b.yamlinstead ofng_run "+config_paths=[a.yaml,b.yaml]"). Keep+key=valueas an escape hatch for power users. -h/--helpworks at every level.-v/--verbosesetsLOG_LEVEL=DEBUG.--json(or--output {table,json,wide}) on every command whose primary output is structured.- Error helpers: shared "did-you-mean" suggester (rapidfuzz or stdlib
difflib.get_close_matches) wired into env/benchmark/task lookups.
Out of scope
This epic focuses on establishing a unified CLI surface and improving CLI ergonomics. The following related initiatives are tracked separately:
- Environment discovery and catalog browsing. Building the registry, search, inspection, and compatibility workflows that allow users to discover available environments and components from the CLI. Tracked in: [Epic] Search & Discoverability for Environments and Components from the CLI #1582
- Composable evaluation and agent swapping. Allowing users to compose evaluations from independent agent, environment, and model components without creating new YAML configurations. Tracked in: epic: external agent integration #1396 and epic: Agent swappability — first-class --agent-type selector in the CLI #1583
- Configuration simplification and path abstraction. Reducing the need for users to understand Gym's internal directory structure or specify config paths directly. Tracked in: epic: reduce configuration friction for environment authors and users #1205
- Skill management and skill evaluation workflows. Improving how users discover, iterate on, evaluate, and compare agent skills. Tracked in: epic: nemo gym agent skills #1235
- Changes to underlying evaluation, rollout collection, scoring, or training infrastructure. This epic focuses on the user-facing CLI experience and command structure, not a refactor of the underlying execution model.
Acceptance Criteria
User outcomes
- Users can discover all top-level Gym capabilities from a single
gymentry point and nested--helpcommands. - The most common workflows accept standard
--flag valuesyntax for primary inputs. - Existing
ng_*andnemo_gym_*commands continue to function with deprecation warnings. - Users can obtain machine-readable output from supported commands.
- Users receive actionable error messages and typo suggestions.
Technical requirements
- Single
gymCLI entry point implemented with subcommands. - Standard
--flag valuesyntax supported for primary inputs while preserving Hydra overrides as an escape hatch. -
--jsonsupported on list, inspect, and status-style commands. -
-v/--verbosesupported globally and honored by subcommands. - Shared "Did you mean?" suggestion framework implemented.
- All
ng_*/nemo_gym_*aliases continue to function with one-line deprecation notices. -
gym --helpand migration documentation are published.
Sub-issues
Collapse Sub-issuesSub-issues
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
[-]Epic: Gym CLI usability (high-priority improvements)[/-][+]Epic: Gym CLI usability -- first class CLI experience[/+]32 remaining items
feat(registry): environment registry — discover + resolve environment…
feat: environment registry + 'gym list environments' (#1205 friction #8…
changes
feat: environment registry + 'gym list environments' (#1205 friction #8…
fix(cli): accept -v/--verbose before the subcommand; stop suggesting …
fix(cli): accept -v/--verbose before the subcommand; stop suggesting …