Add completion spec: Talos Linux CLI (talosctl)#294
Open
maxmilian wants to merge 1 commit into
Open
Conversation
Static spec generated by walking talosctl v1.13.6's Cobra command tree (106 nodes, 49 top-level commands) via its help output, then curated: - talosctl_builtin_completion generator delegates dynamic completions (config contexts, node services, resource types, --nodes/--endpoints/ --context values) to the CLI's hidden Cobra __complete command, mirroring oc_builtin_completion in oc.rs - filepaths/folders templates on path-like flags (--talosconfig, --file, --*-path, --*-dir, ...) - hand-fixed usage strings the tokenizer can't parse (copy's '-|<local-path>', service's nested optional action) Closes warpdotdev/warp#12693 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XWwajmLbgJbK6JBCY8nKfk
|
Every PR must be linked to a same-repo issue before Oz can review it. This PR is linked to #293, but no linked issue is marked Powered by Oz |
There was a problem hiding this comment.
Every PR must be linked to a same-repo issue before Oz can review it.
This PR is linked to #293, but no linked issue is marked ready-to-implement yet. Only repository maintainers apply that label, so please wait for a maintainer to mark the issue. Once it is marked, push a new commit or comment /oz-review to re-trigger review.
Powered by Oz
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.
Closes #293 (tracks warpdotdev/warp#12693)
Adds a completion spec for
talosctl, the Talos Linux CLI for out-of-band management of Kubernetes nodes.What's included
json/talosctl.json— static spec walked from talosctl v1.13.6's Cobra command tree (106 nodes, 49 top-level commands), covering all subcommands, flags, and positional args, withfilepaths/folderstemplates on path-like flags (--talosconfig,--file,--*-path,--*-dir, …).src/generators/talosctl.rs— a singletalosctl_builtin_completiongenerator that delegates dynamic completions to the CLI's hidden Cobra__completecommand, mirroringoc_builtin_completioninoc.rs. It powers:config context/config removecontext names (offline, from talosconfig)--contextflag valuesservice/logs/restartservice IDs,get/edit/patchresource types,--nodes/--endpointsvalues), same connected-cluster assumption as the kubectl/oc specs__completeemitsvalue<TAB>descriptionpairs, so the post-process splits on tab and surfaces descriptions in the menu. 3 unit tests cover plain values, descriptions, and error filtering.Verification
script/presubmitgreen (fmt, clippy, full test suite incl. spec-deserialization invariants)Static subcommand completions (
talosctl+ Tab):Dynamic contexts via
talosctl_builtin_completion(talosctl config context+ Tab, three contexts defined in a local talosconfig):Notes for reviewers
--help/__completeoutput, then hand-curated — regeneration for future talosctl versions is reproducible.--nodes/--endpointscompletion via__completecan be slow when the configured cluster is unreachable (talosctl attempts discovery). This matches the CLI's native shell completion behavior and the connected-cluster assumption of the existing kubectl/oc generators, but happy to drop those two attachment points if you'd prefer offline-only generators.🤖 Generated with Claude Code
https://claude.ai/code/session_01XWwajmLbgJbK6JBCY8nKfk