{
  "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
    },
    "subcommand": [
      {
        "path": [
          "login"
        ],
        "label": "Log in",
        "description": "Authenticate with a Harbor registry.",
        "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  -n, --context-name string   Login context name (optional)\n      --password-stdin        Take the password from stdin\n  -u, --username string       Username\n"
          }
        ],
        "field": [
          {
            "id": "server",
            "label": "Server",
            "type": "string",
            "position": 0,
            "sources": [
              "docs"
            ]
          },
          {
            "id": "username",
            "label": "Username",
            "type": "string",
            "option": [
              "--username",
              "-u"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "context_name",
            "label": "Context name",
            "type": "string",
            "option": [
              "--context-name",
              "-n"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "password_stdin",
            "label": "Read password from stdin",
            "type": "boolean",
            "option": [
              "--password-stdin"
            ],
            "sources": [
              "docs"
            ]
          }
        ],
        "task": [
          {
            "id": "login",
            "label": "Log in",
            "fields": [
              "server",
              "username"
            ],
            "required": [
              "server",
              "username"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "server",
              "username",
              "context_name",
              "password_stdin"
            ]
          }
        ]
      },
      {
        "path": [
          "project",
          "list"
        ],
        "label": "List projects",
        "description": "List Harbor projects.",
        "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]\n      --name string     Name of the project\n      --page int        Page number (default 1)\n      --page-size int   Size of per page (0 to fetch all)\n      --private         Show only private projects\n      --public          Show only public projects\n      --sort string     Sort the resource list in ascending or descending order\n  -o, --output-format string   Output format. One of: json|yaml|csv\n"
          }
        ],
        "field": [
          {
            "id": "name",
            "label": "Project name",
            "type": "string",
            "option": [
              "--name"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "private",
            "label": "Private only",
            "type": "boolean",
            "option": [
              "--private"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "public",
            "label": "Public only",
            "type": "boolean",
            "option": [
              "--public"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "page",
            "label": "Page",
            "type": "integer",
            "option": [
              "--page"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "page_size",
            "label": "Page size",
            "description": "0 fetches all.",
            "type": "integer",
            "option": [
              "--page-size"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "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"
            ]
          }
        ],
        "task": [
          {
            "id": "list",
            "label": "List projects",
            "fields": []
          },
          {
            "id": "json",
            "label": "List as JSON",
            "fields": [
              "output_format"
            ],
            "set": {
              "output_format": [
                "json"
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "name",
              "private",
              "public",
              "output_format"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "page",
              "page_size"
            ]
          }
        ]
      },
      {
        "path": [
          "repo",
          "list"
        ],
        "label": "List repositories",
        "description": "List repositories within a project.",
        "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>\n      --page int        Page number (default 1)\n      --page-size int   Size of per page (default 10)\n  -q, --query string    Query string to query resources\n  -o, --output-format string   Output format. One of: json|yaml|csv\n"
          }
        ],
        "field": [
          {
            "id": "project",
            "label": "Project name",
            "type": "string",
            "position": 0,
            "sources": [
              "docs"
            ]
          },
          {
            "id": "query",
            "label": "Query",
            "type": "string",
            "option": [
              "--query",
              "-q"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "page",
            "label": "Page",
            "type": "integer",
            "option": [
              "--page"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "page_size",
            "label": "Page size",
            "type": "integer",
            "option": [
              "--page-size"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "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"
            ]
          }
        ],
        "task": [
          {
            "id": "list",
            "label": "List repositories",
            "fields": [
              "project"
            ],
            "required": [
              "project"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "project",
              "query",
              "output_format"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "page",
              "page_size"
            ]
          }
        ]
      }
    ]
  }
}
