[deckhouse-cli] Merge "cli" and "plugins" command into d8 "dist" - #437
Open
Glitchy-Sheep wants to merge 6 commits into
Open
[deckhouse-cli] Merge "cli" and "plugins" command into d8 "dist"#437Glitchy-Sheep wants to merge 6 commits into
Glitchy-Sheep wants to merge 6 commits into
Conversation
- `AddFlags` now registers only `--plugins-dir` and `--skip-cluster-checks`. - New `AddKubeFlags` registers `--kubeconfig`/`--context`, bound to the package vars. - The plugins command composes all three sets, so its flag surface stays the same. - Prepares the dist root command to own the cluster flags for the whole tree. Signed-off-by: Roman Berezkin <roman.berezkin@flant.com>
- `d8 dist` now manages the whole distribution: the binary (check/update/use/versions) and the plugins subtree. - The old `d8 cli` and `d8 plugins` top-level commands are gone. - Cluster access flags (`--kubeconfig`, `--context`, `--rpp-*`) live on the dist root and are inherited by the plugins subtree. - One file per command in `internal/dist/cmd`; shared updater and color palette split into their own files. - Anchor the `dist/` gitignore pattern to the repo root so `internal/dist` is trackable. Signed-off-by: Roman Berezkin <roman.berezkin@flant.com>
- Error suggestions and help texts now point to `d8 dist ...` and `d8 dist plugins ...`. - Package docs reference the new tree; pluginscmd gets a doc.go with the subtree map. - Tests asserting the hint strings updated to match. Signed-off-by: Roman Berezkin <roman.berezkin@flant.com>
- Running `d8 dist` prints the d8 version, installed plugins, and what is outdated. - Freshness comes from the registry-packages-proxy; an unreachable cluster degrades the summary to local data with a warning instead of failing. - The plugins root is resolved read-only (configured root or home fallback), so the summary never creates directories. - Semantic color palette follows the mirror summary convention; rendering is a pure function covered by unit tests. Signed-off-by: Roman Berezkin <roman.berezkin@flant.com>
- User docs and package READMEs now describe `d8 dist` and `d8 dist plugins` paths. - The self-update doc gets the `d8 dist` summary: a commands-table row and a transcript example. - Package maps point to `internal/dist/cmd` as the command layer. Signed-off-by: Roman Berezkin <roman.berezkin@flant.com>
Glitchy-Sheep
force-pushed
the
feat/refactor-package-management-commands
branch
from
August 5, 2026 08:20
afccb6f to
a853568
Compare
Glitchy-Sheep
marked this pull request as ready for review
August 5, 2026 08:20
- Bare `d8 dist` prints help again, like every other command group. - The summary lives at `d8 dist status`, mirroring the `d8 status` verb. - The dist root keeps an explicit Run so a stray argument still errors instead of silently showing help. Signed-off-by: Roman Berezkin <roman.berezkin@flant.com>
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
d8 cli(self-update) andd8 plugins(plugin management) were two halves of one job: managing the installed d8 binary and its plugins.This PR merges them into a single entry point,
d8 dist(the "distribution"), and adds a root summary.Command tree
Before (both trees removed):
After:
What changed
internal/selfupdate/cmdto a newinternal/dist/cmdpackage, one file per command.d8 distas is; it stays hidden while the plugin ecosystem rolls out.--kubeconfig,--context,--rpp-*) moved to thedistroot; the whole tree inherits them. The plugins subtree keeps only its own flags (--plugins-dir,--skip-cluster-checks).The new summary
d8 distwith no arguments prints the state of the distribution.If the cluster is unreachable, it prints local data and a warning instead of failing:
checkandplugins versions.~/.deckhouse-cli) too.Breaking change
d8 cli ...andd8 plugins ...are gone; scripts must switch tod8 dist .../d8 dist plugins ....d8 clishipped in releases since v0.32.0.d8 pluginswas always hidden and undocumented.