docs: polish CLI help text; introduce Options + Global Options panels#346
Merged
blainekasten merged 7 commits intonextfrom Apr 30, 2026
Merged
docs: polish CLI help text; introduce Options + Global Options panels#346blainekasten merged 7 commits intonextfrom
blainekasten merged 7 commits intonextfrom
Conversation
In CLI terminology, "options" is the established term for named --foo arguments (kubectl, docker, git, aws, cargo); "parameters" is generic and formally includes positional arguments. Switching to "Global Options" matches convention and stays correct if a value-taking global is added later. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Rename the per-command `Parameters` panel to `Options` (matches the `Global Options` rename and aligns with kubectl/docker/git/aws CLI conventions). - Hoist the `Model` group to the top of `tg fine-tuning create -h` via `sort_key=0` — it's the primary mutually-exclusive decision. - Render `[default: X]` in the help formatter when cyclopts populates `entry.default`. Suppress noisy False/None/"" defaults so opt-in bool flags don't get cluttered. - Drop inline `(defaults to X)` parentheticals; rephrase as `; uses X if unset` clauses. - Trim long descriptions and split into `\n\n` paragraphs where appropriate. - Standardize `(e.g.,` → `(e.g.` (dominant form in this codebase). - Fix a stray mid-sentence period in `--from-checkpoint` and the trailing period on `tg files upload`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Fixes mypy no-untyped-def error. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
e4eed1d to
4cf53f5
Compare
f51cc62 to
cf6556e
Compare
cf6556e to
e9953ae
Compare
blainekasten
approved these changes
Apr 30, 2026
Merged
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.
Summary
Optionspanel (per-command): renamed the cyclopts defaultParameterspanel toOptionsviagroup_parameters=Group("Options", sort_key=100)on the rootApp— propagates to every subcommand.Global Optionspanel (CLI-wide): single panel that holds--non-interactive,--json,--help,--versionand propagates to every subcommand and sub-subcommand level. Replaces the prior split betweenCommon Parameters(which held--non-interactive/--json) and a separateParameterspanel (which only held--help/--versionat the root).[default: X]rendering: extended the human help formatter (utils/_help_formatter.py) to append[default: X]fromentry.default(which cyclopts auto-populates when a parameter has a concrete default). Suppresses noisyFalse/None/""defaults so opt-in boolean flags don't get cluttered. Lets us drop most inline(defaults to X)parentheticals.Modelgroup hoisted intg fine-tuning create -hviasort_key=0— it's the primary mutually-exclusive decision (--modelxor--from-checkpoint).⚠️from the title — the variation-selector glyph was breaking rich's box-drawing math, so the panel rendered with no borders. Title is now plainBeta Commands.files,fine-tuning,models,endpoints,evals,telemetry,beta clusters, andbeta jig. Removed trailing periods (and one stray mid-sentence period in--from-checkpoint), replaced "API commands" boilerplate with action-oriented summaries (e.g.Files API commands→Upload and manage files for fine-tuning, evals, and inference), shortened verbose flag descriptions inevals createandfine-tuning create, standardized(e.g.,→(e.g..Why "Options" and "Global Options" (not "Parameters" / "Flags")?
CLI terminology hierarchy:
-or--(e.g.--api-key VALUE,--json). May or may not take a value.--verbose,--no-color).Mainstream CLIs (
kubectl,docker,git,aws,cargo,gh) all use "Options" for the named-flag panel. "Flags" would also be defensible (and more precise for the global panel where all four entries are currently boolean flags), but "Options" stays correct if a value-taking global is ever added (e.g.--config PATH), and is the broader convention.Follow-ups for reviewers (deferred functional work, not in this PR)
These were noted during the convention sweep but kept out of scope to keep the PR text-only:
negative=()policy across boolean params — currently inconsistent:jig.pyboolean flags usenegative=()to suppress--no-foopairs, others don't. Pick one policy and apply uniformly.(must be >= 0)with cyclopts numeric validators inendpoints/create.py(MinReplicasParameter,MaxReplicasParameter).(required for X type)and the new "mutually exclusive with…" prose with cyclopts cross-parameter validators inevals/create.py— better error messages and the help text can simplify further._NOISY_DEFAULTS = {"False", "None", '""'}filter in the formatter is a heuristic — if there's appetite, switch to honoring onlyParameter(show_default=True)explicit opt-in instead.Test plan
tg -hshows a singleGlobal Optionspanel with all 4 flags and a properly framedBeta Commandspaneltg endpoints -handtg endpoints list -hboth show the sameGlobal Optionspanel and anOptionspanel above ittg fine-tuning create -hshows panels in order:Model→Options→Global Optionstg --version,tg endpoints --version,tg endpoints list --versionall print the versiontg endpoints list --jsonstill routes the flag through to output[default: X]annotations ontg fine-tuning create -h(e.g.--n-epochs [default: 1],--packing [default: True])tg beta clusters get-credentials -h,tg fine-tuning download -h,tg evals create -hbash dump-help.shthen skimall-help.txt🤖 Generated with Claude Code