goharbor / harbor-cli

[Sandbox] Official Harbor CLI
Apache License 2.0
41 stars 45 forks source link

Support yaml output #241

Open JianMinTang opened 2 weeks ago

JianMinTang commented 2 weeks ago

Fixed #240

Support yaml output for the command registry list

bupd commented 2 weeks ago

Every command need to have support for yaml output.

JianMinTang commented 1 week ago

Hi @bupd and @Vad1mo, I am a bit confused about the difference between list and info under the same command. If there is any difference in the information they display, could you clearly explain the distinction between them?

I created a sample, but I think the info subcommand is redundant, or it could display only the name and description fields within the subcommand info. image

Maybe the list command is displaying incorrectly, if the user want to list ther repos by the command harbor repo list, we should show every repositories, not just those within a single project. If the user wants to view detailed information about a specific repository, they should use the command harbor repo info to see information about that particular repository.

My suggestion might not be correct, So I am open to receiving your suggestions and guidance on this issue.

bupd commented 4 days ago

if the user want to list ther repos by the command harbor repo list, we should show every repositories, not just those within a single project.

./harbor-dev catalog

catalog command can be used if the user needs to list all the repos. instead of repos under a single project. catalog seems more oci than list.

we still not have catalog command. we sure need one in the future.

bupd commented 4 days ago

If the user wants to view detailed information about a specific repository, they should use the command harbor repo info to see information about that particular repository.

harbor repo view <project_name>/<repo_name>

we can rename the repo info to repo view this might be clear than info.

bupd commented 4 days ago

SO, @JianMinTang

repo list - will list repos under a single project catalog - will list all repos repo view - will show details about a single repo

JianMinTang commented 3 days ago

Hi @bupd, I’ve added the table format and YAML/JSON output to some commands, following your suggestions. Thank you so much for your valuable input!