Repository navigation
Feat/cli ux overhaul - #12
Merged
Merged
Conversation
Bare `genelab` printed a single hint line, subcommand --help was sparse, and extensions had no sanctioned channel to surface usage hints. This reshapes the CLI surface without touching the play/train argv grammar. - Replace the bare-invocation one-liner with a Rich landing page that shows Quickstart commands, grouped command list, and counts of registered robots, envs, and tasks. - Add `genelab info NAME`: looks up a task/env/robot, renders description, env/robot/trainable meta, an overridable cfg-path table derived from the instantiated dataclass tree, and any examples the extension registered. - Add an optional `examples: Sequence[str] = ()` kwarg on `register_robot` / `register_env` / `register_task`. Display-only strings; never executed or validated. Backwards compatible. - Switch the Typer app to rich_markup_mode="rich" and group commands into Registry / Runtime / Project / Utilities panels. Document the full flag grammar (--vis/--gpu/--steps/--dt/--a.b.c VALUE, plus all RUNNER_KEYS) inside `play --help` and `train --help`. - Project scaffold's generated `tasks.py` now ships an `examples=[...]` block so freshly created extensions get a populated `info` view. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Unitree G1 and inverted-pendulum tasks now register `examples=[...]` so `genelab info TASK` shows ready-to-copy commands. Cover the typical play / train shapes for each, including the required `--env.commands.motion.motion_file` flag on G1 tracking. Also drop `soft_wrap=True` on the Rich consoles: that flag actively disables wrapping (allowing overflow), which truncated long example lines inside the info panel at narrow terminal widths. With it off, Rich wraps each example line at the panel inner width. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Typer's rich_markup_mode renders --flag tokens with ANSI escape codes that split the leading dashes from the rest of the flag, e.g. "\x1b[1;2;36m-\x1b[0m\x1b[1;2;36m-vis\x1b[0m". Locally pytest sees no color, so "--vis" in out passes; in GitHub Actions FORCE_COLOR is on and the literal substring is gone, breaking test_play_help_documents_short_flag_grammar. Strip CSI sequences before asserting, in both help-doc tests.
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.
No description provided.