id = "harbor-cli"
name = "Harbor CLI"
homepage = "https://github.com/goharbor/harbor-cli"
description = "The official command-line interface for Harbor."
executables = ["harbor"]
[dotfiles]
paths = []
secret = ["[configHome]/harbor-cli/config.yaml", "[xdgData]/harbor-cli/data.yaml"]
[commands]
format = 1
label = "Harbor CLI"
description = "Log in to a Harbor registry and list projects or repositories. Passwords are never entered here; use --password-stdin or the interactive prompt. Create, delete and other subcommands are left out."
quality = "ai-draft"
parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = true }
[[commands.subcommand]]
path = ["login"]
label = "Log in"
description = "Authenticate with a Harbor registry."
[[commands.subcommand.source]]
id = "docs"
kind = "manual"
url = "https://github.com/goharbor/harbor-cli/blob/main/doc/cli-docs/harbor-login.md"
revision = "2026-10-27"
evidence = """
harbor login [server] [flags]
-n, --context-name string Login context name (optional)
--password-stdin Take the password from stdin
-u, --username string Username
"""
[[commands.subcommand.field]]
id = "server"
label = "Server"
type = "string"
position = 0
sources = ["docs"]
[[commands.subcommand.field]]
id = "username"
label = "Username"
type = "string"
option = ["--username", "-u"]
sources = ["docs"]
[[commands.subcommand.field]]
id = "context_name"
label = "Context name"
type = "string"
option = ["--context-name", "-n"]
sources = ["docs"]
[[commands.subcommand.field]]
id = "password_stdin"
label = "Read password from stdin"
type = "boolean"
option = ["--password-stdin"]
sources = ["docs"]
[[commands.subcommand.task]]
id = "login"
label = "Log in"
fields = ["server", "username"]
required = ["server", "username"]
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["server", "username", "context_name", "password_stdin"]
[[commands.subcommand]]
path = ["project", "list"]
label = "List projects"
description = "List Harbor projects."
[[commands.subcommand.source]]
id = "docs"
kind = "manual"
url = "https://github.com/goharbor/harbor-cli/blob/main/doc/cli-docs/harbor-project-list.md"
revision = "2026-10-27"
evidence = """
harbor project list [flags]
--name string Name of the project
--page int Page number (default 1)
--page-size int Size of per page (0 to fetch all)
--private Show only private projects
--public Show only public projects
--sort string Sort the resource list in ascending or descending order
-o, --output-format string Output format. One of: json|yaml|csv
"""
[[commands.subcommand.field]]
id = "name"
label = "Project name"
type = "string"
option = ["--name"]
sources = ["docs"]
[[commands.subcommand.field]]
id = "private"
label = "Private only"
type = "boolean"
option = ["--private"]
sources = ["docs"]
[[commands.subcommand.field]]
id = "public"
label = "Public only"
type = "boolean"
option = ["--public"]
sources = ["docs"]
[[commands.subcommand.field]]
id = "page"
label = "Page"
type = "integer"
option = ["--page"]
sources = ["docs"]
[[commands.subcommand.field]]
id = "page_size"
label = "Page size"
description = "0 fetches all."
type = "integer"
option = ["--page-size"]
sources = ["docs"]
[[commands.subcommand.field]]
id = "output_format"
label = "Output format"
type = "enum"
choices = [{ value = "json", label = "JSON" }, { value = "yaml", label = "YAML" }, { value = "csv", label = "CSV" }]
option = ["--output-format", "-o"]
sources = ["docs"]
[[commands.subcommand.task]]
id = "list"
label = "List projects"
fields = []
[[commands.subcommand.task]]
id = "json"
label = "List as JSON"
fields = ["output_format"]
set = { output_format = ["json"] }
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["name", "private", "public", "output_format"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["page", "page_size"]
[[commands.subcommand]]
path = ["repo", "list"]
label = "List repositories"
description = "List repositories within a project."
[[commands.subcommand.source]]
id = "docs"
kind = "manual"
url = "https://github.com/goharbor/harbor-cli/blob/main/doc/cli-docs/harbor-repo-list.md"
revision = "2026-10-27"
evidence = """
harbor repo list <project_name>
--page int Page number (default 1)
--page-size int Size of per page (default 10)
-q, --query string Query string to query resources
-o, --output-format string Output format. One of: json|yaml|csv
"""
[[commands.subcommand.field]]
id = "project"
label = "Project name"
type = "string"
position = 0
sources = ["docs"]
[[commands.subcommand.field]]
id = "query"
label = "Query"
type = "string"
option = ["--query", "-q"]
sources = ["docs"]
[[commands.subcommand.field]]
id = "page"
label = "Page"
type = "integer"
option = ["--page"]
sources = ["docs"]
[[commands.subcommand.field]]
id = "page_size"
label = "Page size"
type = "integer"
option = ["--page-size"]
sources = ["docs"]
[[commands.subcommand.field]]
id = "output_format"
label = "Output format"
type = "enum"
choices = [{ value = "json", label = "JSON" }, { value = "yaml", label = "YAML" }, { value = "csv", label = "CSV" }]
option = ["--output-format", "-o"]
sources = ["docs"]
[[commands.subcommand.task]]
id = "list"
label = "List repositories"
fields = ["project"]
required = ["project"]
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["project", "query", "output_format"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["page", "page_size"]