Skip to content

feat(cmd): Add missing examples and slightly reword#312

Draft
craciunoiuc wants to merge 1 commit into
stagingfrom
craciunoiuc/add-more-examples
Draft

feat(cmd): Add missing examples and slightly reword#312
craciunoiuc wants to merge 1 commit into
stagingfrom
craciunoiuc/add-more-examples

Conversation

@craciunoiuc
Copy link
Copy Markdown
Member

Closes: TOOL-846

@craciunoiuc craciunoiuc requested a review from jedevc May 8, 2026 08:27
@craciunoiuc craciunoiuc force-pushed the craciunoiuc/add-more-examples branch from 85808d7 to d15f2ee Compare May 8, 2026 08:53
Comment thread internal/cmd/certificates.go
Comment thread internal/cmd/instance_templates.go
Signed-off-by: Cezar Craciunoiu <cezar@unikraft.io>
@craciunoiuc craciunoiuc force-pushed the craciunoiuc/add-more-examples branch from d15f2ee to 7c05f87 Compare May 8, 2026 09:17
@craciunoiuc craciunoiuc requested a review from nurof3n May 8, 2026 09:17
cmd.CmdTypeList: {
{
Description: "List all certificates",
Description: "List all certificates across metros",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does including across metros here add anything? All commands work across all metros.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True

Probably only makes sense if there's also an example that has --metro=smth and that says on a single metro"

Comment thread internal/cmd/instances.go
Comment on lines +958 to +961
{
Description: "List instances as a table with additional fields",
Commands: []string{"unikraft instance list -f +resources -o table"},
},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah. I'm not entirely sure about some of these.

The issue is that we should use the examples to give info specific to this command. But things like --field, --sort, --filter, --watch, --dry-run, etc, apply to everything. I don't really know where these need to appear in the help hierarchy to make them better, but I don't want to add them to every single place - it's a lot of repetition (and e.g. suppose we update the --watch flag - then we have to update it everywhere).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also true

If I remember correctly in kraftkit we were adding them ocassionally to some commands to show/remind people how to use them

Of course there should be a better way to do this

Maybe if we would show them only in the top level help?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should show common functionality for each command - but we shouldn't have examples that explain the flags like --sort unless that really is a super used operation for exactly that command.

Instead, we should expand the help for --sort and such for those cases.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, okay, makes sense, I'll do a pass through it and hand-curate

@craciunoiuc craciunoiuc marked this pull request as draft May 14, 2026 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants