From 4ce9fcd1fab75e3f752050de4be0b9192ffa7eb7 Mon Sep 17 00:00:00 2001 From: ALTHAF Date: Sun, 20 Oct 2024 15:07:03 +0530 Subject: [PATCH 01/12] modified readme file Signed-off-by: ALTHAF --- Makefile | 1 + cli-docs.sh | 43 +++++++++++++ content/cli-docs/README.md | 57 ++++++++++++++++++ content/cli-docs/_index.md | 20 +++++++ content/cli-docs/cli-docs/_index.md | 13 ++++ .../cli-docs/harbor-artifact-delete.md | 32 ++++++++++ .../cli-docs/cli-docs/harbor-artifact-info.md | 42 +++++++++++++ .../cli-docs/cli-docs/harbor-artifact-list.md | 32 ++++++++++ .../cli-docs/harbor-artifact-scan-start.md | 42 +++++++++++++ .../cli-docs/harbor-artifact-scan-stop.md | 42 +++++++++++++ .../cli-docs/cli-docs/harbor-artifact-scan.md | 40 +++++++++++++ .../cli-docs/harbor-artifact-tags-create.md | 38 ++++++++++++ .../cli-docs/harbor-artifact-tags-delete.md | 38 ++++++++++++ .../cli-docs/harbor-artifact-tags-list.md | 38 ++++++++++++ .../cli-docs/cli-docs/harbor-artifact-tags.md | 37 ++++++++++++ content/cli-docs/cli-docs/harbor-artifact.md | 43 +++++++++++++ content/cli-docs/cli-docs/harbor-login.md | 39 ++++++++++++ .../cli-docs/harbor-project-create.md | 37 ++++++++++++ .../cli-docs/harbor-project-delete.md | 32 ++++++++++ .../cli-docs/cli-docs/harbor-project-list.md | 38 ++++++++++++ .../cli-docs/cli-docs/harbor-project-logs.md | 32 ++++++++++ .../cli-docs/cli-docs/harbor-project-view.md | 32 ++++++++++ content/cli-docs/cli-docs/harbor-project.md | 43 +++++++++++++ .../cli-docs/harbor-registry-create.md | 40 +++++++++++++ .../cli-docs/harbor-registry-delete.md | 32 ++++++++++ .../cli-docs/cli-docs/harbor-registry-info.md | 32 ++++++++++ .../cli-docs/cli-docs/harbor-registry-list.md | 36 +++++++++++ .../cli-docs/harbor-registry-update.md | 40 +++++++++++++ .../cli-docs/cli-docs/harbor-registry-view.md | 32 ++++++++++ content/cli-docs/cli-docs/harbor-registry.md | 44 ++++++++++++++ .../cli-docs/cli-docs/harbor-repo-delete.md | 42 +++++++++++++ content/cli-docs/cli-docs/harbor-repo-info.md | 42 +++++++++++++ content/cli-docs/cli-docs/harbor-repo-list.md | 32 ++++++++++ content/cli-docs/cli-docs/harbor-repo.md | 35 +++++++++++ .../cli-docs/cli-docs/harbor-user-create.md | 37 ++++++++++++ .../cli-docs/cli-docs/harbor-user-delete.md | 32 ++++++++++ .../cli-docs/cli-docs/harbor-user-elevate.md | 36 +++++++++++ content/cli-docs/cli-docs/harbor-user-list.md | 32 ++++++++++ content/cli-docs/cli-docs/harbor-user.md | 42 +++++++++++++ content/cli-docs/cli-docs/harbor-version.md | 42 +++++++++++++ content/cli-docs/cli-docs/harbor.md | 45 ++++++++++++++ layouts/cli-docs/list.html | 8 +++ layouts/cli-docs/single.html | 8 +++ layouts/partials/cli-docs/hero.html | 19 ++++++ layouts/partials/cli-docs/layout.html | 60 +++++++++++++++++++ layouts/partials/cli-docs/menu.html | 58 ++++++++++++++++++ layouts/partials/cli-docs/sidebar.html | 50 ++++++++++++++++ 47 files changed, 1687 insertions(+) create mode 100755 cli-docs.sh create mode 100644 content/cli-docs/README.md create mode 100644 content/cli-docs/_index.md create mode 100644 content/cli-docs/cli-docs/_index.md create mode 100644 content/cli-docs/cli-docs/harbor-artifact-delete.md create mode 100644 content/cli-docs/cli-docs/harbor-artifact-info.md create mode 100644 content/cli-docs/cli-docs/harbor-artifact-list.md create mode 100644 content/cli-docs/cli-docs/harbor-artifact-scan-start.md create mode 100644 content/cli-docs/cli-docs/harbor-artifact-scan-stop.md create mode 100644 content/cli-docs/cli-docs/harbor-artifact-scan.md create mode 100644 content/cli-docs/cli-docs/harbor-artifact-tags-create.md create mode 100644 content/cli-docs/cli-docs/harbor-artifact-tags-delete.md create mode 100644 content/cli-docs/cli-docs/harbor-artifact-tags-list.md create mode 100644 content/cli-docs/cli-docs/harbor-artifact-tags.md create mode 100644 content/cli-docs/cli-docs/harbor-artifact.md create mode 100644 content/cli-docs/cli-docs/harbor-login.md create mode 100644 content/cli-docs/cli-docs/harbor-project-create.md create mode 100644 content/cli-docs/cli-docs/harbor-project-delete.md create mode 100644 content/cli-docs/cli-docs/harbor-project-list.md create mode 100644 content/cli-docs/cli-docs/harbor-project-logs.md create mode 100644 content/cli-docs/cli-docs/harbor-project-view.md create mode 100644 content/cli-docs/cli-docs/harbor-project.md create mode 100644 content/cli-docs/cli-docs/harbor-registry-create.md create mode 100644 content/cli-docs/cli-docs/harbor-registry-delete.md create mode 100644 content/cli-docs/cli-docs/harbor-registry-info.md create mode 100644 content/cli-docs/cli-docs/harbor-registry-list.md create mode 100644 content/cli-docs/cli-docs/harbor-registry-update.md create mode 100644 content/cli-docs/cli-docs/harbor-registry-view.md create mode 100644 content/cli-docs/cli-docs/harbor-registry.md create mode 100644 content/cli-docs/cli-docs/harbor-repo-delete.md create mode 100644 content/cli-docs/cli-docs/harbor-repo-info.md create mode 100644 content/cli-docs/cli-docs/harbor-repo-list.md create mode 100644 content/cli-docs/cli-docs/harbor-repo.md create mode 100644 content/cli-docs/cli-docs/harbor-user-create.md create mode 100644 content/cli-docs/cli-docs/harbor-user-delete.md create mode 100644 content/cli-docs/cli-docs/harbor-user-elevate.md create mode 100644 content/cli-docs/cli-docs/harbor-user-list.md create mode 100644 content/cli-docs/cli-docs/harbor-user.md create mode 100644 content/cli-docs/cli-docs/harbor-version.md create mode 100644 content/cli-docs/cli-docs/harbor.md create mode 100644 layouts/cli-docs/list.html create mode 100644 layouts/cli-docs/single.html create mode 100644 layouts/partials/cli-docs/hero.html create mode 100644 layouts/partials/cli-docs/layout.html create mode 100644 layouts/partials/cli-docs/menu.html create mode 100644 layouts/partials/cli-docs/sidebar.html diff --git a/Makefile b/Makefile index 62e4e6dee..14429b42f 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ clean: prepare: $(CURDIR)/load-docs.sh + $(CURDIR)/cli-docs.sh serve: hugo server \ diff --git a/cli-docs.sh b/cli-docs.sh new file mode 100755 index 000000000..f9663bb93 --- /dev/null +++ b/cli-docs.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +# Step 1: Clone the required repositories +HARBOR_CLI_REPO="https://github.com/goharbor/harbor-cli.git" + +# Clone both repos if not already cloned +if [ ! -d "harbor-cli" ]; then + git clone $HARBOR_CLI_REPO +fi + +# Define the paths for relevant folders +HARBOR_CLI_DOCS="harbor-cli/doc/cli-docs" +WEBSITE_CLI_DOCS="content/cli-docs/cli-docs" + +# Step 2: Check for missing files +# List files in both directories + +CLI_FILES_HARBOR_CLI=$(ls $HARBOR_CLI_DOCS) +CLI_FILES_WEBSITE=$(ls $WEBSITE_CLI_DOCS) + +# Find files in harbor-cli that are not present in website's cli-docs folder + +MISSING_FILES=() +for FILE in $CLI_FILES_HARBOR_CLI; do + FILENAME=$(basename "$FILE") + if [ ! -f "$WEBSITE_CLI_DOCS/$FILENAME" ]; then + MISSING_FILES+=("$FILENAME") + fi +done + +# Step 3: Copy missing files +if [ ${#MISSING_FILES[@]} -eq 0 ]; then + echo "No missing files." +else + echo "Copying missing files..." + for FILE in "${MISSING_FILES[@]}"; do + cp "$HARBOR_CLI_DOCS/$FILE" "./content/cli-docs/cli-docs" + echo "Copied $FILE successfully" + done + +fi + +rm -rf harbor-cli diff --git a/content/cli-docs/README.md b/content/cli-docs/README.md new file mode 100644 index 000000000..de75032c2 --- /dev/null +++ b/content/cli-docs/README.md @@ -0,0 +1,57 @@ +# Harbor CLI Documentation + +Welcome to the Harbor CLI Documentation! This guide provides a comprehensive overview of the commands available in the Harbor CLI, which allows you to efficiently manage and interact with your Harbor registry. + +## Overview +The Harbor CLI is designed to facilitate the management of your Harbor registry. It provides a range of commands that enable you to perform various operations efficiently. + +## Command Categories +The Harbor CLI commands are categorized by function: + +- **`harbor`**: Configure the Harbor CLI. +- **`harbor artifact`**: Manage artifacts in Harbor Repository. +- **`harbor project`**: Manage projects and assign resources to them. +- **`harbor registry`**: Manage registries in Harbor. +- **`harbor repo`**: Manage repositories in Harbor context. +- **`harbor user`**: Administer users in Harbor, including creating, updating, and managing user accounts. + +## Local Development + +### Step 1: Clone the Project +To get started, clone the repository using the following commands: + +```sh +git clone https://github.com/goharbor/website.git +cd website +``` + +### Step 2: View CLI documentation content +Navigate to the directory containing the CLI documentation: + +```sh +cd content/cli-docs/cli-docs +``` +The Markdown content for the Harbor CLI documentation is located in the cli-docs folder. + +### Step 3: Update Markdown Files +To ensure that your documentation is up to date with the latest files from the Harbor CLI repository, run: +```sh +make prepare +``` + +This command clones the harbor-cli repository, checks for any missing documentation files, and copies them into the website's directory. + +### Step 4: Run Hugo in server mode +Start a local Hugo server to preview your changes: +```sh +make serve +``` +This starts up the local Hugo server on http://localhost:1313. As you make changes, the site refreshes automatically in your browser. + +## Creating a Pull Request +If you wish to contribute, please make your changes to the Markdown files in the [cli-docs](./cli-docs/) folder. After making your changes, submit a pull request. + +## License +[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fgoharbor%2Fwebsite.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fgoharbor%2Fwebsite?ref=badge_large) + + diff --git a/content/cli-docs/_index.md b/content/cli-docs/_index.md new file mode 100644 index 000000000..e63a4da0c --- /dev/null +++ b/content/cli-docs/_index.md @@ -0,0 +1,20 @@ +--- +title: Harbor CLI Documentation +--- + +Welcome to the Harbor CLI documentation. This provides detailed documentation for the Harbor CLI. + +## Harbor CLI Documentation + +This section describes the comprehensive set of commands provided by the Harbor CLI, which enables you to efficiently manage and interact with your Harbor registry. + +- `harbor` - Configure the Harbor CLI and set global flags to customize your experience. +- `harbor artifact` - Manage artifacts in Harbor Repository +- `harbor project` - Manage projects and assign resources to them +- `harbor registry` - Manage registries in Harbor +- `harbor repo` - Manage repositories in Harbor context +- `harbor user` - Administer users in Harbor, including creating, updating, and managing user accounts + +## Access the Documentation Source Files + +The source files for this documentation set are located in the [Harbor CLI repository on Github](https://github.com/goharbor/harbor-cli/tree/main/doc/cli-docs). diff --git a/content/cli-docs/cli-docs/_index.md b/content/cli-docs/cli-docs/_index.md new file mode 100644 index 000000000..3fdae08b5 --- /dev/null +++ b/content/cli-docs/cli-docs/_index.md @@ -0,0 +1,13 @@ +--- +title: Harbor CLI Commands +weight: 25 +--- + +This section describes the comprehensive set of commands provided by the Harbor CLI, which enables you to efficiently manage and interact with your Harbor registry. The Harbor CLI commands are categorized by function, + +- `harbor` - Configure the Harbor CLI. +- `harbor artifact` - Manage artifacts in Harbor Repository +- `harbor project` - Manage projects and assign resources to them +- `harbor registry` - Manage registries in Harbor +- `harbor repo` - Manage repositories in Harbor context +- `harbor user` - Administer users in Harbor, including creating, updating, and managing user accounts \ No newline at end of file diff --git a/content/cli-docs/cli-docs/harbor-artifact-delete.md b/content/cli-docs/cli-docs/harbor-artifact-delete.md new file mode 100644 index 000000000..fd4d9ca6a --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-artifact-delete.md @@ -0,0 +1,32 @@ +--- +title: harbor artifact delete +weight: 35 +--- +## harbor artifact delete + +### Description + +##### delete an artifact + +```sh +harbor artifact delete [flags] +``` + +### Options + +```sh + -h, --help help for delete +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor artifact](harbor-artifact.md) - Manage artifacts + diff --git a/content/cli-docs/cli-docs/harbor-artifact-info.md b/content/cli-docs/cli-docs/harbor-artifact-info.md new file mode 100644 index 000000000..55157e9a5 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-artifact-info.md @@ -0,0 +1,42 @@ +--- +title: harbor artifact info +weight: 25 +--- +## harbor artifact info + +### Description + +##### Get info of an artifact + +### Synopsis + +Get info of an artifact + +```sh +harbor artifact info [flags] +``` + +### Examples + +```sh +harbor artifact info // +``` + +### Options + +```sh + -h, --help help for info +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor artifact](harbor-artifact.md) - Manage artifacts + diff --git a/content/cli-docs/cli-docs/harbor-artifact-list.md b/content/cli-docs/cli-docs/harbor-artifact-list.md new file mode 100644 index 000000000..dd02b30af --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-artifact-list.md @@ -0,0 +1,32 @@ +--- +title: harbor artifact list +weight: 30 +--- +## harbor artifact list + +### Description + +##### list artifacts within a repository + +```sh +harbor artifact list [flags] +``` + +### Options + +```sh + -h, --help help for list +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor artifact](harbor-artifact.md) - Manage artifacts + diff --git a/content/cli-docs/cli-docs/harbor-artifact-scan-start.md b/content/cli-docs/cli-docs/harbor-artifact-scan-start.md new file mode 100644 index 000000000..31652afe3 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-artifact-scan-start.md @@ -0,0 +1,42 @@ +--- +title: harbor artifact scan start +weight: 45 +--- +## harbor artifact scan start + +### Description + +##### Start a scan of an artifact + +### Synopsis + +Start a scan of an artifact in Harbor Repository + +```sh +harbor artifact scan start [flags] +``` + +### Examples + +```sh +harbor artifact scan start // +``` + +### Options + +```sh + -h, --help help for start +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor artifact scan](harbor-artifact-scan.md) - Scan an artifact + diff --git a/content/cli-docs/cli-docs/harbor-artifact-scan-stop.md b/content/cli-docs/cli-docs/harbor-artifact-scan-stop.md new file mode 100644 index 000000000..781c6ad26 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-artifact-scan-stop.md @@ -0,0 +1,42 @@ +--- +title: harbor artifact scan stop +weight: 50 +--- +## harbor artifact scan stop + +### Description + +##### Stop a scan of an artifact + +### Synopsis + +Stop a scan of an artifact in Harbor Repository + +```sh +harbor artifact scan stop [flags] +``` + +### Examples + +```sh +harbor artifact scan stop // +``` + +### Options + +```sh + -h, --help help for stop +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor artifact scan](harbor-artifact-scan.md) - Scan an artifact + diff --git a/content/cli-docs/cli-docs/harbor-artifact-scan.md b/content/cli-docs/cli-docs/harbor-artifact-scan.md new file mode 100644 index 000000000..c5af733e7 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-artifact-scan.md @@ -0,0 +1,40 @@ +--- +title: harbor artifact scan +weight: 40 +--- +## harbor artifact scan + +### Description + +##### Scan an artifact + +### Synopsis + +Scan an artifact in Harbor Repository + +### Examples + +```sh +harbor artifact scan start // +``` + +### Options + +```sh + -h, --help help for scan +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor artifact](harbor-artifact.md) - Manage artifacts +* [harbor artifact scan start](harbor-artifact-scan-start.md) - Start a scan of an artifact +* [harbor artifact scan stop](harbor-artifact-scan-stop.md) - Stop a scan of an artifact + diff --git a/content/cli-docs/cli-docs/harbor-artifact-tags-create.md b/content/cli-docs/cli-docs/harbor-artifact-tags-create.md new file mode 100644 index 000000000..236c3d82f --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-artifact-tags-create.md @@ -0,0 +1,38 @@ +--- +title: harbor artifact tags create +weight: 60 +--- +## harbor artifact tags create + +### Description + +##### Create a tag of an artifact + +```sh +harbor artifact tags create [flags] +``` + +### Examples + +```sh +harbor artifact tags create // +``` + +### Options + +```sh + -h, --help help for create +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor artifact tags](harbor-artifact-tags.md) - Manage tags of an artifact + diff --git a/content/cli-docs/cli-docs/harbor-artifact-tags-delete.md b/content/cli-docs/cli-docs/harbor-artifact-tags-delete.md new file mode 100644 index 000000000..b5b2e15e1 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-artifact-tags-delete.md @@ -0,0 +1,38 @@ +--- +title: harbor artifact tags delete +weight: 70 +--- +## harbor artifact tags delete + +### Description + +##### Delete a tag of an artifact + +```sh +harbor artifact tags delete [flags] +``` + +### Examples + +```sh +harbor artifact tags delete // +``` + +### Options + +```sh + -h, --help help for delete +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor artifact tags](harbor-artifact-tags.md) - Manage tags of an artifact + diff --git a/content/cli-docs/cli-docs/harbor-artifact-tags-list.md b/content/cli-docs/cli-docs/harbor-artifact-tags-list.md new file mode 100644 index 000000000..169ec9501 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-artifact-tags-list.md @@ -0,0 +1,38 @@ +--- +title: harbor artifact tags list +weight: 65 +--- +## harbor artifact tags list + +### Description + +##### List tags of an artifact + +```sh +harbor artifact tags list [flags] +``` + +### Examples + +```sh +harbor artifact tags list // +``` + +### Options + +```sh + -h, --help help for list +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor artifact tags](harbor-artifact-tags.md) - Manage tags of an artifact + diff --git a/content/cli-docs/cli-docs/harbor-artifact-tags.md b/content/cli-docs/cli-docs/harbor-artifact-tags.md new file mode 100644 index 000000000..683dd452b --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-artifact-tags.md @@ -0,0 +1,37 @@ +--- +title: harbor artifact tags +weight: 55 +--- +## harbor artifact tags + +### Description + +##### Manage tags of an artifact + +### Examples + +```sh + harbor artifact tags list // +``` + +### Options + +```sh + -h, --help help for tags +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor artifact](harbor-artifact.md) - Manage artifacts +* [harbor artifact tags create](harbor-artifact-tags-create.md) - Create a tag of an artifact +* [harbor artifact tags delete](harbor-artifact-tags-delete.md) - Delete a tag of an artifact +* [harbor artifact tags list](harbor-artifact-tags-list.md) - List tags of an artifact + diff --git a/content/cli-docs/cli-docs/harbor-artifact.md b/content/cli-docs/cli-docs/harbor-artifact.md new file mode 100644 index 000000000..c267dae89 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-artifact.md @@ -0,0 +1,43 @@ +--- +title: harbor artifact +weight: 20 +--- +## harbor artifact + +### Description + +##### Manage artifacts + +### Synopsis + +Manage artifacts in Harbor Repository + +### Examples + +```sh + harbor artifact list +``` + +### Options + +```sh + -h, --help help for artifact +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor](harbor.md) - Official Harbor CLI +* [harbor artifact delete](harbor-artifact-delete.md) - delete an artifact +* [harbor artifact info](harbor-artifact-info.md) - Get info of an artifact +* [harbor artifact list](harbor-artifact-list.md) - list artifacts within a repository +* [harbor artifact scan](harbor-artifact-scan.md) - Scan an artifact +* [harbor artifact tags](harbor-artifact-tags.md) - Manage tags of an artifact + diff --git a/content/cli-docs/cli-docs/harbor-login.md b/content/cli-docs/cli-docs/harbor-login.md new file mode 100644 index 000000000..4e4018298 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-login.md @@ -0,0 +1,39 @@ +--- +title: harbor login +weight: 15 +--- +## harbor login + +### Description + +##### Log in to Harbor registry + +### Synopsis + +Authenticate with Harbor Registry. + +```sh +harbor login [server] [flags] +``` + +### Options + +```sh + -h, --help help for login + --name string name for the set of credentials + -p, --password string Password + -u, --username string Username +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor](harbor.md) - Official Harbor CLI + diff --git a/content/cli-docs/cli-docs/harbor-project-create.md b/content/cli-docs/cli-docs/harbor-project-create.md new file mode 100644 index 000000000..fcea0a3c0 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-project-create.md @@ -0,0 +1,37 @@ +--- +title: harbor project create +weight: 80 +--- +## harbor project create + +### Description + +##### create project + +```sh +harbor project create [flags] +``` + +### Options + +```sh + -h, --help help for create + --name string Name of the project + --proxy-cache Whether the project is a proxy cache project + --public Project is public or private (default true) + --registry-id string ID of referenced registry when creating the proxy cache project + --storage-limit string Storage quota of the project (default "-1") +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor project](harbor-project.md) - Manage projects and assign resources to them + diff --git a/content/cli-docs/cli-docs/harbor-project-delete.md b/content/cli-docs/cli-docs/harbor-project-delete.md new file mode 100644 index 000000000..fffdcf616 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-project-delete.md @@ -0,0 +1,32 @@ +--- +title: harbor project delete +weight: 100 +--- +## harbor project delete + +### Description + +##### delete project by name or id + +```sh +harbor project delete [flags] +``` + +### Options + +```sh + -h, --help help for delete +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor project](harbor-project.md) - Manage projects and assign resources to them + diff --git a/content/cli-docs/cli-docs/harbor-project-list.md b/content/cli-docs/cli-docs/harbor-project-list.md new file mode 100644 index 000000000..41d6ed66a --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-project-list.md @@ -0,0 +1,38 @@ +--- +title: harbor project list +weight: 85 +--- +## harbor project list + +### Description + +##### list project + +```sh +harbor project list [flags] +``` + +### Options + +```sh + -h, --help help for list + --name string Name of the project + --page int Page number (default 1) + --page-size int Size of per page (default 10) + --public Project is public or private + -q, --query string Query string to query resources + --sort string Sort the resource list in ascending or descending order +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor project](harbor-project.md) - Manage projects and assign resources to them + diff --git a/content/cli-docs/cli-docs/harbor-project-logs.md b/content/cli-docs/cli-docs/harbor-project-logs.md new file mode 100644 index 000000000..c4d046ae3 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-project-logs.md @@ -0,0 +1,32 @@ +--- +title: harbor project logs +weight: 90 +--- +## harbor project logs + +### Description + +##### get project logs + +```sh +harbor project logs [flags] +``` + +### Options + +```sh + -h, --help help for logs +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor project](harbor-project.md) - Manage projects and assign resources to them + diff --git a/content/cli-docs/cli-docs/harbor-project-view.md b/content/cli-docs/cli-docs/harbor-project-view.md new file mode 100644 index 000000000..968c7aba3 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-project-view.md @@ -0,0 +1,32 @@ +--- +title: harbor project view +weight: 95 +--- +## harbor project view + +### Description + +##### get project by name or id + +```sh +harbor project view [NAME|ID] [flags] +``` + +### Options + +```sh + -h, --help help for view +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor project](harbor-project.md) - Manage projects and assign resources to them + diff --git a/content/cli-docs/cli-docs/harbor-project.md b/content/cli-docs/cli-docs/harbor-project.md new file mode 100644 index 000000000..d18b6b554 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-project.md @@ -0,0 +1,43 @@ +--- +title: harbor project +weight: 75 +--- +## harbor project + +### Description + +##### Manage projects and assign resources to them + +### Synopsis + +Manage projects in Harbor + +### Examples + +```sh + harbor project list +``` + +### Options + +```sh + -h, --help help for project +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor](harbor.md) - Official Harbor CLI +* [harbor project create](harbor-project-create.md) - create project +* [harbor project delete](harbor-project-delete.md) - delete project by name or id +* [harbor project list](harbor-project-list.md) - list project +* [harbor project logs](harbor-project-logs.md) - get project logs +* [harbor project view](harbor-project-view.md) - get project by name or id + diff --git a/content/cli-docs/cli-docs/harbor-registry-create.md b/content/cli-docs/cli-docs/harbor-registry-create.md new file mode 100644 index 000000000..99c6f31e5 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-registry-create.md @@ -0,0 +1,40 @@ +--- +title: harbor registry create +weight: 110 +--- +## harbor registry create + +### Description + +##### create registry + +```sh +harbor registry create [flags] +``` + +### Options + +```sh + --credential-access-key string Access key, e.g. user name when credential type is 'basic' + --credential-access-secret string Access secret, e.g. password when credential type is 'basic' + --credential-type string Credential type, such as 'basic', 'oauth' (default "basic") + --description string Description of the registry + -h, --help help for create + --insecure Whether or not the certificate will be verified when Harbor tries to access the server (default true) + --name string Name of the registry + --type string Type of the registry (default "harbor") + --url string Registry endpoint URL +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor registry](harbor-registry.md) - Manage registries + diff --git a/content/cli-docs/cli-docs/harbor-registry-delete.md b/content/cli-docs/cli-docs/harbor-registry-delete.md new file mode 100644 index 000000000..f0e1b0ee4 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-registry-delete.md @@ -0,0 +1,32 @@ +--- +title: harbor registry delete +weight: 140 +--- +## harbor registry delete + +### Description + +##### delete registry by id + +```sh +harbor registry delete [flags] +``` + +### Options + +```sh + -h, --help help for delete +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor registry](harbor-registry.md) - Manage registries + diff --git a/content/cli-docs/cli-docs/harbor-registry-info.md b/content/cli-docs/cli-docs/harbor-registry-info.md new file mode 100644 index 000000000..2fd7fc45d --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-registry-info.md @@ -0,0 +1,32 @@ +--- +title: harbor registry info +weight: 120 +--- +## harbor registry info + +### Description + +##### get registry info + +```sh +harbor registry info [flags] +``` + +### Options + +```sh + -h, --help help for info +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor registry](harbor-registry.md) - Manage registries + diff --git a/content/cli-docs/cli-docs/harbor-registry-list.md b/content/cli-docs/cli-docs/harbor-registry-list.md new file mode 100644 index 000000000..2a230059a --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-registry-list.md @@ -0,0 +1,36 @@ +--- +title: harbor registry list +weight: 115 +--- +## harbor registry list + +### Description + +##### list registry + +```sh +harbor registry list [flags] +``` + +### Options + +```sh + -h, --help help for list + --page int Page number (default 1) + --page-size int Size of per page (default 10) + -q, --query string Query string to query resources + --sort string Sort the resource list in ascending or descending order +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor registry](harbor-registry.md) - Manage registries + diff --git a/content/cli-docs/cli-docs/harbor-registry-update.md b/content/cli-docs/cli-docs/harbor-registry-update.md new file mode 100644 index 000000000..7c4a43022 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-registry-update.md @@ -0,0 +1,40 @@ +--- +title: harbor registry update +weight: 125 +--- +## harbor registry update + +### Description + +##### update registry + +```sh +harbor registry update [flags] +``` + +### Options + +```sh + --credential-access-key string Access key, e.g. user name when credential type is 'basic' + --credential-access-secret string Access secret, e.g. password when credential type is 'basic' + --credential-type string Credential type, such as 'basic', 'oauth' + --description string Description of the registry + -h, --help help for update + --insecure Whether or not the certificate will be verified when Harbor tries to access the server (default true) + --name string Name of the registry + --type string Type of the registry + --url string Registry endpoint URL +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor registry](harbor-registry.md) - Manage registries + diff --git a/content/cli-docs/cli-docs/harbor-registry-view.md b/content/cli-docs/cli-docs/harbor-registry-view.md new file mode 100644 index 000000000..62451e95c --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-registry-view.md @@ -0,0 +1,32 @@ +--- +title: harbor registry view +weight: 130 +--- +## harbor registry view + +### Description + +##### get registry by id + +```sh +harbor registry view [flags] +``` + +### Options + +```sh + -h, --help help for view +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor registry](harbor-registry.md) - Manage registries + diff --git a/content/cli-docs/cli-docs/harbor-registry.md b/content/cli-docs/cli-docs/harbor-registry.md new file mode 100644 index 000000000..ce862d95d --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-registry.md @@ -0,0 +1,44 @@ +--- +title: harbor registry +weight: 105 +--- +## harbor registry + +### Description + +##### Manage registries + +### Synopsis + +Manage registries in Harbor + +### Examples + +```sh + harbor registry list +``` + +### Options + +```sh + -h, --help help for registry +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor](harbor.md) - Official Harbor CLI +* [harbor registry create](harbor-registry-create.md) - create registry +* [harbor registry delete](harbor-registry-delete.md) - delete registry by id +* [harbor registry info](harbor-registry-info.md) - get registry info +* [harbor registry list](harbor-registry-list.md) - list registry +* [harbor registry update](harbor-registry-update.md) - update registry +* [harbor registry view](harbor-registry-view.md) - get registry by id + diff --git a/content/cli-docs/cli-docs/harbor-repo-delete.md b/content/cli-docs/cli-docs/harbor-repo-delete.md new file mode 100644 index 000000000..36e3bc342 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-repo-delete.md @@ -0,0 +1,42 @@ +--- +title: harbor repo delete +weight: 160 +--- +## harbor repo delete + +### Description + +##### Delete a repository + +### Synopsis + +Delete a repository within a project in Harbor + +```sh +harbor repo delete [flags] +``` + +### Examples + +```sh + harbor repository delete [project_name]/[repository_name] +``` + +### Options + +```sh + -h, --help help for delete +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor repo](harbor-repo.md) - Manage repositories + diff --git a/content/cli-docs/cli-docs/harbor-repo-info.md b/content/cli-docs/cli-docs/harbor-repo-info.md new file mode 100644 index 000000000..e1aaaeaf6 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-repo-info.md @@ -0,0 +1,42 @@ +--- +title: harbor repo info +weight: 155 +--- +## harbor repo info + +### Description + +##### Get repository information + +### Synopsis + +Get information of a particular repository in a project + +```sh +harbor repo info [flags] +``` + +### Examples + +```sh + harbor repo info / +``` + +### Options + +```sh + -h, --help help for info +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor repo](harbor-repo.md) - Manage repositories + diff --git a/content/cli-docs/cli-docs/harbor-repo-list.md b/content/cli-docs/cli-docs/harbor-repo-list.md new file mode 100644 index 000000000..5274a5429 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-repo-list.md @@ -0,0 +1,32 @@ +--- +title: harbor repo list +weight: 150 +--- +## harbor repo list + +### Description + +##### list repositories within a project + +```sh +harbor repo list [flags] +``` + +### Options + +```sh + -h, --help help for list +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor repo](harbor-repo.md) - Manage repositories + diff --git a/content/cli-docs/cli-docs/harbor-repo.md b/content/cli-docs/cli-docs/harbor-repo.md new file mode 100644 index 000000000..6a3538e7b --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-repo.md @@ -0,0 +1,35 @@ +--- +title: harbor repo +weight: 145 +--- +## harbor repo + +### Description + +##### Manage repositories + +### Synopsis + +Manage repositories in Harbor context + +### Options + +```sh + -h, --help help for repo +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor](harbor.md) - Official Harbor CLI +* [harbor repo delete](harbor-repo-delete.md) - Delete a repository +* [harbor repo info](harbor-repo-info.md) - Get repository information +* [harbor repo list](harbor-repo-list.md) - list repositories within a project + diff --git a/content/cli-docs/cli-docs/harbor-user-create.md b/content/cli-docs/cli-docs/harbor-user-create.md new file mode 100644 index 000000000..8337ac0a0 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-user-create.md @@ -0,0 +1,37 @@ +--- +title: harbor user create +weight: 170 +--- +## harbor user create + +### Description + +##### create user + +```sh +harbor user create [flags] +``` + +### Options + +```sh + --comment string Comment + --email string Email + -h, --help help for create + --password string Password + --realname string Realname + --username string Username +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor user](harbor-user.md) - Manage users + diff --git a/content/cli-docs/cli-docs/harbor-user-delete.md b/content/cli-docs/cli-docs/harbor-user-delete.md new file mode 100644 index 000000000..f443621fe --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-user-delete.md @@ -0,0 +1,32 @@ +--- +title: harbor user delete +weight: 185 +--- +## harbor user delete + +### Description + +##### delete user + +```sh +harbor user delete [flags] +``` + +### Options + +```sh + -h, --help help for delete +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor user](harbor-user.md) - Manage users + diff --git a/content/cli-docs/cli-docs/harbor-user-elevate.md b/content/cli-docs/cli-docs/harbor-user-elevate.md new file mode 100644 index 000000000..42011e8fb --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-user-elevate.md @@ -0,0 +1,36 @@ +--- +title: harbor user elevate +weight: 180 +--- +## harbor user elevate + +### Description + +##### elevate user + +### Synopsis + +elevate user to admin role + +```sh +harbor user elevate [flags] +``` + +### Options + +```sh + -h, --help help for elevate +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor user](harbor-user.md) - Manage users + diff --git a/content/cli-docs/cli-docs/harbor-user-list.md b/content/cli-docs/cli-docs/harbor-user-list.md new file mode 100644 index 000000000..fed5f4641 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-user-list.md @@ -0,0 +1,32 @@ +--- +title: harbor user list +weight: 175 +--- +## harbor user list + +### Description + +##### list users + +```sh +harbor user list [flags] +``` + +### Options + +```sh + -h, --help help for list +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor user](harbor-user.md) - Manage users + diff --git a/content/cli-docs/cli-docs/harbor-user.md b/content/cli-docs/cli-docs/harbor-user.md new file mode 100644 index 000000000..f41bb4809 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-user.md @@ -0,0 +1,42 @@ +--- +title: harbor user +weight: 165 +--- +## harbor user + +### Description + +##### Manage users + +### Synopsis + +Manage users in Harbor + +### Examples + +```sh + harbor user list +``` + +### Options + +```sh + -h, --help help for user +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor](harbor.md) - Official Harbor CLI +* [harbor user create](harbor-user-create.md) - create user +* [harbor user delete](harbor-user-delete.md) - delete user +* [harbor user elevate](harbor-user-elevate.md) - elevate user +* [harbor user list](harbor-user-list.md) - list users + diff --git a/content/cli-docs/cli-docs/harbor-version.md b/content/cli-docs/cli-docs/harbor-version.md new file mode 100644 index 000000000..e7fc4cc97 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-version.md @@ -0,0 +1,42 @@ +--- +title: harbor version +weight: 10 +--- +## harbor version + +### Description + +##### Version of Harbor CLI + +### Synopsis + +Get Harbor CLI version, git commit, go version, build time, release channel, os/arch, etc. + +```sh +harbor version [flags] +``` + +### Examples + +```sh + harbor version +``` + +### Options + +```sh + -h, --help help for version +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor](harbor.md) - Official Harbor CLI + diff --git a/content/cli-docs/cli-docs/harbor.md b/content/cli-docs/cli-docs/harbor.md new file mode 100644 index 000000000..5b7f98e8d --- /dev/null +++ b/content/cli-docs/cli-docs/harbor.md @@ -0,0 +1,45 @@ +--- +title: harbor +weight: 5 +--- +## harbor + +### Description + +##### Official Harbor CLI + +### Synopsis + +Official Harbor CLI + +### Examples + +```sh + +// Base command: +harbor + +// Display help about the command: +harbor help + +``` + +### Options + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -h, --help help for harbor + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor artifact](harbor-artifact.md) - Manage artifacts +* [harbor login](harbor-login.md) - Log in to Harbor registry +* [harbor project](harbor-project.md) - Manage projects and assign resources to them +* [harbor registry](harbor-registry.md) - Manage registries +* [harbor repo](harbor-repo.md) - Manage repositories +* [harbor user](harbor-user.md) - Manage users +* [harbor version](harbor-version.md) - Version of Harbor CLI + diff --git a/layouts/cli-docs/list.html b/layouts/cli-docs/list.html new file mode 100644 index 000000000..f8c39d1ff --- /dev/null +++ b/layouts/cli-docs/list.html @@ -0,0 +1,8 @@ +{{ define "title" }} +{{ site.Title }} docs | {{ .Title }} +{{ end }} + +{{ define "main" }} +{{ partial "cli-docs/hero.html" . }} +{{ partial "cli-docs/layout.html" . }} +{{ end }} diff --git a/layouts/cli-docs/single.html b/layouts/cli-docs/single.html new file mode 100644 index 000000000..f8c39d1ff --- /dev/null +++ b/layouts/cli-docs/single.html @@ -0,0 +1,8 @@ +{{ define "title" }} +{{ site.Title }} docs | {{ .Title }} +{{ end }} + +{{ define "main" }} +{{ partial "cli-docs/hero.html" . }} +{{ partial "cli-docs/layout.html" . }} +{{ end }} diff --git a/layouts/partials/cli-docs/hero.html b/layouts/partials/cli-docs/hero.html new file mode 100644 index 000000000..f537dccbb --- /dev/null +++ b/layouts/partials/cli-docs/hero.html @@ -0,0 +1,19 @@ +{{ $title := .Title }} +{{ $desc := .Params.description }} + +
+
+
+
+

+ {{ .Title }} +

+ + {{ with $desc }} +

+ {{ . | markdownify }} +

+ {{ end }} +
+
+
diff --git a/layouts/partials/cli-docs/layout.html b/layouts/partials/cli-docs/layout.html new file mode 100644 index 000000000..77cf4e25e --- /dev/null +++ b/layouts/partials/cli-docs/layout.html @@ -0,0 +1,60 @@ +
+
+
+
+ +
+ +
+
+ {{ with .Content }} + {{ . }} + {{ end }} + + + {{ if (or .RegularPages .Sections) }} + {{ if .Content }} +
+ {{ end }} + + {{ with .Sections }} +

+ Subsections +

+ + + {{ end }} + + {{ with .RegularPages }} +

+ Pages in this section +

+ + + {{ end }} + {{ end }} +
+
+ + {{ partial "cli-docs/sidebar.html" . }} +
+
+
diff --git a/layouts/partials/cli-docs/menu.html b/layouts/partials/cli-docs/menu.html new file mode 100644 index 000000000..d12dc2b5c --- /dev/null +++ b/layouts/partials/cli-docs/menu.html @@ -0,0 +1,58 @@ +{{ $thisSection := .CurrentSection.RelPermalink }} +{{ $thisPage := .RelPermalink }} +{{ $docsSections := where site.Sections "Section" "cli-docs" }} +{{ $version := index (split .File.Path "/") 1 }} + + diff --git a/layouts/partials/cli-docs/sidebar.html b/layouts/partials/cli-docs/sidebar.html new file mode 100644 index 000000000..0ce3acd4b --- /dev/null +++ b/layouts/partials/cli-docs/sidebar.html @@ -0,0 +1,50 @@ +{{ $version := index (split .File.Path "/") 1 }} +{{ $pageSourceUrl := "https://github.com/goharbor/harbor-cli/tree/main/doc/cli-docs" }} +{{ $issues := "https://github.com/goharbor/harbor-cli/issues" }} +
+
+ {{ if gt (len .TableOfContents) 32 }} +

+ + + + + On this page + +

+ + {{ .TableOfContents }} + +

+ {{ end }} + +

+ + + + + Contributing + +

+ + +
+
From 13c196402376e67a9fc67706078592646b2a38e9 Mon Sep 17 00:00:00 2001 From: ALTHAF Date: Sat, 12 Oct 2024 21:06:40 +0530 Subject: [PATCH 02/12] deleted md files Signed-off-by: ALTHAF --- .../cli-docs/harbor-artifact-delete.md | 32 ------------- .../cli-docs/cli-docs/harbor-artifact-info.md | 42 ----------------- .../cli-docs/cli-docs/harbor-artifact-list.md | 32 ------------- .../cli-docs/harbor-artifact-scan-start.md | 42 ----------------- .../cli-docs/harbor-artifact-scan-stop.md | 42 ----------------- .../cli-docs/cli-docs/harbor-artifact-scan.md | 40 ----------------- .../cli-docs/harbor-artifact-tags-create.md | 38 ---------------- .../cli-docs/harbor-artifact-tags-delete.md | 38 ---------------- .../cli-docs/harbor-artifact-tags-list.md | 38 ---------------- .../cli-docs/cli-docs/harbor-artifact-tags.md | 37 --------------- content/cli-docs/cli-docs/harbor-artifact.md | 43 ------------------ content/cli-docs/cli-docs/harbor-login.md | 39 ---------------- .../cli-docs/harbor-project-create.md | 37 --------------- .../cli-docs/harbor-project-delete.md | 32 ------------- .../cli-docs/cli-docs/harbor-project-list.md | 38 ---------------- .../cli-docs/cli-docs/harbor-project-logs.md | 32 ------------- .../cli-docs/cli-docs/harbor-project-view.md | 32 ------------- content/cli-docs/cli-docs/harbor-project.md | 43 ------------------ .../cli-docs/harbor-registry-create.md | 40 ----------------- .../cli-docs/harbor-registry-delete.md | 32 ------------- .../cli-docs/cli-docs/harbor-registry-info.md | 32 ------------- .../cli-docs/cli-docs/harbor-registry-list.md | 36 --------------- .../cli-docs/harbor-registry-update.md | 40 ----------------- .../cli-docs/cli-docs/harbor-registry-view.md | 32 ------------- content/cli-docs/cli-docs/harbor-registry.md | 44 ------------------ .../cli-docs/cli-docs/harbor-repo-delete.md | 42 ----------------- content/cli-docs/cli-docs/harbor-repo-info.md | 42 ----------------- content/cli-docs/cli-docs/harbor-repo-list.md | 32 ------------- content/cli-docs/cli-docs/harbor-repo.md | 35 --------------- .../cli-docs/cli-docs/harbor-user-create.md | 37 --------------- .../cli-docs/cli-docs/harbor-user-delete.md | 32 ------------- .../cli-docs/cli-docs/harbor-user-elevate.md | 36 --------------- content/cli-docs/cli-docs/harbor-user-list.md | 32 ------------- content/cli-docs/cli-docs/harbor-user.md | 42 ----------------- content/cli-docs/cli-docs/harbor-version.md | 42 ----------------- content/cli-docs/cli-docs/harbor.md | 45 ------------------- load-docs.sh | 3 ++ 37 files changed, 3 insertions(+), 1350 deletions(-) delete mode 100644 content/cli-docs/cli-docs/harbor-artifact-delete.md delete mode 100644 content/cli-docs/cli-docs/harbor-artifact-info.md delete mode 100644 content/cli-docs/cli-docs/harbor-artifact-list.md delete mode 100644 content/cli-docs/cli-docs/harbor-artifact-scan-start.md delete mode 100644 content/cli-docs/cli-docs/harbor-artifact-scan-stop.md delete mode 100644 content/cli-docs/cli-docs/harbor-artifact-scan.md delete mode 100644 content/cli-docs/cli-docs/harbor-artifact-tags-create.md delete mode 100644 content/cli-docs/cli-docs/harbor-artifact-tags-delete.md delete mode 100644 content/cli-docs/cli-docs/harbor-artifact-tags-list.md delete mode 100644 content/cli-docs/cli-docs/harbor-artifact-tags.md delete mode 100644 content/cli-docs/cli-docs/harbor-artifact.md delete mode 100644 content/cli-docs/cli-docs/harbor-login.md delete mode 100644 content/cli-docs/cli-docs/harbor-project-create.md delete mode 100644 content/cli-docs/cli-docs/harbor-project-delete.md delete mode 100644 content/cli-docs/cli-docs/harbor-project-list.md delete mode 100644 content/cli-docs/cli-docs/harbor-project-logs.md delete mode 100644 content/cli-docs/cli-docs/harbor-project-view.md delete mode 100644 content/cli-docs/cli-docs/harbor-project.md delete mode 100644 content/cli-docs/cli-docs/harbor-registry-create.md delete mode 100644 content/cli-docs/cli-docs/harbor-registry-delete.md delete mode 100644 content/cli-docs/cli-docs/harbor-registry-info.md delete mode 100644 content/cli-docs/cli-docs/harbor-registry-list.md delete mode 100644 content/cli-docs/cli-docs/harbor-registry-update.md delete mode 100644 content/cli-docs/cli-docs/harbor-registry-view.md delete mode 100644 content/cli-docs/cli-docs/harbor-registry.md delete mode 100644 content/cli-docs/cli-docs/harbor-repo-delete.md delete mode 100644 content/cli-docs/cli-docs/harbor-repo-info.md delete mode 100644 content/cli-docs/cli-docs/harbor-repo-list.md delete mode 100644 content/cli-docs/cli-docs/harbor-repo.md delete mode 100644 content/cli-docs/cli-docs/harbor-user-create.md delete mode 100644 content/cli-docs/cli-docs/harbor-user-delete.md delete mode 100644 content/cli-docs/cli-docs/harbor-user-elevate.md delete mode 100644 content/cli-docs/cli-docs/harbor-user-list.md delete mode 100644 content/cli-docs/cli-docs/harbor-user.md delete mode 100644 content/cli-docs/cli-docs/harbor-version.md delete mode 100644 content/cli-docs/cli-docs/harbor.md diff --git a/content/cli-docs/cli-docs/harbor-artifact-delete.md b/content/cli-docs/cli-docs/harbor-artifact-delete.md deleted file mode 100644 index fd4d9ca6a..000000000 --- a/content/cli-docs/cli-docs/harbor-artifact-delete.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: harbor artifact delete -weight: 35 ---- -## harbor artifact delete - -### Description - -##### delete an artifact - -```sh -harbor artifact delete [flags] -``` - -### Options - -```sh - -h, --help help for delete -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor artifact](harbor-artifact.md) - Manage artifacts - diff --git a/content/cli-docs/cli-docs/harbor-artifact-info.md b/content/cli-docs/cli-docs/harbor-artifact-info.md deleted file mode 100644 index 55157e9a5..000000000 --- a/content/cli-docs/cli-docs/harbor-artifact-info.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: harbor artifact info -weight: 25 ---- -## harbor artifact info - -### Description - -##### Get info of an artifact - -### Synopsis - -Get info of an artifact - -```sh -harbor artifact info [flags] -``` - -### Examples - -```sh -harbor artifact info // -``` - -### Options - -```sh - -h, --help help for info -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor artifact](harbor-artifact.md) - Manage artifacts - diff --git a/content/cli-docs/cli-docs/harbor-artifact-list.md b/content/cli-docs/cli-docs/harbor-artifact-list.md deleted file mode 100644 index dd02b30af..000000000 --- a/content/cli-docs/cli-docs/harbor-artifact-list.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: harbor artifact list -weight: 30 ---- -## harbor artifact list - -### Description - -##### list artifacts within a repository - -```sh -harbor artifact list [flags] -``` - -### Options - -```sh - -h, --help help for list -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor artifact](harbor-artifact.md) - Manage artifacts - diff --git a/content/cli-docs/cli-docs/harbor-artifact-scan-start.md b/content/cli-docs/cli-docs/harbor-artifact-scan-start.md deleted file mode 100644 index 31652afe3..000000000 --- a/content/cli-docs/cli-docs/harbor-artifact-scan-start.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: harbor artifact scan start -weight: 45 ---- -## harbor artifact scan start - -### Description - -##### Start a scan of an artifact - -### Synopsis - -Start a scan of an artifact in Harbor Repository - -```sh -harbor artifact scan start [flags] -``` - -### Examples - -```sh -harbor artifact scan start // -``` - -### Options - -```sh - -h, --help help for start -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor artifact scan](harbor-artifact-scan.md) - Scan an artifact - diff --git a/content/cli-docs/cli-docs/harbor-artifact-scan-stop.md b/content/cli-docs/cli-docs/harbor-artifact-scan-stop.md deleted file mode 100644 index 781c6ad26..000000000 --- a/content/cli-docs/cli-docs/harbor-artifact-scan-stop.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: harbor artifact scan stop -weight: 50 ---- -## harbor artifact scan stop - -### Description - -##### Stop a scan of an artifact - -### Synopsis - -Stop a scan of an artifact in Harbor Repository - -```sh -harbor artifact scan stop [flags] -``` - -### Examples - -```sh -harbor artifact scan stop // -``` - -### Options - -```sh - -h, --help help for stop -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor artifact scan](harbor-artifact-scan.md) - Scan an artifact - diff --git a/content/cli-docs/cli-docs/harbor-artifact-scan.md b/content/cli-docs/cli-docs/harbor-artifact-scan.md deleted file mode 100644 index c5af733e7..000000000 --- a/content/cli-docs/cli-docs/harbor-artifact-scan.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: harbor artifact scan -weight: 40 ---- -## harbor artifact scan - -### Description - -##### Scan an artifact - -### Synopsis - -Scan an artifact in Harbor Repository - -### Examples - -```sh -harbor artifact scan start // -``` - -### Options - -```sh - -h, --help help for scan -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor artifact](harbor-artifact.md) - Manage artifacts -* [harbor artifact scan start](harbor-artifact-scan-start.md) - Start a scan of an artifact -* [harbor artifact scan stop](harbor-artifact-scan-stop.md) - Stop a scan of an artifact - diff --git a/content/cli-docs/cli-docs/harbor-artifact-tags-create.md b/content/cli-docs/cli-docs/harbor-artifact-tags-create.md deleted file mode 100644 index 236c3d82f..000000000 --- a/content/cli-docs/cli-docs/harbor-artifact-tags-create.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: harbor artifact tags create -weight: 60 ---- -## harbor artifact tags create - -### Description - -##### Create a tag of an artifact - -```sh -harbor artifact tags create [flags] -``` - -### Examples - -```sh -harbor artifact tags create // -``` - -### Options - -```sh - -h, --help help for create -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor artifact tags](harbor-artifact-tags.md) - Manage tags of an artifact - diff --git a/content/cli-docs/cli-docs/harbor-artifact-tags-delete.md b/content/cli-docs/cli-docs/harbor-artifact-tags-delete.md deleted file mode 100644 index b5b2e15e1..000000000 --- a/content/cli-docs/cli-docs/harbor-artifact-tags-delete.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: harbor artifact tags delete -weight: 70 ---- -## harbor artifact tags delete - -### Description - -##### Delete a tag of an artifact - -```sh -harbor artifact tags delete [flags] -``` - -### Examples - -```sh -harbor artifact tags delete // -``` - -### Options - -```sh - -h, --help help for delete -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor artifact tags](harbor-artifact-tags.md) - Manage tags of an artifact - diff --git a/content/cli-docs/cli-docs/harbor-artifact-tags-list.md b/content/cli-docs/cli-docs/harbor-artifact-tags-list.md deleted file mode 100644 index 169ec9501..000000000 --- a/content/cli-docs/cli-docs/harbor-artifact-tags-list.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: harbor artifact tags list -weight: 65 ---- -## harbor artifact tags list - -### Description - -##### List tags of an artifact - -```sh -harbor artifact tags list [flags] -``` - -### Examples - -```sh -harbor artifact tags list // -``` - -### Options - -```sh - -h, --help help for list -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor artifact tags](harbor-artifact-tags.md) - Manage tags of an artifact - diff --git a/content/cli-docs/cli-docs/harbor-artifact-tags.md b/content/cli-docs/cli-docs/harbor-artifact-tags.md deleted file mode 100644 index 683dd452b..000000000 --- a/content/cli-docs/cli-docs/harbor-artifact-tags.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: harbor artifact tags -weight: 55 ---- -## harbor artifact tags - -### Description - -##### Manage tags of an artifact - -### Examples - -```sh - harbor artifact tags list // -``` - -### Options - -```sh - -h, --help help for tags -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor artifact](harbor-artifact.md) - Manage artifacts -* [harbor artifact tags create](harbor-artifact-tags-create.md) - Create a tag of an artifact -* [harbor artifact tags delete](harbor-artifact-tags-delete.md) - Delete a tag of an artifact -* [harbor artifact tags list](harbor-artifact-tags-list.md) - List tags of an artifact - diff --git a/content/cli-docs/cli-docs/harbor-artifact.md b/content/cli-docs/cli-docs/harbor-artifact.md deleted file mode 100644 index c267dae89..000000000 --- a/content/cli-docs/cli-docs/harbor-artifact.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: harbor artifact -weight: 20 ---- -## harbor artifact - -### Description - -##### Manage artifacts - -### Synopsis - -Manage artifacts in Harbor Repository - -### Examples - -```sh - harbor artifact list -``` - -### Options - -```sh - -h, --help help for artifact -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor](harbor.md) - Official Harbor CLI -* [harbor artifact delete](harbor-artifact-delete.md) - delete an artifact -* [harbor artifact info](harbor-artifact-info.md) - Get info of an artifact -* [harbor artifact list](harbor-artifact-list.md) - list artifacts within a repository -* [harbor artifact scan](harbor-artifact-scan.md) - Scan an artifact -* [harbor artifact tags](harbor-artifact-tags.md) - Manage tags of an artifact - diff --git a/content/cli-docs/cli-docs/harbor-login.md b/content/cli-docs/cli-docs/harbor-login.md deleted file mode 100644 index 4e4018298..000000000 --- a/content/cli-docs/cli-docs/harbor-login.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: harbor login -weight: 15 ---- -## harbor login - -### Description - -##### Log in to Harbor registry - -### Synopsis - -Authenticate with Harbor Registry. - -```sh -harbor login [server] [flags] -``` - -### Options - -```sh - -h, --help help for login - --name string name for the set of credentials - -p, --password string Password - -u, --username string Username -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor](harbor.md) - Official Harbor CLI - diff --git a/content/cli-docs/cli-docs/harbor-project-create.md b/content/cli-docs/cli-docs/harbor-project-create.md deleted file mode 100644 index fcea0a3c0..000000000 --- a/content/cli-docs/cli-docs/harbor-project-create.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: harbor project create -weight: 80 ---- -## harbor project create - -### Description - -##### create project - -```sh -harbor project create [flags] -``` - -### Options - -```sh - -h, --help help for create - --name string Name of the project - --proxy-cache Whether the project is a proxy cache project - --public Project is public or private (default true) - --registry-id string ID of referenced registry when creating the proxy cache project - --storage-limit string Storage quota of the project (default "-1") -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor project](harbor-project.md) - Manage projects and assign resources to them - diff --git a/content/cli-docs/cli-docs/harbor-project-delete.md b/content/cli-docs/cli-docs/harbor-project-delete.md deleted file mode 100644 index fffdcf616..000000000 --- a/content/cli-docs/cli-docs/harbor-project-delete.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: harbor project delete -weight: 100 ---- -## harbor project delete - -### Description - -##### delete project by name or id - -```sh -harbor project delete [flags] -``` - -### Options - -```sh - -h, --help help for delete -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor project](harbor-project.md) - Manage projects and assign resources to them - diff --git a/content/cli-docs/cli-docs/harbor-project-list.md b/content/cli-docs/cli-docs/harbor-project-list.md deleted file mode 100644 index 41d6ed66a..000000000 --- a/content/cli-docs/cli-docs/harbor-project-list.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: harbor project list -weight: 85 ---- -## harbor project list - -### Description - -##### list project - -```sh -harbor project list [flags] -``` - -### Options - -```sh - -h, --help help for list - --name string Name of the project - --page int Page number (default 1) - --page-size int Size of per page (default 10) - --public Project is public or private - -q, --query string Query string to query resources - --sort string Sort the resource list in ascending or descending order -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor project](harbor-project.md) - Manage projects and assign resources to them - diff --git a/content/cli-docs/cli-docs/harbor-project-logs.md b/content/cli-docs/cli-docs/harbor-project-logs.md deleted file mode 100644 index c4d046ae3..000000000 --- a/content/cli-docs/cli-docs/harbor-project-logs.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: harbor project logs -weight: 90 ---- -## harbor project logs - -### Description - -##### get project logs - -```sh -harbor project logs [flags] -``` - -### Options - -```sh - -h, --help help for logs -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor project](harbor-project.md) - Manage projects and assign resources to them - diff --git a/content/cli-docs/cli-docs/harbor-project-view.md b/content/cli-docs/cli-docs/harbor-project-view.md deleted file mode 100644 index 968c7aba3..000000000 --- a/content/cli-docs/cli-docs/harbor-project-view.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: harbor project view -weight: 95 ---- -## harbor project view - -### Description - -##### get project by name or id - -```sh -harbor project view [NAME|ID] [flags] -``` - -### Options - -```sh - -h, --help help for view -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor project](harbor-project.md) - Manage projects and assign resources to them - diff --git a/content/cli-docs/cli-docs/harbor-project.md b/content/cli-docs/cli-docs/harbor-project.md deleted file mode 100644 index d18b6b554..000000000 --- a/content/cli-docs/cli-docs/harbor-project.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: harbor project -weight: 75 ---- -## harbor project - -### Description - -##### Manage projects and assign resources to them - -### Synopsis - -Manage projects in Harbor - -### Examples - -```sh - harbor project list -``` - -### Options - -```sh - -h, --help help for project -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor](harbor.md) - Official Harbor CLI -* [harbor project create](harbor-project-create.md) - create project -* [harbor project delete](harbor-project-delete.md) - delete project by name or id -* [harbor project list](harbor-project-list.md) - list project -* [harbor project logs](harbor-project-logs.md) - get project logs -* [harbor project view](harbor-project-view.md) - get project by name or id - diff --git a/content/cli-docs/cli-docs/harbor-registry-create.md b/content/cli-docs/cli-docs/harbor-registry-create.md deleted file mode 100644 index 99c6f31e5..000000000 --- a/content/cli-docs/cli-docs/harbor-registry-create.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: harbor registry create -weight: 110 ---- -## harbor registry create - -### Description - -##### create registry - -```sh -harbor registry create [flags] -``` - -### Options - -```sh - --credential-access-key string Access key, e.g. user name when credential type is 'basic' - --credential-access-secret string Access secret, e.g. password when credential type is 'basic' - --credential-type string Credential type, such as 'basic', 'oauth' (default "basic") - --description string Description of the registry - -h, --help help for create - --insecure Whether or not the certificate will be verified when Harbor tries to access the server (default true) - --name string Name of the registry - --type string Type of the registry (default "harbor") - --url string Registry endpoint URL -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor registry](harbor-registry.md) - Manage registries - diff --git a/content/cli-docs/cli-docs/harbor-registry-delete.md b/content/cli-docs/cli-docs/harbor-registry-delete.md deleted file mode 100644 index f0e1b0ee4..000000000 --- a/content/cli-docs/cli-docs/harbor-registry-delete.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: harbor registry delete -weight: 140 ---- -## harbor registry delete - -### Description - -##### delete registry by id - -```sh -harbor registry delete [flags] -``` - -### Options - -```sh - -h, --help help for delete -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor registry](harbor-registry.md) - Manage registries - diff --git a/content/cli-docs/cli-docs/harbor-registry-info.md b/content/cli-docs/cli-docs/harbor-registry-info.md deleted file mode 100644 index 2fd7fc45d..000000000 --- a/content/cli-docs/cli-docs/harbor-registry-info.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: harbor registry info -weight: 120 ---- -## harbor registry info - -### Description - -##### get registry info - -```sh -harbor registry info [flags] -``` - -### Options - -```sh - -h, --help help for info -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor registry](harbor-registry.md) - Manage registries - diff --git a/content/cli-docs/cli-docs/harbor-registry-list.md b/content/cli-docs/cli-docs/harbor-registry-list.md deleted file mode 100644 index 2a230059a..000000000 --- a/content/cli-docs/cli-docs/harbor-registry-list.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: harbor registry list -weight: 115 ---- -## harbor registry list - -### Description - -##### list registry - -```sh -harbor registry list [flags] -``` - -### Options - -```sh - -h, --help help for list - --page int Page number (default 1) - --page-size int Size of per page (default 10) - -q, --query string Query string to query resources - --sort string Sort the resource list in ascending or descending order -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor registry](harbor-registry.md) - Manage registries - diff --git a/content/cli-docs/cli-docs/harbor-registry-update.md b/content/cli-docs/cli-docs/harbor-registry-update.md deleted file mode 100644 index 7c4a43022..000000000 --- a/content/cli-docs/cli-docs/harbor-registry-update.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: harbor registry update -weight: 125 ---- -## harbor registry update - -### Description - -##### update registry - -```sh -harbor registry update [flags] -``` - -### Options - -```sh - --credential-access-key string Access key, e.g. user name when credential type is 'basic' - --credential-access-secret string Access secret, e.g. password when credential type is 'basic' - --credential-type string Credential type, such as 'basic', 'oauth' - --description string Description of the registry - -h, --help help for update - --insecure Whether or not the certificate will be verified when Harbor tries to access the server (default true) - --name string Name of the registry - --type string Type of the registry - --url string Registry endpoint URL -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor registry](harbor-registry.md) - Manage registries - diff --git a/content/cli-docs/cli-docs/harbor-registry-view.md b/content/cli-docs/cli-docs/harbor-registry-view.md deleted file mode 100644 index 62451e95c..000000000 --- a/content/cli-docs/cli-docs/harbor-registry-view.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: harbor registry view -weight: 130 ---- -## harbor registry view - -### Description - -##### get registry by id - -```sh -harbor registry view [flags] -``` - -### Options - -```sh - -h, --help help for view -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor registry](harbor-registry.md) - Manage registries - diff --git a/content/cli-docs/cli-docs/harbor-registry.md b/content/cli-docs/cli-docs/harbor-registry.md deleted file mode 100644 index ce862d95d..000000000 --- a/content/cli-docs/cli-docs/harbor-registry.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: harbor registry -weight: 105 ---- -## harbor registry - -### Description - -##### Manage registries - -### Synopsis - -Manage registries in Harbor - -### Examples - -```sh - harbor registry list -``` - -### Options - -```sh - -h, --help help for registry -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor](harbor.md) - Official Harbor CLI -* [harbor registry create](harbor-registry-create.md) - create registry -* [harbor registry delete](harbor-registry-delete.md) - delete registry by id -* [harbor registry info](harbor-registry-info.md) - get registry info -* [harbor registry list](harbor-registry-list.md) - list registry -* [harbor registry update](harbor-registry-update.md) - update registry -* [harbor registry view](harbor-registry-view.md) - get registry by id - diff --git a/content/cli-docs/cli-docs/harbor-repo-delete.md b/content/cli-docs/cli-docs/harbor-repo-delete.md deleted file mode 100644 index 36e3bc342..000000000 --- a/content/cli-docs/cli-docs/harbor-repo-delete.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: harbor repo delete -weight: 160 ---- -## harbor repo delete - -### Description - -##### Delete a repository - -### Synopsis - -Delete a repository within a project in Harbor - -```sh -harbor repo delete [flags] -``` - -### Examples - -```sh - harbor repository delete [project_name]/[repository_name] -``` - -### Options - -```sh - -h, --help help for delete -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor repo](harbor-repo.md) - Manage repositories - diff --git a/content/cli-docs/cli-docs/harbor-repo-info.md b/content/cli-docs/cli-docs/harbor-repo-info.md deleted file mode 100644 index e1aaaeaf6..000000000 --- a/content/cli-docs/cli-docs/harbor-repo-info.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: harbor repo info -weight: 155 ---- -## harbor repo info - -### Description - -##### Get repository information - -### Synopsis - -Get information of a particular repository in a project - -```sh -harbor repo info [flags] -``` - -### Examples - -```sh - harbor repo info / -``` - -### Options - -```sh - -h, --help help for info -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor repo](harbor-repo.md) - Manage repositories - diff --git a/content/cli-docs/cli-docs/harbor-repo-list.md b/content/cli-docs/cli-docs/harbor-repo-list.md deleted file mode 100644 index 5274a5429..000000000 --- a/content/cli-docs/cli-docs/harbor-repo-list.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: harbor repo list -weight: 150 ---- -## harbor repo list - -### Description - -##### list repositories within a project - -```sh -harbor repo list [flags] -``` - -### Options - -```sh - -h, --help help for list -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor repo](harbor-repo.md) - Manage repositories - diff --git a/content/cli-docs/cli-docs/harbor-repo.md b/content/cli-docs/cli-docs/harbor-repo.md deleted file mode 100644 index 6a3538e7b..000000000 --- a/content/cli-docs/cli-docs/harbor-repo.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: harbor repo -weight: 145 ---- -## harbor repo - -### Description - -##### Manage repositories - -### Synopsis - -Manage repositories in Harbor context - -### Options - -```sh - -h, --help help for repo -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor](harbor.md) - Official Harbor CLI -* [harbor repo delete](harbor-repo-delete.md) - Delete a repository -* [harbor repo info](harbor-repo-info.md) - Get repository information -* [harbor repo list](harbor-repo-list.md) - list repositories within a project - diff --git a/content/cli-docs/cli-docs/harbor-user-create.md b/content/cli-docs/cli-docs/harbor-user-create.md deleted file mode 100644 index 8337ac0a0..000000000 --- a/content/cli-docs/cli-docs/harbor-user-create.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: harbor user create -weight: 170 ---- -## harbor user create - -### Description - -##### create user - -```sh -harbor user create [flags] -``` - -### Options - -```sh - --comment string Comment - --email string Email - -h, --help help for create - --password string Password - --realname string Realname - --username string Username -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor user](harbor-user.md) - Manage users - diff --git a/content/cli-docs/cli-docs/harbor-user-delete.md b/content/cli-docs/cli-docs/harbor-user-delete.md deleted file mode 100644 index f443621fe..000000000 --- a/content/cli-docs/cli-docs/harbor-user-delete.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: harbor user delete -weight: 185 ---- -## harbor user delete - -### Description - -##### delete user - -```sh -harbor user delete [flags] -``` - -### Options - -```sh - -h, --help help for delete -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor user](harbor-user.md) - Manage users - diff --git a/content/cli-docs/cli-docs/harbor-user-elevate.md b/content/cli-docs/cli-docs/harbor-user-elevate.md deleted file mode 100644 index 42011e8fb..000000000 --- a/content/cli-docs/cli-docs/harbor-user-elevate.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: harbor user elevate -weight: 180 ---- -## harbor user elevate - -### Description - -##### elevate user - -### Synopsis - -elevate user to admin role - -```sh -harbor user elevate [flags] -``` - -### Options - -```sh - -h, --help help for elevate -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor user](harbor-user.md) - Manage users - diff --git a/content/cli-docs/cli-docs/harbor-user-list.md b/content/cli-docs/cli-docs/harbor-user-list.md deleted file mode 100644 index fed5f4641..000000000 --- a/content/cli-docs/cli-docs/harbor-user-list.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: harbor user list -weight: 175 ---- -## harbor user list - -### Description - -##### list users - -```sh -harbor user list [flags] -``` - -### Options - -```sh - -h, --help help for list -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor user](harbor-user.md) - Manage users - diff --git a/content/cli-docs/cli-docs/harbor-user.md b/content/cli-docs/cli-docs/harbor-user.md deleted file mode 100644 index f41bb4809..000000000 --- a/content/cli-docs/cli-docs/harbor-user.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: harbor user -weight: 165 ---- -## harbor user - -### Description - -##### Manage users - -### Synopsis - -Manage users in Harbor - -### Examples - -```sh - harbor user list -``` - -### Options - -```sh - -h, --help help for user -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor](harbor.md) - Official Harbor CLI -* [harbor user create](harbor-user-create.md) - create user -* [harbor user delete](harbor-user-delete.md) - delete user -* [harbor user elevate](harbor-user-elevate.md) - elevate user -* [harbor user list](harbor-user-list.md) - list users - diff --git a/content/cli-docs/cli-docs/harbor-version.md b/content/cli-docs/cli-docs/harbor-version.md deleted file mode 100644 index e7fc4cc97..000000000 --- a/content/cli-docs/cli-docs/harbor-version.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: harbor version -weight: 10 ---- -## harbor version - -### Description - -##### Version of Harbor CLI - -### Synopsis - -Get Harbor CLI version, git commit, go version, build time, release channel, os/arch, etc. - -```sh -harbor version [flags] -``` - -### Examples - -```sh - harbor version -``` - -### Options - -```sh - -h, --help help for version -``` - -### Options inherited from parent commands - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor](harbor.md) - Official Harbor CLI - diff --git a/content/cli-docs/cli-docs/harbor.md b/content/cli-docs/cli-docs/harbor.md deleted file mode 100644 index 5b7f98e8d..000000000 --- a/content/cli-docs/cli-docs/harbor.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: harbor -weight: 5 ---- -## harbor - -### Description - -##### Official Harbor CLI - -### Synopsis - -Official Harbor CLI - -### Examples - -```sh - -// Base command: -harbor - -// Display help about the command: -harbor help - -``` - -### Options - -```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") - -h, --help help for harbor - -o, --output-format string Output format. One of: json|yaml - -v, --verbose verbose output -``` - -### SEE ALSO - -* [harbor artifact](harbor-artifact.md) - Manage artifacts -* [harbor login](harbor-login.md) - Log in to Harbor registry -* [harbor project](harbor-project.md) - Manage projects and assign resources to them -* [harbor registry](harbor-registry.md) - Manage registries -* [harbor repo](harbor-repo.md) - Manage repositories -* [harbor user](harbor-user.md) - Manage users -* [harbor version](harbor-version.md) - Version of Harbor CLI - diff --git a/load-docs.sh b/load-docs.sh index 11bff75b5..89271c6ff 100755 --- a/load-docs.sh +++ b/load-docs.sh @@ -61,6 +61,9 @@ for release in ${ALL_RELEASES}; do PREV_MINOR_VER=${CUR_MINOR_VER} done +echo "Generating Harbor CLI Docs" +./cli-docs.sh + echo "Git version: ${GIT_VERSION}" echo "Saving current workspace state" From 5fed2bbe949043f006607e1e8e8cf2c8da017ce2 Mon Sep 17 00:00:00 2001 From: ALTHAF Date: Sat, 12 Oct 2024 01:08:26 +0530 Subject: [PATCH 03/12] Added Documentation for Harbor-CLI Signed-off-by: ALTHAF --- content/cli-docs/README.md | 62 +++---------------- content/cli-docs/cli-docs/_index.md | 4 ++ .../cli-docs/harbor-artifact-delete.md | 32 ++++++++++ .../cli-docs/cli-docs/harbor-artifact-info.md | 42 +++++++++++++ .../cli-docs/cli-docs/harbor-artifact-list.md | 32 ++++++++++ .../cli-docs/harbor-artifact-scan-start.md | 42 +++++++++++++ .../cli-docs/harbor-artifact-scan-stop.md | 42 +++++++++++++ .../cli-docs/cli-docs/harbor-artifact-scan.md | 40 ++++++++++++ .../cli-docs/harbor-artifact-tags-create.md | 38 ++++++++++++ .../cli-docs/harbor-artifact-tags-delete.md | 38 ++++++++++++ .../cli-docs/harbor-artifact-tags-list.md | 38 ++++++++++++ .../cli-docs/cli-docs/harbor-artifact-tags.md | 37 +++++++++++ content/cli-docs/cli-docs/harbor-artifact.md | 43 +++++++++++++ content/cli-docs/cli-docs/harbor-login.md | 39 ++++++++++++ .../cli-docs/harbor-project-create.md | 37 +++++++++++ .../cli-docs/harbor-project-delete.md | 32 ++++++++++ .../cli-docs/cli-docs/harbor-project-list.md | 38 ++++++++++++ .../cli-docs/cli-docs/harbor-project-logs.md | 32 ++++++++++ .../cli-docs/cli-docs/harbor-project-view.md | 32 ++++++++++ content/cli-docs/cli-docs/harbor-project.md | 43 +++++++++++++ .../cli-docs/harbor-registry-create.md | 40 ++++++++++++ .../cli-docs/harbor-registry-delete.md | 32 ++++++++++ .../cli-docs/cli-docs/harbor-registry-info.md | 32 ++++++++++ .../cli-docs/cli-docs/harbor-registry-list.md | 36 +++++++++++ .../cli-docs/harbor-registry-update.md | 40 ++++++++++++ .../cli-docs/cli-docs/harbor-registry-view.md | 32 ++++++++++ content/cli-docs/cli-docs/harbor-registry.md | 44 +++++++++++++ .../cli-docs/cli-docs/harbor-repo-delete.md | 42 +++++++++++++ content/cli-docs/cli-docs/harbor-repo-info.md | 42 +++++++++++++ content/cli-docs/cli-docs/harbor-repo-list.md | 32 ++++++++++ content/cli-docs/cli-docs/harbor-repo.md | 35 +++++++++++ .../cli-docs/cli-docs/harbor-user-create.md | 37 +++++++++++ .../cli-docs/cli-docs/harbor-user-delete.md | 32 ++++++++++ .../cli-docs/cli-docs/harbor-user-elevate.md | 36 +++++++++++ content/cli-docs/cli-docs/harbor-user-list.md | 32 ++++++++++ content/cli-docs/cli-docs/harbor-user.md | 42 +++++++++++++ content/cli-docs/cli-docs/harbor-version.md | 42 +++++++++++++ content/cli-docs/cli-docs/harbor.md | 45 ++++++++++++++ layouts/partials/navbar.html | 11 ++++ load-docs.sh | 2 +- 40 files changed, 1375 insertions(+), 54 deletions(-) create mode 100644 content/cli-docs/cli-docs/harbor-artifact-delete.md create mode 100644 content/cli-docs/cli-docs/harbor-artifact-info.md create mode 100644 content/cli-docs/cli-docs/harbor-artifact-list.md create mode 100644 content/cli-docs/cli-docs/harbor-artifact-scan-start.md create mode 100644 content/cli-docs/cli-docs/harbor-artifact-scan-stop.md create mode 100644 content/cli-docs/cli-docs/harbor-artifact-scan.md create mode 100644 content/cli-docs/cli-docs/harbor-artifact-tags-create.md create mode 100644 content/cli-docs/cli-docs/harbor-artifact-tags-delete.md create mode 100644 content/cli-docs/cli-docs/harbor-artifact-tags-list.md create mode 100644 content/cli-docs/cli-docs/harbor-artifact-tags.md create mode 100644 content/cli-docs/cli-docs/harbor-artifact.md create mode 100644 content/cli-docs/cli-docs/harbor-login.md create mode 100644 content/cli-docs/cli-docs/harbor-project-create.md create mode 100644 content/cli-docs/cli-docs/harbor-project-delete.md create mode 100644 content/cli-docs/cli-docs/harbor-project-list.md create mode 100644 content/cli-docs/cli-docs/harbor-project-logs.md create mode 100644 content/cli-docs/cli-docs/harbor-project-view.md create mode 100644 content/cli-docs/cli-docs/harbor-project.md create mode 100644 content/cli-docs/cli-docs/harbor-registry-create.md create mode 100644 content/cli-docs/cli-docs/harbor-registry-delete.md create mode 100644 content/cli-docs/cli-docs/harbor-registry-info.md create mode 100644 content/cli-docs/cli-docs/harbor-registry-list.md create mode 100644 content/cli-docs/cli-docs/harbor-registry-update.md create mode 100644 content/cli-docs/cli-docs/harbor-registry-view.md create mode 100644 content/cli-docs/cli-docs/harbor-registry.md create mode 100644 content/cli-docs/cli-docs/harbor-repo-delete.md create mode 100644 content/cli-docs/cli-docs/harbor-repo-info.md create mode 100644 content/cli-docs/cli-docs/harbor-repo-list.md create mode 100644 content/cli-docs/cli-docs/harbor-repo.md create mode 100644 content/cli-docs/cli-docs/harbor-user-create.md create mode 100644 content/cli-docs/cli-docs/harbor-user-delete.md create mode 100644 content/cli-docs/cli-docs/harbor-user-elevate.md create mode 100644 content/cli-docs/cli-docs/harbor-user-list.md create mode 100644 content/cli-docs/cli-docs/harbor-user.md create mode 100644 content/cli-docs/cli-docs/harbor-version.md create mode 100644 content/cli-docs/cli-docs/harbor.md diff --git a/content/cli-docs/README.md b/content/cli-docs/README.md index de75032c2..0ce84b8eb 100644 --- a/content/cli-docs/README.md +++ b/content/cli-docs/README.md @@ -1,57 +1,13 @@ -# Harbor CLI Documentation +Harbor CLI Documentation -Welcome to the Harbor CLI Documentation! This guide provides a comprehensive overview of the commands available in the Harbor CLI, which allows you to efficiently manage and interact with your Harbor registry. +This is the main table of contents for the Harbor CLI documentation. -## Overview -The Harbor CLI is designed to facilitate the management of your Harbor registry. It provides a range of commands that enable you to perform various operations efficiently. - -## Command Categories -The Harbor CLI commands are categorized by function: - -- **`harbor`**: Configure the Harbor CLI. -- **`harbor artifact`**: Manage artifacts in Harbor Repository. -- **`harbor project`**: Manage projects and assign resources to them. -- **`harbor registry`**: Manage registries in Harbor. -- **`harbor repo`**: Manage repositories in Harbor context. -- **`harbor user`**: Administer users in Harbor, including creating, updating, and managing user accounts. - -## Local Development - -### Step 1: Clone the Project -To get started, clone the repository using the following commands: - -```sh -git clone https://github.com/goharbor/website.git -cd website -``` - -### Step 2: View CLI documentation content -Navigate to the directory containing the CLI documentation: - -```sh -cd content/cli-docs/cli-docs -``` -The Markdown content for the Harbor CLI documentation is located in the cli-docs folder. - -### Step 3: Update Markdown Files -To ensure that your documentation is up to date with the latest files from the Harbor CLI repository, run: -```sh -make prepare -``` - -This command clones the harbor-cli repository, checks for any missing documentation files, and copies them into the website's directory. - -### Step 4: Run Hugo in server mode -Start a local Hugo server to preview your changes: -```sh -make serve -``` -This starts up the local Hugo server on http://localhost:1313. As you make changes, the site refreshes automatically in your browser. - -## Creating a Pull Request -If you wish to contribute, please make your changes to the Markdown files in the [cli-docs](./cli-docs/) folder. After making your changes, submit a pull request. - -## License -[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fgoharbor%2Fwebsite.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fgoharbor%2Fwebsite?ref=badge_large) +## Harbor CLI Documentation +This section provides detailed documentation for the Harbor CLI, which allows users to interact with the Harbor using command-line commands. +- [harbor artifact](cli-docs/harbor-artifact.md) +- [harbor project](cli-docs/harbor-project.md) +- [harbor registry](cli-docs/harbor-registry.md) +- [harbor repo](cli-docs/harbor-repo.md) +- [harbor user](cli-docs/harbor-user.md) diff --git a/content/cli-docs/cli-docs/_index.md b/content/cli-docs/cli-docs/_index.md index 3fdae08b5..5b4ad7ed6 100644 --- a/content/cli-docs/cli-docs/_index.md +++ b/content/cli-docs/cli-docs/_index.md @@ -5,7 +5,11 @@ weight: 25 This section describes the comprehensive set of commands provided by the Harbor CLI, which enables you to efficiently manage and interact with your Harbor registry. The Harbor CLI commands are categorized by function, +<<<<<<< HEAD - `harbor` - Configure the Harbor CLI. +======= +- `harbor` - Configure the Harbor CLI and set global flags to customize your experience. +>>>>>>> 862144c (Added Documentation for Harbor-CLI) - `harbor artifact` - Manage artifacts in Harbor Repository - `harbor project` - Manage projects and assign resources to them - `harbor registry` - Manage registries in Harbor diff --git a/content/cli-docs/cli-docs/harbor-artifact-delete.md b/content/cli-docs/cli-docs/harbor-artifact-delete.md new file mode 100644 index 000000000..fd4d9ca6a --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-artifact-delete.md @@ -0,0 +1,32 @@ +--- +title: harbor artifact delete +weight: 35 +--- +## harbor artifact delete + +### Description + +##### delete an artifact + +```sh +harbor artifact delete [flags] +``` + +### Options + +```sh + -h, --help help for delete +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor artifact](harbor-artifact.md) - Manage artifacts + diff --git a/content/cli-docs/cli-docs/harbor-artifact-info.md b/content/cli-docs/cli-docs/harbor-artifact-info.md new file mode 100644 index 000000000..55157e9a5 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-artifact-info.md @@ -0,0 +1,42 @@ +--- +title: harbor artifact info +weight: 25 +--- +## harbor artifact info + +### Description + +##### Get info of an artifact + +### Synopsis + +Get info of an artifact + +```sh +harbor artifact info [flags] +``` + +### Examples + +```sh +harbor artifact info // +``` + +### Options + +```sh + -h, --help help for info +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor artifact](harbor-artifact.md) - Manage artifacts + diff --git a/content/cli-docs/cli-docs/harbor-artifact-list.md b/content/cli-docs/cli-docs/harbor-artifact-list.md new file mode 100644 index 000000000..dd02b30af --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-artifact-list.md @@ -0,0 +1,32 @@ +--- +title: harbor artifact list +weight: 30 +--- +## harbor artifact list + +### Description + +##### list artifacts within a repository + +```sh +harbor artifact list [flags] +``` + +### Options + +```sh + -h, --help help for list +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor artifact](harbor-artifact.md) - Manage artifacts + diff --git a/content/cli-docs/cli-docs/harbor-artifact-scan-start.md b/content/cli-docs/cli-docs/harbor-artifact-scan-start.md new file mode 100644 index 000000000..31652afe3 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-artifact-scan-start.md @@ -0,0 +1,42 @@ +--- +title: harbor artifact scan start +weight: 45 +--- +## harbor artifact scan start + +### Description + +##### Start a scan of an artifact + +### Synopsis + +Start a scan of an artifact in Harbor Repository + +```sh +harbor artifact scan start [flags] +``` + +### Examples + +```sh +harbor artifact scan start // +``` + +### Options + +```sh + -h, --help help for start +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor artifact scan](harbor-artifact-scan.md) - Scan an artifact + diff --git a/content/cli-docs/cli-docs/harbor-artifact-scan-stop.md b/content/cli-docs/cli-docs/harbor-artifact-scan-stop.md new file mode 100644 index 000000000..781c6ad26 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-artifact-scan-stop.md @@ -0,0 +1,42 @@ +--- +title: harbor artifact scan stop +weight: 50 +--- +## harbor artifact scan stop + +### Description + +##### Stop a scan of an artifact + +### Synopsis + +Stop a scan of an artifact in Harbor Repository + +```sh +harbor artifact scan stop [flags] +``` + +### Examples + +```sh +harbor artifact scan stop // +``` + +### Options + +```sh + -h, --help help for stop +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor artifact scan](harbor-artifact-scan.md) - Scan an artifact + diff --git a/content/cli-docs/cli-docs/harbor-artifact-scan.md b/content/cli-docs/cli-docs/harbor-artifact-scan.md new file mode 100644 index 000000000..c5af733e7 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-artifact-scan.md @@ -0,0 +1,40 @@ +--- +title: harbor artifact scan +weight: 40 +--- +## harbor artifact scan + +### Description + +##### Scan an artifact + +### Synopsis + +Scan an artifact in Harbor Repository + +### Examples + +```sh +harbor artifact scan start // +``` + +### Options + +```sh + -h, --help help for scan +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor artifact](harbor-artifact.md) - Manage artifacts +* [harbor artifact scan start](harbor-artifact-scan-start.md) - Start a scan of an artifact +* [harbor artifact scan stop](harbor-artifact-scan-stop.md) - Stop a scan of an artifact + diff --git a/content/cli-docs/cli-docs/harbor-artifact-tags-create.md b/content/cli-docs/cli-docs/harbor-artifact-tags-create.md new file mode 100644 index 000000000..236c3d82f --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-artifact-tags-create.md @@ -0,0 +1,38 @@ +--- +title: harbor artifact tags create +weight: 60 +--- +## harbor artifact tags create + +### Description + +##### Create a tag of an artifact + +```sh +harbor artifact tags create [flags] +``` + +### Examples + +```sh +harbor artifact tags create // +``` + +### Options + +```sh + -h, --help help for create +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor artifact tags](harbor-artifact-tags.md) - Manage tags of an artifact + diff --git a/content/cli-docs/cli-docs/harbor-artifact-tags-delete.md b/content/cli-docs/cli-docs/harbor-artifact-tags-delete.md new file mode 100644 index 000000000..b5b2e15e1 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-artifact-tags-delete.md @@ -0,0 +1,38 @@ +--- +title: harbor artifact tags delete +weight: 70 +--- +## harbor artifact tags delete + +### Description + +##### Delete a tag of an artifact + +```sh +harbor artifact tags delete [flags] +``` + +### Examples + +```sh +harbor artifact tags delete // +``` + +### Options + +```sh + -h, --help help for delete +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor artifact tags](harbor-artifact-tags.md) - Manage tags of an artifact + diff --git a/content/cli-docs/cli-docs/harbor-artifact-tags-list.md b/content/cli-docs/cli-docs/harbor-artifact-tags-list.md new file mode 100644 index 000000000..169ec9501 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-artifact-tags-list.md @@ -0,0 +1,38 @@ +--- +title: harbor artifact tags list +weight: 65 +--- +## harbor artifact tags list + +### Description + +##### List tags of an artifact + +```sh +harbor artifact tags list [flags] +``` + +### Examples + +```sh +harbor artifact tags list // +``` + +### Options + +```sh + -h, --help help for list +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor artifact tags](harbor-artifact-tags.md) - Manage tags of an artifact + diff --git a/content/cli-docs/cli-docs/harbor-artifact-tags.md b/content/cli-docs/cli-docs/harbor-artifact-tags.md new file mode 100644 index 000000000..683dd452b --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-artifact-tags.md @@ -0,0 +1,37 @@ +--- +title: harbor artifact tags +weight: 55 +--- +## harbor artifact tags + +### Description + +##### Manage tags of an artifact + +### Examples + +```sh + harbor artifact tags list // +``` + +### Options + +```sh + -h, --help help for tags +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor artifact](harbor-artifact.md) - Manage artifacts +* [harbor artifact tags create](harbor-artifact-tags-create.md) - Create a tag of an artifact +* [harbor artifact tags delete](harbor-artifact-tags-delete.md) - Delete a tag of an artifact +* [harbor artifact tags list](harbor-artifact-tags-list.md) - List tags of an artifact + diff --git a/content/cli-docs/cli-docs/harbor-artifact.md b/content/cli-docs/cli-docs/harbor-artifact.md new file mode 100644 index 000000000..c267dae89 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-artifact.md @@ -0,0 +1,43 @@ +--- +title: harbor artifact +weight: 20 +--- +## harbor artifact + +### Description + +##### Manage artifacts + +### Synopsis + +Manage artifacts in Harbor Repository + +### Examples + +```sh + harbor artifact list +``` + +### Options + +```sh + -h, --help help for artifact +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor](harbor.md) - Official Harbor CLI +* [harbor artifact delete](harbor-artifact-delete.md) - delete an artifact +* [harbor artifact info](harbor-artifact-info.md) - Get info of an artifact +* [harbor artifact list](harbor-artifact-list.md) - list artifacts within a repository +* [harbor artifact scan](harbor-artifact-scan.md) - Scan an artifact +* [harbor artifact tags](harbor-artifact-tags.md) - Manage tags of an artifact + diff --git a/content/cli-docs/cli-docs/harbor-login.md b/content/cli-docs/cli-docs/harbor-login.md new file mode 100644 index 000000000..4e4018298 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-login.md @@ -0,0 +1,39 @@ +--- +title: harbor login +weight: 15 +--- +## harbor login + +### Description + +##### Log in to Harbor registry + +### Synopsis + +Authenticate with Harbor Registry. + +```sh +harbor login [server] [flags] +``` + +### Options + +```sh + -h, --help help for login + --name string name for the set of credentials + -p, --password string Password + -u, --username string Username +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor](harbor.md) - Official Harbor CLI + diff --git a/content/cli-docs/cli-docs/harbor-project-create.md b/content/cli-docs/cli-docs/harbor-project-create.md new file mode 100644 index 000000000..fcea0a3c0 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-project-create.md @@ -0,0 +1,37 @@ +--- +title: harbor project create +weight: 80 +--- +## harbor project create + +### Description + +##### create project + +```sh +harbor project create [flags] +``` + +### Options + +```sh + -h, --help help for create + --name string Name of the project + --proxy-cache Whether the project is a proxy cache project + --public Project is public or private (default true) + --registry-id string ID of referenced registry when creating the proxy cache project + --storage-limit string Storage quota of the project (default "-1") +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor project](harbor-project.md) - Manage projects and assign resources to them + diff --git a/content/cli-docs/cli-docs/harbor-project-delete.md b/content/cli-docs/cli-docs/harbor-project-delete.md new file mode 100644 index 000000000..fffdcf616 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-project-delete.md @@ -0,0 +1,32 @@ +--- +title: harbor project delete +weight: 100 +--- +## harbor project delete + +### Description + +##### delete project by name or id + +```sh +harbor project delete [flags] +``` + +### Options + +```sh + -h, --help help for delete +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor project](harbor-project.md) - Manage projects and assign resources to them + diff --git a/content/cli-docs/cli-docs/harbor-project-list.md b/content/cli-docs/cli-docs/harbor-project-list.md new file mode 100644 index 000000000..41d6ed66a --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-project-list.md @@ -0,0 +1,38 @@ +--- +title: harbor project list +weight: 85 +--- +## harbor project list + +### Description + +##### list project + +```sh +harbor project list [flags] +``` + +### Options + +```sh + -h, --help help for list + --name string Name of the project + --page int Page number (default 1) + --page-size int Size of per page (default 10) + --public Project is public or private + -q, --query string Query string to query resources + --sort string Sort the resource list in ascending or descending order +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor project](harbor-project.md) - Manage projects and assign resources to them + diff --git a/content/cli-docs/cli-docs/harbor-project-logs.md b/content/cli-docs/cli-docs/harbor-project-logs.md new file mode 100644 index 000000000..c4d046ae3 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-project-logs.md @@ -0,0 +1,32 @@ +--- +title: harbor project logs +weight: 90 +--- +## harbor project logs + +### Description + +##### get project logs + +```sh +harbor project logs [flags] +``` + +### Options + +```sh + -h, --help help for logs +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor project](harbor-project.md) - Manage projects and assign resources to them + diff --git a/content/cli-docs/cli-docs/harbor-project-view.md b/content/cli-docs/cli-docs/harbor-project-view.md new file mode 100644 index 000000000..968c7aba3 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-project-view.md @@ -0,0 +1,32 @@ +--- +title: harbor project view +weight: 95 +--- +## harbor project view + +### Description + +##### get project by name or id + +```sh +harbor project view [NAME|ID] [flags] +``` + +### Options + +```sh + -h, --help help for view +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor project](harbor-project.md) - Manage projects and assign resources to them + diff --git a/content/cli-docs/cli-docs/harbor-project.md b/content/cli-docs/cli-docs/harbor-project.md new file mode 100644 index 000000000..d18b6b554 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-project.md @@ -0,0 +1,43 @@ +--- +title: harbor project +weight: 75 +--- +## harbor project + +### Description + +##### Manage projects and assign resources to them + +### Synopsis + +Manage projects in Harbor + +### Examples + +```sh + harbor project list +``` + +### Options + +```sh + -h, --help help for project +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor](harbor.md) - Official Harbor CLI +* [harbor project create](harbor-project-create.md) - create project +* [harbor project delete](harbor-project-delete.md) - delete project by name or id +* [harbor project list](harbor-project-list.md) - list project +* [harbor project logs](harbor-project-logs.md) - get project logs +* [harbor project view](harbor-project-view.md) - get project by name or id + diff --git a/content/cli-docs/cli-docs/harbor-registry-create.md b/content/cli-docs/cli-docs/harbor-registry-create.md new file mode 100644 index 000000000..99c6f31e5 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-registry-create.md @@ -0,0 +1,40 @@ +--- +title: harbor registry create +weight: 110 +--- +## harbor registry create + +### Description + +##### create registry + +```sh +harbor registry create [flags] +``` + +### Options + +```sh + --credential-access-key string Access key, e.g. user name when credential type is 'basic' + --credential-access-secret string Access secret, e.g. password when credential type is 'basic' + --credential-type string Credential type, such as 'basic', 'oauth' (default "basic") + --description string Description of the registry + -h, --help help for create + --insecure Whether or not the certificate will be verified when Harbor tries to access the server (default true) + --name string Name of the registry + --type string Type of the registry (default "harbor") + --url string Registry endpoint URL +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor registry](harbor-registry.md) - Manage registries + diff --git a/content/cli-docs/cli-docs/harbor-registry-delete.md b/content/cli-docs/cli-docs/harbor-registry-delete.md new file mode 100644 index 000000000..f0e1b0ee4 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-registry-delete.md @@ -0,0 +1,32 @@ +--- +title: harbor registry delete +weight: 140 +--- +## harbor registry delete + +### Description + +##### delete registry by id + +```sh +harbor registry delete [flags] +``` + +### Options + +```sh + -h, --help help for delete +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor registry](harbor-registry.md) - Manage registries + diff --git a/content/cli-docs/cli-docs/harbor-registry-info.md b/content/cli-docs/cli-docs/harbor-registry-info.md new file mode 100644 index 000000000..2fd7fc45d --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-registry-info.md @@ -0,0 +1,32 @@ +--- +title: harbor registry info +weight: 120 +--- +## harbor registry info + +### Description + +##### get registry info + +```sh +harbor registry info [flags] +``` + +### Options + +```sh + -h, --help help for info +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor registry](harbor-registry.md) - Manage registries + diff --git a/content/cli-docs/cli-docs/harbor-registry-list.md b/content/cli-docs/cli-docs/harbor-registry-list.md new file mode 100644 index 000000000..2a230059a --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-registry-list.md @@ -0,0 +1,36 @@ +--- +title: harbor registry list +weight: 115 +--- +## harbor registry list + +### Description + +##### list registry + +```sh +harbor registry list [flags] +``` + +### Options + +```sh + -h, --help help for list + --page int Page number (default 1) + --page-size int Size of per page (default 10) + -q, --query string Query string to query resources + --sort string Sort the resource list in ascending or descending order +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor registry](harbor-registry.md) - Manage registries + diff --git a/content/cli-docs/cli-docs/harbor-registry-update.md b/content/cli-docs/cli-docs/harbor-registry-update.md new file mode 100644 index 000000000..7c4a43022 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-registry-update.md @@ -0,0 +1,40 @@ +--- +title: harbor registry update +weight: 125 +--- +## harbor registry update + +### Description + +##### update registry + +```sh +harbor registry update [flags] +``` + +### Options + +```sh + --credential-access-key string Access key, e.g. user name when credential type is 'basic' + --credential-access-secret string Access secret, e.g. password when credential type is 'basic' + --credential-type string Credential type, such as 'basic', 'oauth' + --description string Description of the registry + -h, --help help for update + --insecure Whether or not the certificate will be verified when Harbor tries to access the server (default true) + --name string Name of the registry + --type string Type of the registry + --url string Registry endpoint URL +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor registry](harbor-registry.md) - Manage registries + diff --git a/content/cli-docs/cli-docs/harbor-registry-view.md b/content/cli-docs/cli-docs/harbor-registry-view.md new file mode 100644 index 000000000..62451e95c --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-registry-view.md @@ -0,0 +1,32 @@ +--- +title: harbor registry view +weight: 130 +--- +## harbor registry view + +### Description + +##### get registry by id + +```sh +harbor registry view [flags] +``` + +### Options + +```sh + -h, --help help for view +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor registry](harbor-registry.md) - Manage registries + diff --git a/content/cli-docs/cli-docs/harbor-registry.md b/content/cli-docs/cli-docs/harbor-registry.md new file mode 100644 index 000000000..ce862d95d --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-registry.md @@ -0,0 +1,44 @@ +--- +title: harbor registry +weight: 105 +--- +## harbor registry + +### Description + +##### Manage registries + +### Synopsis + +Manage registries in Harbor + +### Examples + +```sh + harbor registry list +``` + +### Options + +```sh + -h, --help help for registry +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor](harbor.md) - Official Harbor CLI +* [harbor registry create](harbor-registry-create.md) - create registry +* [harbor registry delete](harbor-registry-delete.md) - delete registry by id +* [harbor registry info](harbor-registry-info.md) - get registry info +* [harbor registry list](harbor-registry-list.md) - list registry +* [harbor registry update](harbor-registry-update.md) - update registry +* [harbor registry view](harbor-registry-view.md) - get registry by id + diff --git a/content/cli-docs/cli-docs/harbor-repo-delete.md b/content/cli-docs/cli-docs/harbor-repo-delete.md new file mode 100644 index 000000000..36e3bc342 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-repo-delete.md @@ -0,0 +1,42 @@ +--- +title: harbor repo delete +weight: 160 +--- +## harbor repo delete + +### Description + +##### Delete a repository + +### Synopsis + +Delete a repository within a project in Harbor + +```sh +harbor repo delete [flags] +``` + +### Examples + +```sh + harbor repository delete [project_name]/[repository_name] +``` + +### Options + +```sh + -h, --help help for delete +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor repo](harbor-repo.md) - Manage repositories + diff --git a/content/cli-docs/cli-docs/harbor-repo-info.md b/content/cli-docs/cli-docs/harbor-repo-info.md new file mode 100644 index 000000000..e1aaaeaf6 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-repo-info.md @@ -0,0 +1,42 @@ +--- +title: harbor repo info +weight: 155 +--- +## harbor repo info + +### Description + +##### Get repository information + +### Synopsis + +Get information of a particular repository in a project + +```sh +harbor repo info [flags] +``` + +### Examples + +```sh + harbor repo info / +``` + +### Options + +```sh + -h, --help help for info +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor repo](harbor-repo.md) - Manage repositories + diff --git a/content/cli-docs/cli-docs/harbor-repo-list.md b/content/cli-docs/cli-docs/harbor-repo-list.md new file mode 100644 index 000000000..5274a5429 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-repo-list.md @@ -0,0 +1,32 @@ +--- +title: harbor repo list +weight: 150 +--- +## harbor repo list + +### Description + +##### list repositories within a project + +```sh +harbor repo list [flags] +``` + +### Options + +```sh + -h, --help help for list +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor repo](harbor-repo.md) - Manage repositories + diff --git a/content/cli-docs/cli-docs/harbor-repo.md b/content/cli-docs/cli-docs/harbor-repo.md new file mode 100644 index 000000000..6a3538e7b --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-repo.md @@ -0,0 +1,35 @@ +--- +title: harbor repo +weight: 145 +--- +## harbor repo + +### Description + +##### Manage repositories + +### Synopsis + +Manage repositories in Harbor context + +### Options + +```sh + -h, --help help for repo +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor](harbor.md) - Official Harbor CLI +* [harbor repo delete](harbor-repo-delete.md) - Delete a repository +* [harbor repo info](harbor-repo-info.md) - Get repository information +* [harbor repo list](harbor-repo-list.md) - list repositories within a project + diff --git a/content/cli-docs/cli-docs/harbor-user-create.md b/content/cli-docs/cli-docs/harbor-user-create.md new file mode 100644 index 000000000..8337ac0a0 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-user-create.md @@ -0,0 +1,37 @@ +--- +title: harbor user create +weight: 170 +--- +## harbor user create + +### Description + +##### create user + +```sh +harbor user create [flags] +``` + +### Options + +```sh + --comment string Comment + --email string Email + -h, --help help for create + --password string Password + --realname string Realname + --username string Username +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor user](harbor-user.md) - Manage users + diff --git a/content/cli-docs/cli-docs/harbor-user-delete.md b/content/cli-docs/cli-docs/harbor-user-delete.md new file mode 100644 index 000000000..f443621fe --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-user-delete.md @@ -0,0 +1,32 @@ +--- +title: harbor user delete +weight: 185 +--- +## harbor user delete + +### Description + +##### delete user + +```sh +harbor user delete [flags] +``` + +### Options + +```sh + -h, --help help for delete +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor user](harbor-user.md) - Manage users + diff --git a/content/cli-docs/cli-docs/harbor-user-elevate.md b/content/cli-docs/cli-docs/harbor-user-elevate.md new file mode 100644 index 000000000..42011e8fb --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-user-elevate.md @@ -0,0 +1,36 @@ +--- +title: harbor user elevate +weight: 180 +--- +## harbor user elevate + +### Description + +##### elevate user + +### Synopsis + +elevate user to admin role + +```sh +harbor user elevate [flags] +``` + +### Options + +```sh + -h, --help help for elevate +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor user](harbor-user.md) - Manage users + diff --git a/content/cli-docs/cli-docs/harbor-user-list.md b/content/cli-docs/cli-docs/harbor-user-list.md new file mode 100644 index 000000000..fed5f4641 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-user-list.md @@ -0,0 +1,32 @@ +--- +title: harbor user list +weight: 175 +--- +## harbor user list + +### Description + +##### list users + +```sh +harbor user list [flags] +``` + +### Options + +```sh + -h, --help help for list +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor user](harbor-user.md) - Manage users + diff --git a/content/cli-docs/cli-docs/harbor-user.md b/content/cli-docs/cli-docs/harbor-user.md new file mode 100644 index 000000000..f41bb4809 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-user.md @@ -0,0 +1,42 @@ +--- +title: harbor user +weight: 165 +--- +## harbor user + +### Description + +##### Manage users + +### Synopsis + +Manage users in Harbor + +### Examples + +```sh + harbor user list +``` + +### Options + +```sh + -h, --help help for user +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor](harbor.md) - Official Harbor CLI +* [harbor user create](harbor-user-create.md) - create user +* [harbor user delete](harbor-user-delete.md) - delete user +* [harbor user elevate](harbor-user-elevate.md) - elevate user +* [harbor user list](harbor-user-list.md) - list users + diff --git a/content/cli-docs/cli-docs/harbor-version.md b/content/cli-docs/cli-docs/harbor-version.md new file mode 100644 index 000000000..e7fc4cc97 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-version.md @@ -0,0 +1,42 @@ +--- +title: harbor version +weight: 10 +--- +## harbor version + +### Description + +##### Version of Harbor CLI + +### Synopsis + +Get Harbor CLI version, git commit, go version, build time, release channel, os/arch, etc. + +```sh +harbor version [flags] +``` + +### Examples + +```sh + harbor version +``` + +### Options + +```sh + -h, --help help for version +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor](harbor.md) - Official Harbor CLI + diff --git a/content/cli-docs/cli-docs/harbor.md b/content/cli-docs/cli-docs/harbor.md new file mode 100644 index 000000000..5b7f98e8d --- /dev/null +++ b/content/cli-docs/cli-docs/harbor.md @@ -0,0 +1,45 @@ +--- +title: harbor +weight: 5 +--- +## harbor + +### Description + +##### Official Harbor CLI + +### Synopsis + +Official Harbor CLI + +### Examples + +```sh + +// Base command: +harbor + +// Display help about the command: +harbor help + +``` + +### Options + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -h, --help help for harbor + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor artifact](harbor-artifact.md) - Manage artifacts +* [harbor login](harbor-login.md) - Log in to Harbor registry +* [harbor project](harbor-project.md) - Manage projects and assign resources to them +* [harbor registry](harbor-registry.md) - Manage registries +* [harbor repo](harbor-repo.md) - Manage repositories +* [harbor user](harbor-user.md) - Manage users +* [harbor version](harbor-version.md) - Version of Harbor CLI + diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html index 1031b3b14..531aafaa8 100644 --- a/layouts/partials/navbar.html +++ b/layouts/partials/navbar.html @@ -87,6 +87,17 @@ {{ end }} + diff --git a/load-docs.sh b/load-docs.sh index 89271c6ff..e0654d354 100755 --- a/load-docs.sh +++ b/load-docs.sh @@ -61,7 +61,7 @@ for release in ${ALL_RELEASES}; do PREV_MINOR_VER=${CUR_MINOR_VER} done -echo "Generating Harbor CLI Docs" +echo "Generating docs" ./cli-docs.sh echo "Git version: ${GIT_VERSION}" From ad8d13813e4800f438fcab9410b5628a3b10179f Mon Sep 17 00:00:00 2001 From: Patrick Eschenbach Date: Sat, 12 Apr 2025 14:20:56 +0200 Subject: [PATCH 04/12] Cherry pick finished Signed-off-by: Patrick Eschenbach --- content/cli-docs/cli-docs/_index.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/content/cli-docs/cli-docs/_index.md b/content/cli-docs/cli-docs/_index.md index 5b4ad7ed6..17c42a4dd 100644 --- a/content/cli-docs/cli-docs/_index.md +++ b/content/cli-docs/cli-docs/_index.md @@ -5,11 +5,7 @@ weight: 25 This section describes the comprehensive set of commands provided by the Harbor CLI, which enables you to efficiently manage and interact with your Harbor registry. The Harbor CLI commands are categorized by function, -<<<<<<< HEAD -- `harbor` - Configure the Harbor CLI. -======= - `harbor` - Configure the Harbor CLI and set global flags to customize your experience. ->>>>>>> 862144c (Added Documentation for Harbor-CLI) - `harbor artifact` - Manage artifacts in Harbor Repository - `harbor project` - Manage projects and assign resources to them - `harbor registry` - Manage registries in Harbor From 8c1babe30f988d3dfacfed1459fa4580e9bf5a49 Mon Sep 17 00:00:00 2001 From: Patrick Eschenbach Date: Sat, 12 Apr 2025 15:24:40 +0200 Subject: [PATCH 05/12] Added more cli docs entries, added section for configuration management, added section for encryption management Signed-off-by: Patrick Eschenbach --- content/cli-docs/cli-config/_index.md | 110 ++++++++++++++++++ .../cli-docs/cli-docs/harbor-artifact-view.md | 42 +++++++ .../cli-docs/cli-docs/harbor-config-delete.md | 51 ++++++++ .../cli-docs/cli-docs/harbor-config-get.md | 50 ++++++++ .../cli-docs/cli-docs/harbor-config-list.md | 42 +++++++ .../cli-docs/cli-docs/harbor-config-set.md | 51 ++++++++ .../cli-docs/cli-docs/harbor-config-update.md | 51 ++++++++ content/cli-docs/cli-docs/harbor-config.md | 36 ++++++ content/cli-docs/cli-docs/harbor-health.md | 38 ++++++ content/cli-docs/cli-docs/harbor-info.md | 32 +++++ .../cli-docs/cli-docs/harbor-label-create.md | 46 ++++++++ .../cli-docs/cli-docs/harbor-label-delete.md | 39 +++++++ .../cli-docs/cli-docs/harbor-label-list.md | 38 ++++++ .../cli-docs/cli-docs/harbor-label-update.md | 42 +++++++ content/cli-docs/cli-docs/harbor-label.md | 32 +++++ .../cli-docs/harbor-project-search.md | 32 +++++ .../cli-docs/cli-docs/harbor-repo-search.md | 32 +++++ content/cli-docs/cli-docs/harbor-repo-view.md | 42 +++++++ .../cli-docs/cli-docs/harbor-schedule-list.md | 34 ++++++ content/cli-docs/cli-docs/harbor-schedule.md | 29 +++++ content/cli-docs/cli-encryption/_index.md | 67 +++++++++++ 21 files changed, 936 insertions(+) create mode 100644 content/cli-docs/cli-config/_index.md create mode 100644 content/cli-docs/cli-docs/harbor-artifact-view.md create mode 100644 content/cli-docs/cli-docs/harbor-config-delete.md create mode 100644 content/cli-docs/cli-docs/harbor-config-get.md create mode 100644 content/cli-docs/cli-docs/harbor-config-list.md create mode 100644 content/cli-docs/cli-docs/harbor-config-set.md create mode 100644 content/cli-docs/cli-docs/harbor-config-update.md create mode 100644 content/cli-docs/cli-docs/harbor-config.md create mode 100644 content/cli-docs/cli-docs/harbor-health.md create mode 100644 content/cli-docs/cli-docs/harbor-info.md create mode 100644 content/cli-docs/cli-docs/harbor-label-create.md create mode 100644 content/cli-docs/cli-docs/harbor-label-delete.md create mode 100644 content/cli-docs/cli-docs/harbor-label-list.md create mode 100644 content/cli-docs/cli-docs/harbor-label-update.md create mode 100644 content/cli-docs/cli-docs/harbor-label.md create mode 100644 content/cli-docs/cli-docs/harbor-project-search.md create mode 100644 content/cli-docs/cli-docs/harbor-repo-search.md create mode 100644 content/cli-docs/cli-docs/harbor-repo-view.md create mode 100644 content/cli-docs/cli-docs/harbor-schedule-list.md create mode 100644 content/cli-docs/cli-docs/harbor-schedule.md create mode 100644 content/cli-docs/cli-encryption/_index.md diff --git a/content/cli-docs/cli-config/_index.md b/content/cli-docs/cli-config/_index.md new file mode 100644 index 000000000..db8ab3752 --- /dev/null +++ b/content/cli-docs/cli-config/_index.md @@ -0,0 +1,110 @@ +--- +title: Harbor CLI Config Management +weight: 25 +--- + +# Harbor CLI Configuration Management + +> **Note** +> The Harbor CLI follows the [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) for configuration and data storage by default. + +## Introduction +Harbor CLI is a flexible command-line tool that lets you manage various Harbor environments with different credentials. Whether you need a production-ready setup or quick testing configurations, the CLI's hierarchical structure and XDG support help keep things organized. + + +## Understanding the Configuration Structure +The Harbor CLI can manage multiple credentials and keep track of which credential is currently active. This setup allows you to maintain separate contexts for different Harbor instances or user accounts without having to rewrite configuration files manually. + +### Example Configuration File +Below is a simplified example of a typical Harbor CLI configuration file: +```yaml +current-credential-name: example@demo-harbor +credentials: + - name: example@demo-harbor + username: example-user + password: example-password + serveraddress: https://demo.goharbor.io +``` + +In this configuration: +- **current-credential-name** references the active credential by name. +- **credentials** holds one or more sets of user credentials, each following the same structure. + +## Managing Multiple Credentials +If you need to work with multiple sets of credentials—such as development, staging, or production — Harbor CLI makes it easy to create and switch between them. + +> **Note**: For more login command details please refer to the [login command reference](../cli-docs/harbor-login.md). +### Creating a New Credentials Entry +Use the `harbor login` command with the required arguments to store new credentials: +```bash +harbor login --name my-new-credential \ + --username myuser \ + --password mypass \ + https://my-harbor-instance.com +``` +This adds a new entry to your credentials list, allowing you to manage different Harbor accounts from the same CLI. + +### Switching Between Credentials +To switch to another credential set, run: +```bash +harbor login --name +``` +The CLI will then set the specified credential as the active one, eliminating the need to manually edit your configuration files. This will overwrite the `current + + +## Configuration Hierarchy (Highest to Lowest Priority) + +1. **Explicit Config Flag** + Provide a custom config file at runtime using `--config`: + ```bash + harbor --config /path/to/custom/config.yaml artifact list + ``` + +2. **Environment Variable** + Set a persistent configuration through the `HARBOR_CLI_CONFIG` environment variable: + ```bash + export HARBOR_CLI_CONFIG="$HOME/.custom/harbor-config.yaml" + harbor artifact list # Uses the environment-specified config + ``` + +3. **XDG Default Paths** + Automatically discover configuration in the following order: + ```bash + ${XDG_CONFIG_HOME}/harbor-cli/config.yaml # If XDG_CONFIG_HOME is set + ~/.config/harbor-cli/config.yaml # Fallback default + ``` + +## Data Storage Management +### Data File Location + +- **Primary Path**: `$XDG_DATA_HOME/harbor-cli/data.yaml` +- **Fallback Path**: `$HOME/.local/share/harbor-cli/data.yaml` + +> **Important** +> The data file automatically tracks the last-used configuration file path + +## Configuration Precedence Summary +| Priority | Method | Example | +|----------|----------------------------|---------------------------------------| +| 1 | --config flag | harbor --config ./test.yaml ... | +| 2 | HARBOR_CLI_CONFIG env var | export HARBOR_CLI_CONFIG=... | +| 3 | XDG Default Locations | ~/.config/harbor-cli/config.yaml | + +## Practical Usage Examples +### Scenario 1: Temporary Config Override +```bash +harbor --config ./experimental.yaml project create "new-project" +``` + +### Scenario 2: Persistent Environment-based Config +```bash +echo 'export HARBOR_CLI_CONFIG="$HOME/work/configs/prod-harbor.yaml"' >> ~/.zshrc +source ~/.zshrc +harbor config list # Uses production config +``` + +### Scenario 3: Reset to Default Configuration +```bash +unset HARBOR_CLI_CONFIG +harbor config delete --current # Deletes current context +``` diff --git a/content/cli-docs/cli-docs/harbor-artifact-view.md b/content/cli-docs/cli-docs/harbor-artifact-view.md new file mode 100644 index 000000000..0c7a12f94 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-artifact-view.md @@ -0,0 +1,42 @@ +--- +title: harbor artifact view +weight: 75 +--- +## harbor artifact view + +### Description + +##### Get information of an artifact + +### Synopsis + +Get information of an artifact + +```sh +harbor artifact view [flags] +``` + +### Examples + +```sh +harbor artifact view // +``` + +### Options + +```sh + -h, --help help for view +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor artifact](harbor-artifact.md) - Manage artifacts + diff --git a/content/cli-docs/cli-docs/harbor-config-delete.md b/content/cli-docs/cli-docs/harbor-config-delete.md new file mode 100644 index 000000000..b9040b6b3 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-config-delete.md @@ -0,0 +1,51 @@ +--- +title: harbor config delete +weight: 85 +--- +## harbor config delete + +### Description + +##### Delete (clear) a specific config item + +### Synopsis + +Clear the value of a specific CLI config item by setting it to its zero value. +Case-insensitive field lookup, but uses the canonical (Go) field name internally. +If you specify --name, that credential (rather than the "current" one) will be used. + +```sh +harbor config delete [flags] +``` + +### Examples + +```sh + + # Clear the current credential's password + harbor config delete credentials.password + + # Clear a specific credential's password using --name + harbor config delete credentials.password --name harbor-cli@http://demo.goharbor.io + +``` + +### Options + +```sh + -h, --help help for delete + -n, --name string Name of the credential to delete fields from (default: the current credential) +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor config](harbor-config.md) - Manage the config of the Harbor Cli + diff --git a/content/cli-docs/cli-docs/harbor-config-get.md b/content/cli-docs/cli-docs/harbor-config-get.md new file mode 100644 index 000000000..0d65e1fb6 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-config-get.md @@ -0,0 +1,50 @@ +--- +title: harbor config get +weight: 85 +--- +## harbor config get + +### Description + +##### Get a specific config item + +### Synopsis + +Get the value of a specific CLI config item. +If you specify --name, that credential (rather than the "current" one) will be used. + +```sh +harbor config get [flags] +``` + +### Examples + +```sh + + # Get the current credential's username + harbor config get credentials.username + + # Get a credential's username by specifying the credential name + harbor config get credentials.username --name harbor-cli@http://demo.goharbor.io + +``` + +### Options + +```sh + -h, --help help for get + -n, --name string Name of the credential to get fields from (default: the current credential) +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor config](harbor-config.md) - Manage the config of the Harbor Cli + diff --git a/content/cli-docs/cli-docs/harbor-config-list.md b/content/cli-docs/cli-docs/harbor-config-list.md new file mode 100644 index 000000000..ad89548a5 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-config-list.md @@ -0,0 +1,42 @@ +--- +title: harbor config list +weight: 25 +--- +## harbor config list + +### Description + +##### List config items + +### Synopsis + +Get information of all CLI config items + +```sh +harbor config list [flags] +``` + +### Examples + +```sh + harbor config list +``` + +### Options + +```sh + -h, --help help for list +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor config](harbor-config.md) - Manage the config of the Harbor Cli + diff --git a/content/cli-docs/cli-docs/harbor-config-set.md b/content/cli-docs/cli-docs/harbor-config-set.md new file mode 100644 index 000000000..713425bdb --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-config-set.md @@ -0,0 +1,51 @@ +--- +title: harbor config set +weight: 85 +--- +## harbor config set + +### Description + +##### Set a specific config item + +### Synopsis + +Set the value of a specific CLI config item. +Case-insensitive field lookup, but uses the canonical (Go) field name internally. +If you specify --name, that credential (rather than the "current" one) will be updated. + +```sh +harbor config set [flags] +``` + +### Examples + +```sh + + # Set the current credential's password + harbor config set credentials.password myNewSecret + + # Set a credential's password by specifying the credential name + harbor config set credentials.password myNewSecret --name harbor-cli@http://demo.goharbor.io + +``` + +### Options + +```sh + -h, --help help for set + -n, --name string Name of the credential to set fields on (default: the current credential) +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor config](harbor-config.md) - Manage the config of the Harbor Cli + diff --git a/content/cli-docs/cli-docs/harbor-config-update.md b/content/cli-docs/cli-docs/harbor-config-update.md new file mode 100644 index 000000000..4e0727571 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-config-update.md @@ -0,0 +1,51 @@ +--- +title: harbor config update +weight: 10 +--- +## harbor config update + +### Description + +##### Set/update a specific config item + +### Synopsis + +Set/update the value of a specific CLI config item. +Case-insensitive field lookup, but uses the canonical (Go) field name internally. +If you specify --name, that credential (rather than the "current" one) will be updated. + +```sh +harbor config update [flags] +``` + +### Examples + +```sh + + # Set/update the current credential's password + harbor config update credentials.password myNewSecret + + # Set/update a credential's password by specifying the credential name + harbor config update credentials.password myNewSecret --name admin@http://demo.goharbor.io + +``` + +### Options + +```sh + -h, --help help for update + -n, --name string Name of the credential to set fields on (default: the current credential) +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor config](harbor-config.md) - Manage the config of the Harbor Cli + diff --git a/content/cli-docs/cli-docs/harbor-config.md b/content/cli-docs/cli-docs/harbor-config.md new file mode 100644 index 000000000..5b450f087 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-config.md @@ -0,0 +1,36 @@ +--- +title: harbor config +weight: 30 +--- +## harbor config + +### Description + +##### Manage the config of the Harbor Cli + +### Synopsis + +Manage repositories in Harbor config + +### Options + +```sh + -h, --help help for config +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor](harbor.md) - Official Harbor CLI +* [harbor config delete](harbor-config-delete.md) - Delete (clear) a specific config item +* [harbor config get](harbor-config-get.md) - Get a specific config item +* [harbor config list](harbor-config-list.md) - List config items +* [harbor config set](harbor-config-set.md) - Set a specific config item + diff --git a/content/cli-docs/cli-docs/harbor-health.md b/content/cli-docs/cli-docs/harbor-health.md new file mode 100644 index 000000000..b4ec960c3 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-health.md @@ -0,0 +1,38 @@ +--- +title: harbor health +weight: 80 +--- +## harbor health + +### Description + +##### Get the health status of Harbor components + +```sh +harbor health [flags] +``` + +### Examples + +```sh + # Get the health status of Harbor components +``` + +### Options + +```sh + -h, --help help for health +``` + +### Options inherited from parent commands + +```sh + --config string config file (default is $HOME/.harbor/config.yaml) (default "/Users/vadim/.harbor/config.yaml") + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor](harbor.md) - Official Harbor CLI + diff --git a/content/cli-docs/cli-docs/harbor-info.md b/content/cli-docs/cli-docs/harbor-info.md new file mode 100644 index 000000000..8b4a9ce52 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-info.md @@ -0,0 +1,32 @@ +--- +title: harbor info +weight: 10 +--- +## harbor info + +### Description + +##### Show the current credential information + +```sh +harbor info [flags] +``` + +### Options + +```sh + -h, --help help for info +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor](harbor.md) - Official Harbor CLI + diff --git a/content/cli-docs/cli-docs/harbor-label-create.md b/content/cli-docs/cli-docs/harbor-label-create.md new file mode 100644 index 000000000..d1ceb2834 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-label-create.md @@ -0,0 +1,46 @@ +--- +title: harbor label create +weight: 80 +--- +## harbor label create + +### Description + +##### create label + +### Synopsis + +create label in harbor + +```sh +harbor label create [flags] +``` + +### Examples + +```sh +harbor label create +``` + +### Options + +```sh + --color string Color of the label.color is in hex value (default "#FFFFFF") + -d, --description string Description of the label + -h, --help help for create + -n, --name string Name of the label + -s, --scope string Scope of the label. eg- g(global), p(specific project) (default "g") +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor label](harbor-label.md) - Manage labels in Harbor + diff --git a/content/cli-docs/cli-docs/harbor-label-delete.md b/content/cli-docs/cli-docs/harbor-label-delete.md new file mode 100644 index 000000000..9d9ced98a --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-label-delete.md @@ -0,0 +1,39 @@ +--- +title: harbor label delete +weight: 0 +--- +## harbor label delete + +### Description + +##### delete label + +```sh +harbor label delete [flags] +``` + +### Examples + +```sh +harbor label delete [labelname] +``` + +### Options + +```sh + -h, --help help for delete + -s, --scope string default(global).'p' for project labels.Query scope of the label (default "g") +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor label](harbor-label.md) - Manage labels in Harbor + diff --git a/content/cli-docs/cli-docs/harbor-label-list.md b/content/cli-docs/cli-docs/harbor-label-list.md new file mode 100644 index 000000000..99b09a46c --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-label-list.md @@ -0,0 +1,38 @@ +--- +title: harbor label list +weight: 15 +--- +## harbor label list + +### Description + +##### list labels + +```sh +harbor label list [flags] +``` + +### Options + +```sh + -h, --help help for list + --page int Page number (default 1) + --page-size int Size of per page (default 20) + -i, --projectid int project ID when query project labels (default 1) + -q, --query string Query string to query resources + -s, --scope string default(global).'p' for project labels.Query scope of the label (default "g") + --sort string Sort the label list in ascending or descending order +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor label](harbor-label.md) - Manage labels in Harbor + diff --git a/content/cli-docs/cli-docs/harbor-label-update.md b/content/cli-docs/cli-docs/harbor-label-update.md new file mode 100644 index 000000000..e2072cfe1 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-label-update.md @@ -0,0 +1,42 @@ +--- +title: harbor label update +weight: 70 +--- +## harbor label update + +### Description + +##### update label + +```sh +harbor label update [flags] +``` + +### Examples + +```sh +harbor label update [labelname] +``` + +### Options + +```sh + --color string Color of the label.color is in hex value + -d, --description string Description of the label + -h, --help help for update + -n, --name string Name of the label + -s, --scope string Scope of the label. eg- g(global), p(specific project) (default "g") +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor label](harbor-label.md) - Manage labels in Harbor + diff --git a/content/cli-docs/cli-docs/harbor-label.md b/content/cli-docs/cli-docs/harbor-label.md new file mode 100644 index 000000000..5171e162a --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-label.md @@ -0,0 +1,32 @@ +--- +title: harbor label +weight: 65 +--- +## harbor label + +### Description + +##### Manage labels in Harbor + +### Options + +```sh + -h, --help help for label +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor](harbor.md) - Official Harbor CLI +* [harbor label create](harbor-label-create.md) - create label +* [harbor label delete](harbor-label-delete.md) - delete label +* [harbor label list](harbor-label-list.md) - list labels +* [harbor label update](harbor-label-update.md) - update label + diff --git a/content/cli-docs/cli-docs/harbor-project-search.md b/content/cli-docs/cli-docs/harbor-project-search.md new file mode 100644 index 000000000..86b92d0f8 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-project-search.md @@ -0,0 +1,32 @@ +--- +title: harbor project search +weight: 20 +--- +## harbor project search + +### Description + +##### search project based on their names + +```sh +harbor project search [flags] +``` + +### Options + +```sh + -h, --help help for search +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor project](harbor-project.md) - Manage projects and assign resources to them + diff --git a/content/cli-docs/cli-docs/harbor-repo-search.md b/content/cli-docs/cli-docs/harbor-repo-search.md new file mode 100644 index 000000000..de5c04946 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-repo-search.md @@ -0,0 +1,32 @@ +--- +title: harbor repo search +weight: 30 +--- +## harbor repo search + +### Description + +##### search repository based on their names + +```sh +harbor repo search [flags] +``` + +### Options + +```sh + -h, --help help for search +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor repo](harbor-repo.md) - Manage repositories + diff --git a/content/cli-docs/cli-docs/harbor-repo-view.md b/content/cli-docs/cli-docs/harbor-repo-view.md new file mode 100644 index 000000000..9b5855e3a --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-repo-view.md @@ -0,0 +1,42 @@ +--- +title: harbor repo view +weight: 55 +--- +## harbor repo view + +### Description + +##### Get repository information + +### Synopsis + +Get information of a particular repository in a project + +```sh +harbor repo view [flags] +``` + +### Examples + +```sh + harbor repo view / +``` + +### Options + +```sh + -h, --help help for view +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor repo](harbor-repo.md) - Manage repositories + diff --git a/content/cli-docs/cli-docs/harbor-schedule-list.md b/content/cli-docs/cli-docs/harbor-schedule-list.md new file mode 100644 index 000000000..b6e9d3f06 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-schedule-list.md @@ -0,0 +1,34 @@ +--- +title: harbor schedule list +weight: 70 +--- +## harbor schedule list + +### Description + +##### show all schedule jobs in Harbor + +```sh +harbor schedule list [flags] +``` + +### Options + +```sh + -h, --help help for list + --page int Page number (default 1) + --page-size int Size of per page (default 10) +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor schedule](harbor-schedule.md) - Schedule jobs in Harbor + diff --git a/content/cli-docs/cli-docs/harbor-schedule.md b/content/cli-docs/cli-docs/harbor-schedule.md new file mode 100644 index 000000000..657986923 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-schedule.md @@ -0,0 +1,29 @@ +--- +title: harbor schedule +weight: 25 +--- +## harbor schedule + +### Description + +##### Schedule jobs in Harbor + +### Options + +```sh + -h, --help help for schedule +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor](harbor.md) - Official Harbor CLI +* [harbor schedule list](harbor-schedule-list.md) - show all schedule jobs in Harbor + diff --git a/content/cli-docs/cli-encryption/_index.md b/content/cli-docs/cli-encryption/_index.md new file mode 100644 index 000000000..742941991 --- /dev/null +++ b/content/cli-docs/cli-encryption/_index.md @@ -0,0 +1,67 @@ +--- +title: Harbor CLI Encryption +weight: 25 +--- + +# Harbor CLI Encryption Guide + +This document provides an overview of how Harbor CLI encrypts sensitive data and offers recommendations for different runtime environments. + +## Overview of Encryption +Harbor CLI secures credentials using AES-GCM encryption. An encryption key is automatically generated and stored in one of several keyring backends, depending on your environment: + +1. **Environment-based Keyring** +2. **System Keyring** +3. **File-based Keyring (Fallback)** + +### How It Works +1. **Key Retrieval** + The CLI checks if an encryption key already exists. + If not present, Harbor CLI generates a new 32-byte key. +2. **Encrypt** + Harbor CLI uses AES-GCM to encrypt credentials with a random nonce. + The CLI stores ciphertext as a Base64-encoded string. +3. **Decrypt** + Harbor CLI decodes and decrypts the stored ciphertext whenever credentials are needed. + +## Recommended Backends +### Desktop Environments +**Use the system keyring** if available. This is the most secure method, as most desktop operating systems keep secrets confidentially within their native keyring service. + +### Docker / Kubernetes Environments +**Use the environment-based keyring** in production. System keyrings typically aren’t available in Docker or Kubernetes. Supplying encryption keys as environment variables or secrets is straightforward. + +#### Example: Running Harbor CLI in Docker +Use a randomly generated key as an environment variable: +```bash +docker run -it --rm \ + -e HARBOR_ENCRYPTION_KEY="$(openssl rand -base64 32)" \ + registry.goharbor.io/harbor-cli/harbor-cli \ + login https://demo.goharbor.io -u username -p password +``` + +#### Example: Running Harbor CLI in Kubernetes +Use a randomly generated key / strong password and store in a kubernetes secret. Pass the secret content as an environment variable to the deployment pod: +```yaml +# secrets.yaml +apiVersion: v1 +kind: Secret +metadata: + name: harbor-cli-secrets +type: Opaque +data: + HARBOR_ENCRYPTION_KEY: "" + +# deployment.yaml +spec: + containers: + - name: harbor-cli + image: registry.goharbor.io/harbor-cli/harbor-cli + envFrom: + - secretRef: + name: harbor-cli-secrets +``` + +### File-based Keyring (Fallback) + +In environments where neither a system keyring nor environment-based keyring is available, Harbor CLI can store the encryption key in a file. By default, this file-based keyring is located at `~/.harbor/keyring`. The stored key is protected by file permissions set to allow only the owner to read or write the file. However, **this approach is less secure** and is **not recommended for production**. From 14abb82fe9fbb97103fbd4b375f20349f2ce4d69 Mon Sep 17 00:00:00 2001 From: Patrick Eschenbach Date: Sat, 12 Apr 2025 15:30:53 +0200 Subject: [PATCH 06/12] Added cross reference between encryption and configuration management docs Signed-off-by: Patrick Eschenbach --- content/cli-docs/cli-config/_index.md | 2 +- content/cli-docs/cli-encryption/_index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/content/cli-docs/cli-config/_index.md b/content/cli-docs/cli-config/_index.md index db8ab3752..705f69b29 100644 --- a/content/cli-docs/cli-config/_index.md +++ b/content/cli-docs/cli-config/_index.md @@ -13,7 +13,7 @@ Harbor CLI is a flexible command-line tool that lets you manage various Harbor e ## Understanding the Configuration Structure -The Harbor CLI can manage multiple credentials and keep track of which credential is currently active. This setup allows you to maintain separate contexts for different Harbor instances or user accounts without having to rewrite configuration files manually. +The Harbor CLI can manage multiple credentials and keep track of which credential is currently active. This setup allows you to maintain separate contexts for different Harbor instances or user accounts without having to rewrite configuration files manually. While the Harbor CLI configuration file manages your credentials, passwords themselves are never stored in plain text. Instead, they are secured using the AES-GCM encryption described in the [Harbor CLI Encryption documentation](../cli-config). ### Example Configuration File Below is a simplified example of a typical Harbor CLI configuration file: diff --git a/content/cli-docs/cli-encryption/_index.md b/content/cli-docs/cli-encryption/_index.md index 742941991..bccdc008f 100644 --- a/content/cli-docs/cli-encryption/_index.md +++ b/content/cli-docs/cli-encryption/_index.md @@ -5,7 +5,7 @@ weight: 25 # Harbor CLI Encryption Guide -This document provides an overview of how Harbor CLI encrypts sensitive data and offers recommendations for different runtime environments. +This document provides an overview of how Harbor CLI encrypts sensitive data and offers recommendations for different runtime environments. While the Harbor CLI configuration file manages your credentials, passwords themselves are never stored in plain text. Instead, they are secured using the AES-GCM encryption described below. For details on how to configure and manage these credentials, please refer to the [Harbor CLI Config Management documentation](../cli-config). ## Overview of Encryption Harbor CLI secures credentials using AES-GCM encryption. An encryption key is automatically generated and stored in one of several keyring backends, depending on your environment: From e5ee8009f9002aa004afaee82b6ed5d018faa8aa Mon Sep 17 00:00:00 2001 From: Patrick Eschenbach Date: Sat, 12 Apr 2025 15:47:01 +0200 Subject: [PATCH 07/12] Fix: typo Signed-off-by: Patrick Eschenbach --- content/cli-docs/cli-config/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/cli-docs/cli-config/_index.md b/content/cli-docs/cli-config/_index.md index 705f69b29..fa5c2e83f 100644 --- a/content/cli-docs/cli-config/_index.md +++ b/content/cli-docs/cli-config/_index.md @@ -49,7 +49,7 @@ To switch to another credential set, run: ```bash harbor login --name ``` -The CLI will then set the specified credential as the active one, eliminating the need to manually edit your configuration files. This will overwrite the `current +The CLI will then set the specified credential as the active one, eliminating the need to manually edit your configuration files. This will overwrite the `current-credential-name`. ## Configuration Hierarchy (Highest to Lowest Priority) From 841b26fc64e4cb9e518a2d7e7f589c7062a20702 Mon Sep 17 00:00:00 2001 From: Patrick Eschenbach Date: Thu, 5 Jun 2025 17:07:56 +0200 Subject: [PATCH 08/12] Updated cli-docs generation script to track the latest tag of harbor-cli; updated script to use rsync for keeping files in sync and removing outdated docs. encryption, config and main index docs have been moved to cli repo Signed-off-by: Patrick Eschenbach --- Makefile | 1 - cli-docs.sh | 58 ++++----- content/cli-docs/README.md | 13 --- content/cli-docs/_index.md | 20 ---- content/cli-docs/cli-config/_index.md | 110 ------------------ .../cli-docs/harbor-artifact-delete.md | 2 +- .../cli-docs/cli-docs/harbor-artifact-list.md | 24 +++- .../cli-docs/harbor-artifact-scan-start.md | 4 +- .../cli-docs/harbor-artifact-scan-stop.md | 4 +- .../cli-docs/cli-docs/harbor-artifact-scan.md | 4 +- .../cli-docs/harbor-artifact-tags-create.md | 4 +- .../cli-docs/harbor-artifact-tags-delete.md | 4 +- .../cli-docs/harbor-artifact-tags-list.md | 4 +- .../cli-docs/cli-docs/harbor-artifact-tags.md | 4 +- .../cli-docs/cli-docs/harbor-artifact-view.md | 4 +- content/cli-docs/cli-docs/harbor-artifact.md | 8 +- .../cli-docs/harbor-cve-allowlist-add.md | 39 +++++++ .../cli-docs/harbor-cve-allowlist-list.md | 32 +++++ .../cli-docs/cli-docs/harbor-cve-allowlist.md | 40 +++++++ content/cli-docs/cli-docs/harbor-info.md | 20 +++- .../cli-docs/harbor-instance-create.md | 51 ++++++++ .../cli-docs/harbor-instance-delete.md | 44 +++++++ .../cli-docs/cli-docs/harbor-instance-list.md | 49 ++++++++ content/cli-docs/cli-docs/harbor-instance.md | 36 ++++++ .../cli-docs/cli-docs/harbor-quota-list.md | 41 +++++++ .../cli-docs/cli-docs/harbor-quota-update.md | 35 ++++++ .../cli-docs/cli-docs/harbor-quota-view.md | 34 ++++++ content/cli-docs/cli-docs/harbor-quota.md | 41 +++++++ .../cli-docs/harbor-scanner-create.md | 41 +++++++ .../cli-docs/harbor-scanner-delete.md | 49 ++++++++ .../cli-docs/cli-docs/harbor-scanner-list.md | 32 +++++ .../cli-docs/harbor-scanner-metadata.md | 52 +++++++++ .../cli-docs/harbor-scanner-set-default.md | 44 +++++++ .../cli-docs/harbor-scanner-update.md | 65 +++++++++++ .../cli-docs/cli-docs/harbor-scanner-view.md | 52 +++++++++ content/cli-docs/cli-docs/harbor-scanner.md | 35 ++++++ .../cli-docs/harbor-tag-immutable-create.md | 46 ++++++++ .../cli-docs/harbor-tag-immutable-delete.md | 32 +++++ .../cli-docs/harbor-tag-immutable-list.md | 32 +++++ .../cli-docs/cli-docs/harbor-tag-immutable.md | 41 +++++++ content/cli-docs/cli-docs/harbor-tag.md | 33 ++++++ .../cli-docs/harbor-webhook-create.md | 64 ++++++++++ .../cli-docs/harbor-webhook-delete.md | 54 +++++++++ .../cli-docs/cli-docs/harbor-webhook-edit.md | 67 +++++++++++ .../cli-docs/cli-docs/harbor-webhook-list.md | 52 +++++++++ content/cli-docs/cli-docs/harbor-webhook.md | 55 +++++++++ content/cli-docs/cli-docs/harbor.md | 10 +- content/cli-docs/cli-encryption/_index.md | 67 ----------- layouts/partials/navbar.html | 22 ++-- 49 files changed, 1387 insertions(+), 288 deletions(-) delete mode 100644 content/cli-docs/README.md delete mode 100644 content/cli-docs/_index.md delete mode 100644 content/cli-docs/cli-config/_index.md create mode 100644 content/cli-docs/cli-docs/harbor-cve-allowlist-add.md create mode 100644 content/cli-docs/cli-docs/harbor-cve-allowlist-list.md create mode 100644 content/cli-docs/cli-docs/harbor-cve-allowlist.md create mode 100644 content/cli-docs/cli-docs/harbor-instance-create.md create mode 100644 content/cli-docs/cli-docs/harbor-instance-delete.md create mode 100644 content/cli-docs/cli-docs/harbor-instance-list.md create mode 100644 content/cli-docs/cli-docs/harbor-instance.md create mode 100644 content/cli-docs/cli-docs/harbor-quota-list.md create mode 100644 content/cli-docs/cli-docs/harbor-quota-update.md create mode 100644 content/cli-docs/cli-docs/harbor-quota-view.md create mode 100644 content/cli-docs/cli-docs/harbor-quota.md create mode 100644 content/cli-docs/cli-docs/harbor-scanner-create.md create mode 100644 content/cli-docs/cli-docs/harbor-scanner-delete.md create mode 100644 content/cli-docs/cli-docs/harbor-scanner-list.md create mode 100644 content/cli-docs/cli-docs/harbor-scanner-metadata.md create mode 100644 content/cli-docs/cli-docs/harbor-scanner-set-default.md create mode 100644 content/cli-docs/cli-docs/harbor-scanner-update.md create mode 100644 content/cli-docs/cli-docs/harbor-scanner-view.md create mode 100644 content/cli-docs/cli-docs/harbor-scanner.md create mode 100644 content/cli-docs/cli-docs/harbor-tag-immutable-create.md create mode 100644 content/cli-docs/cli-docs/harbor-tag-immutable-delete.md create mode 100644 content/cli-docs/cli-docs/harbor-tag-immutable-list.md create mode 100644 content/cli-docs/cli-docs/harbor-tag-immutable.md create mode 100644 content/cli-docs/cli-docs/harbor-tag.md create mode 100644 content/cli-docs/cli-docs/harbor-webhook-create.md create mode 100644 content/cli-docs/cli-docs/harbor-webhook-delete.md create mode 100644 content/cli-docs/cli-docs/harbor-webhook-edit.md create mode 100644 content/cli-docs/cli-docs/harbor-webhook-list.md create mode 100644 content/cli-docs/cli-docs/harbor-webhook.md delete mode 100644 content/cli-docs/cli-encryption/_index.md diff --git a/Makefile b/Makefile index 14429b42f..62e4e6dee 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,6 @@ clean: prepare: $(CURDIR)/load-docs.sh - $(CURDIR)/cli-docs.sh serve: hugo server \ diff --git a/cli-docs.sh b/cli-docs.sh index f9663bb93..663643d73 100755 --- a/cli-docs.sh +++ b/cli-docs.sh @@ -3,41 +3,25 @@ # Step 1: Clone the required repositories HARBOR_CLI_REPO="https://github.com/goharbor/harbor-cli.git" -# Clone both repos if not already cloned -if [ ! -d "harbor-cli" ]; then - git clone $HARBOR_CLI_REPO -fi - -# Define the paths for relevant folders -HARBOR_CLI_DOCS="harbor-cli/doc/cli-docs" -WEBSITE_CLI_DOCS="content/cli-docs/cli-docs" - -# Step 2: Check for missing files -# List files in both directories - -CLI_FILES_HARBOR_CLI=$(ls $HARBOR_CLI_DOCS) -CLI_FILES_WEBSITE=$(ls $WEBSITE_CLI_DOCS) - -# Find files in harbor-cli that are not present in website's cli-docs folder - -MISSING_FILES=() -for FILE in $CLI_FILES_HARBOR_CLI; do - FILENAME=$(basename "$FILE") - if [ ! -f "$WEBSITE_CLI_DOCS/$FILENAME" ]; then - MISSING_FILES+=("$FILENAME") - fi -done - -# Step 3: Copy missing files -if [ ${#MISSING_FILES[@]} -eq 0 ]; then - echo "No missing files." -else - echo "Copying missing files..." - for FILE in "${MISSING_FILES[@]}"; do - cp "$HARBOR_CLI_DOCS/$FILE" "./content/cli-docs/cli-docs" - echo "Copied $FILE successfully" - done - -fi - +# Step 2: Fetch the latest tag from the repository +LATEST_TAG=$( + git ls-remote --tags --sort='v:refname' "$HARBOR_CLI_REPO" | + tail -n1 | + awk -F/ '{print $3}' +) + +# # Step 3: Clone the repository at the latest tag +git clone --depth 1 --branch "$LATEST_TAG" "$HARBOR_CLI_REPO" harbor-cli + +# Step 4: Copy the CLI documentation to the website directory +HARBOR_CLI_DOCS="harbor-cli/doc/" +WEBSITE_CLI_DOCS="content/cli-docs" +rsync -av --delete --prune-empty-dirs \ + --exclude '*.go' \ + --exclude 'man-docs' \ + --exclude 'README.md' \ + "$HARBOR_CLI_DOCS" \ + "$WEBSITE_CLI_DOCS" + +# Step 5: Clean up the cloned repository rm -rf harbor-cli diff --git a/content/cli-docs/README.md b/content/cli-docs/README.md deleted file mode 100644 index 0ce84b8eb..000000000 --- a/content/cli-docs/README.md +++ /dev/null @@ -1,13 +0,0 @@ -Harbor CLI Documentation - -This is the main table of contents for the Harbor CLI documentation. - -## Harbor CLI Documentation - -This section provides detailed documentation for the Harbor CLI, which allows users to interact with the Harbor using command-line commands. - -- [harbor artifact](cli-docs/harbor-artifact.md) -- [harbor project](cli-docs/harbor-project.md) -- [harbor registry](cli-docs/harbor-registry.md) -- [harbor repo](cli-docs/harbor-repo.md) -- [harbor user](cli-docs/harbor-user.md) diff --git a/content/cli-docs/_index.md b/content/cli-docs/_index.md deleted file mode 100644 index e63a4da0c..000000000 --- a/content/cli-docs/_index.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: Harbor CLI Documentation ---- - -Welcome to the Harbor CLI documentation. This provides detailed documentation for the Harbor CLI. - -## Harbor CLI Documentation - -This section describes the comprehensive set of commands provided by the Harbor CLI, which enables you to efficiently manage and interact with your Harbor registry. - -- `harbor` - Configure the Harbor CLI and set global flags to customize your experience. -- `harbor artifact` - Manage artifacts in Harbor Repository -- `harbor project` - Manage projects and assign resources to them -- `harbor registry` - Manage registries in Harbor -- `harbor repo` - Manage repositories in Harbor context -- `harbor user` - Administer users in Harbor, including creating, updating, and managing user accounts - -## Access the Documentation Source Files - -The source files for this documentation set are located in the [Harbor CLI repository on Github](https://github.com/goharbor/harbor-cli/tree/main/doc/cli-docs). diff --git a/content/cli-docs/cli-config/_index.md b/content/cli-docs/cli-config/_index.md deleted file mode 100644 index fa5c2e83f..000000000 --- a/content/cli-docs/cli-config/_index.md +++ /dev/null @@ -1,110 +0,0 @@ ---- -title: Harbor CLI Config Management -weight: 25 ---- - -# Harbor CLI Configuration Management - -> **Note** -> The Harbor CLI follows the [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) for configuration and data storage by default. - -## Introduction -Harbor CLI is a flexible command-line tool that lets you manage various Harbor environments with different credentials. Whether you need a production-ready setup or quick testing configurations, the CLI's hierarchical structure and XDG support help keep things organized. - - -## Understanding the Configuration Structure -The Harbor CLI can manage multiple credentials and keep track of which credential is currently active. This setup allows you to maintain separate contexts for different Harbor instances or user accounts without having to rewrite configuration files manually. While the Harbor CLI configuration file manages your credentials, passwords themselves are never stored in plain text. Instead, they are secured using the AES-GCM encryption described in the [Harbor CLI Encryption documentation](../cli-config). - -### Example Configuration File -Below is a simplified example of a typical Harbor CLI configuration file: -```yaml -current-credential-name: example@demo-harbor -credentials: - - name: example@demo-harbor - username: example-user - password: example-password - serveraddress: https://demo.goharbor.io -``` - -In this configuration: -- **current-credential-name** references the active credential by name. -- **credentials** holds one or more sets of user credentials, each following the same structure. - -## Managing Multiple Credentials -If you need to work with multiple sets of credentials—such as development, staging, or production — Harbor CLI makes it easy to create and switch between them. - -> **Note**: For more login command details please refer to the [login command reference](../cli-docs/harbor-login.md). -### Creating a New Credentials Entry -Use the `harbor login` command with the required arguments to store new credentials: -```bash -harbor login --name my-new-credential \ - --username myuser \ - --password mypass \ - https://my-harbor-instance.com -``` -This adds a new entry to your credentials list, allowing you to manage different Harbor accounts from the same CLI. - -### Switching Between Credentials -To switch to another credential set, run: -```bash -harbor login --name -``` -The CLI will then set the specified credential as the active one, eliminating the need to manually edit your configuration files. This will overwrite the `current-credential-name`. - - -## Configuration Hierarchy (Highest to Lowest Priority) - -1. **Explicit Config Flag** - Provide a custom config file at runtime using `--config`: - ```bash - harbor --config /path/to/custom/config.yaml artifact list - ``` - -2. **Environment Variable** - Set a persistent configuration through the `HARBOR_CLI_CONFIG` environment variable: - ```bash - export HARBOR_CLI_CONFIG="$HOME/.custom/harbor-config.yaml" - harbor artifact list # Uses the environment-specified config - ``` - -3. **XDG Default Paths** - Automatically discover configuration in the following order: - ```bash - ${XDG_CONFIG_HOME}/harbor-cli/config.yaml # If XDG_CONFIG_HOME is set - ~/.config/harbor-cli/config.yaml # Fallback default - ``` - -## Data Storage Management -### Data File Location - -- **Primary Path**: `$XDG_DATA_HOME/harbor-cli/data.yaml` -- **Fallback Path**: `$HOME/.local/share/harbor-cli/data.yaml` - -> **Important** -> The data file automatically tracks the last-used configuration file path - -## Configuration Precedence Summary -| Priority | Method | Example | -|----------|----------------------------|---------------------------------------| -| 1 | --config flag | harbor --config ./test.yaml ... | -| 2 | HARBOR_CLI_CONFIG env var | export HARBOR_CLI_CONFIG=... | -| 3 | XDG Default Locations | ~/.config/harbor-cli/config.yaml | - -## Practical Usage Examples -### Scenario 1: Temporary Config Override -```bash -harbor --config ./experimental.yaml project create "new-project" -``` - -### Scenario 2: Persistent Environment-based Config -```bash -echo 'export HARBOR_CLI_CONFIG="$HOME/work/configs/prod-harbor.yaml"' >> ~/.zshrc -source ~/.zshrc -harbor config list # Uses production config -``` - -### Scenario 3: Reset to Default Configuration -```bash -unset HARBOR_CLI_CONFIG -harbor config delete --current # Deletes current context -``` diff --git a/content/cli-docs/cli-docs/harbor-artifact-delete.md b/content/cli-docs/cli-docs/harbor-artifact-delete.md index fd4d9ca6a..f79da59e6 100644 --- a/content/cli-docs/cli-docs/harbor-artifact-delete.md +++ b/content/cli-docs/cli-docs/harbor-artifact-delete.md @@ -21,7 +21,7 @@ harbor artifact delete [flags] ### Options inherited from parent commands ```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) -o, --output-format string Output format. One of: json|yaml -v, --verbose verbose output ``` diff --git a/content/cli-docs/cli-docs/harbor-artifact-list.md b/content/cli-docs/cli-docs/harbor-artifact-list.md index dd02b30af..b224e000e 100644 --- a/content/cli-docs/cli-docs/harbor-artifact-list.md +++ b/content/cli-docs/cli-docs/harbor-artifact-list.md @@ -1,12 +1,24 @@ --- title: harbor artifact list -weight: 30 +weight: 20 --- ## harbor artifact list ### Description -##### list artifacts within a repository +##### List container artifacts (images, charts, etc.) in a Harbor repository with metadata + +### Synopsis + +List all artifacts (e.g., container images, charts) within a given Harbor repository. +Supports optional project/repository input in the form /. +Displays key artifact metadata including tags, digest, type, size, vulnerability count, and push time. + +Examples: + harbor-cli artifact list # Interactive prompt for project and repository + harbor-cli artifact list library/nginx # Directly list artifacts in the nginx repo under 'library' project + +Supports pagination, search queries, and sorting using flags. ```sh harbor artifact list [flags] @@ -15,13 +27,17 @@ harbor artifact list [flags] ### Options ```sh - -h, --help help for list + -h, --help help for list + -p, --page int Page number (default 1) + -n, --page-size int Size of per page (default 10) + -q, --query string Query string to query resources + -s, --sort string Sort the resource list in ascending or descending order ``` ### Options inherited from parent commands ```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) -o, --output-format string Output format. One of: json|yaml -v, --verbose verbose output ``` diff --git a/content/cli-docs/cli-docs/harbor-artifact-scan-start.md b/content/cli-docs/cli-docs/harbor-artifact-scan-start.md index 31652afe3..6aa1f46c8 100644 --- a/content/cli-docs/cli-docs/harbor-artifact-scan-start.md +++ b/content/cli-docs/cli-docs/harbor-artifact-scan-start.md @@ -1,6 +1,6 @@ --- title: harbor artifact scan start -weight: 45 +weight: 80 --- ## harbor artifact scan start @@ -31,7 +31,7 @@ harbor artifact scan start // ### Options inherited from parent commands ```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) -o, --output-format string Output format. One of: json|yaml -v, --verbose verbose output ``` diff --git a/content/cli-docs/cli-docs/harbor-artifact-scan-stop.md b/content/cli-docs/cli-docs/harbor-artifact-scan-stop.md index 781c6ad26..527fb11c0 100644 --- a/content/cli-docs/cli-docs/harbor-artifact-scan-stop.md +++ b/content/cli-docs/cli-docs/harbor-artifact-scan-stop.md @@ -1,6 +1,6 @@ --- title: harbor artifact scan stop -weight: 50 +weight: 10 --- ## harbor artifact scan stop @@ -31,7 +31,7 @@ harbor artifact scan stop // ### Options inherited from parent commands ```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) -o, --output-format string Output format. One of: json|yaml -v, --verbose verbose output ``` diff --git a/content/cli-docs/cli-docs/harbor-artifact-scan.md b/content/cli-docs/cli-docs/harbor-artifact-scan.md index c5af733e7..56ac994c3 100644 --- a/content/cli-docs/cli-docs/harbor-artifact-scan.md +++ b/content/cli-docs/cli-docs/harbor-artifact-scan.md @@ -1,6 +1,6 @@ --- title: harbor artifact scan -weight: 40 +weight: 60 --- ## harbor artifact scan @@ -27,7 +27,7 @@ harbor artifact scan start // ### Options inherited from parent commands ```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) -o, --output-format string Output format. One of: json|yaml -v, --verbose verbose output ``` diff --git a/content/cli-docs/cli-docs/harbor-artifact-tags-create.md b/content/cli-docs/cli-docs/harbor-artifact-tags-create.md index 236c3d82f..0e53b7f43 100644 --- a/content/cli-docs/cli-docs/harbor-artifact-tags-create.md +++ b/content/cli-docs/cli-docs/harbor-artifact-tags-create.md @@ -1,6 +1,6 @@ --- title: harbor artifact tags create -weight: 60 +weight: 65 --- ## harbor artifact tags create @@ -27,7 +27,7 @@ harbor artifact tags create // ### Options inherited from parent commands ```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) -o, --output-format string Output format. One of: json|yaml -v, --verbose verbose output ``` diff --git a/content/cli-docs/cli-docs/harbor-artifact-tags-delete.md b/content/cli-docs/cli-docs/harbor-artifact-tags-delete.md index b5b2e15e1..a229557ec 100644 --- a/content/cli-docs/cli-docs/harbor-artifact-tags-delete.md +++ b/content/cli-docs/cli-docs/harbor-artifact-tags-delete.md @@ -1,6 +1,6 @@ --- title: harbor artifact tags delete -weight: 70 +weight: 80 --- ## harbor artifact tags delete @@ -27,7 +27,7 @@ harbor artifact tags delete // ### Options inherited from parent commands ```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) -o, --output-format string Output format. One of: json|yaml -v, --verbose verbose output ``` diff --git a/content/cli-docs/cli-docs/harbor-artifact-tags-list.md b/content/cli-docs/cli-docs/harbor-artifact-tags-list.md index 169ec9501..cdba755d1 100644 --- a/content/cli-docs/cli-docs/harbor-artifact-tags-list.md +++ b/content/cli-docs/cli-docs/harbor-artifact-tags-list.md @@ -1,6 +1,6 @@ --- title: harbor artifact tags list -weight: 65 +weight: 90 --- ## harbor artifact tags list @@ -27,7 +27,7 @@ harbor artifact tags list // ### Options inherited from parent commands ```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) -o, --output-format string Output format. One of: json|yaml -v, --verbose verbose output ``` diff --git a/content/cli-docs/cli-docs/harbor-artifact-tags.md b/content/cli-docs/cli-docs/harbor-artifact-tags.md index 683dd452b..966f96acc 100644 --- a/content/cli-docs/cli-docs/harbor-artifact-tags.md +++ b/content/cli-docs/cli-docs/harbor-artifact-tags.md @@ -1,6 +1,6 @@ --- title: harbor artifact tags -weight: 55 +weight: 85 --- ## harbor artifact tags @@ -23,7 +23,7 @@ weight: 55 ### Options inherited from parent commands ```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) -o, --output-format string Output format. One of: json|yaml -v, --verbose verbose output ``` diff --git a/content/cli-docs/cli-docs/harbor-artifact-view.md b/content/cli-docs/cli-docs/harbor-artifact-view.md index 0c7a12f94..87a566e43 100644 --- a/content/cli-docs/cli-docs/harbor-artifact-view.md +++ b/content/cli-docs/cli-docs/harbor-artifact-view.md @@ -1,6 +1,6 @@ --- title: harbor artifact view -weight: 75 +weight: 95 --- ## harbor artifact view @@ -19,7 +19,7 @@ harbor artifact view [flags] ### Examples ```sh -harbor artifact view // +harbor artifact view /: OR harbor artifact view /@ ``` ### Options diff --git a/content/cli-docs/cli-docs/harbor-artifact.md b/content/cli-docs/cli-docs/harbor-artifact.md index c267dae89..6240e9fba 100644 --- a/content/cli-docs/cli-docs/harbor-artifact.md +++ b/content/cli-docs/cli-docs/harbor-artifact.md @@ -1,6 +1,6 @@ --- title: harbor artifact -weight: 20 +weight: 35 --- ## harbor artifact @@ -27,7 +27,7 @@ Manage artifacts in Harbor Repository ### Options inherited from parent commands ```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) -o, --output-format string Output format. One of: json|yaml -v, --verbose verbose output ``` @@ -36,8 +36,8 @@ Manage artifacts in Harbor Repository * [harbor](harbor.md) - Official Harbor CLI * [harbor artifact delete](harbor-artifact-delete.md) - delete an artifact -* [harbor artifact info](harbor-artifact-info.md) - Get info of an artifact -* [harbor artifact list](harbor-artifact-list.md) - list artifacts within a repository +* [harbor artifact list](harbor-artifact-list.md) - List container artifacts (images, charts, etc.) in a Harbor repository with metadata * [harbor artifact scan](harbor-artifact-scan.md) - Scan an artifact * [harbor artifact tags](harbor-artifact-tags.md) - Manage tags of an artifact +* [harbor artifact view](harbor-artifact-view.md) - Get information of an artifact diff --git a/content/cli-docs/cli-docs/harbor-cve-allowlist-add.md b/content/cli-docs/cli-docs/harbor-cve-allowlist-add.md new file mode 100644 index 000000000..8ab0013bb --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-cve-allowlist-add.md @@ -0,0 +1,39 @@ +--- +title: harbor cve allowlist add +weight: 60 +--- +## harbor cve-allowlist add + +### Description + +##### Add cve allowlist + +### Synopsis + +Create allowlists of CVEs to ignore during vulnerability scanning + +```sh +harbor cve-allowlist add [flags] +``` + +### Options + +```sh + -n, --cveid string Comma-separated list of CVE IDs to be added to the allowlist + -d, --expiredate string Specifies the expiration date for the CVE entries in the format 'YYYY-MM-DD' + -h, --help help for add + -i, --isexpire Indicates whether the CVE entries should have an expiration date. Set to true to specify an expiration date +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor cve-allowlist](harbor-cve-allowlist.md) - Manage system CVE allowlist + diff --git a/content/cli-docs/cli-docs/harbor-cve-allowlist-list.md b/content/cli-docs/cli-docs/harbor-cve-allowlist-list.md new file mode 100644 index 000000000..b7a082343 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-cve-allowlist-list.md @@ -0,0 +1,32 @@ +--- +title: harbor cve allowlist list +weight: 60 +--- +## harbor cve-allowlist list + +### Description + +##### list system level allowlist of cve + +```sh +harbor cve-allowlist list [flags] +``` + +### Options + +```sh + -h, --help help for list +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor cve-allowlist](harbor-cve-allowlist.md) - Manage system CVE allowlist + diff --git a/content/cli-docs/cli-docs/harbor-cve-allowlist.md b/content/cli-docs/cli-docs/harbor-cve-allowlist.md new file mode 100644 index 000000000..dab4a5395 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-cve-allowlist.md @@ -0,0 +1,40 @@ +--- +title: harbor cve allowlist +weight: 70 +--- +## harbor cve-allowlist + +### Description + +##### Manage system CVE allowlist + +### Synopsis + +Managing CVE lists that are intentionally excluded from vulnerability scanning + +### Examples + +```sh +harbor cve-allowlist list +``` + +### Options + +```sh + -h, --help help for cve-allowlist +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor](harbor.md) - Official Harbor CLI +* [harbor cve-allowlist add](harbor-cve-allowlist-add.md) - Add cve allowlist +* [harbor cve-allowlist list](harbor-cve-allowlist-list.md) - list system level allowlist of cve + diff --git a/content/cli-docs/cli-docs/harbor-info.md b/content/cli-docs/cli-docs/harbor-info.md index 8b4a9ce52..50176ca42 100644 --- a/content/cli-docs/cli-docs/harbor-info.md +++ b/content/cli-docs/cli-docs/harbor-info.md @@ -1,17 +1,33 @@ --- title: harbor info -weight: 10 +weight: 65 --- ## harbor info ### Description -##### Show the current credential information +##### Display detailed Harbor system, statistics, and CLI environment information + +### Synopsis + +The 'info' command retrieves and displays general information about the Harbor instance, +including system metadata, storage statistics, and CLI environment details such as user identity, +registry address, and CLI version. + +The output can be formatted as table (default), JSON, or YAML using the '--output-format' flag. ```sh harbor info [flags] ``` +### Examples + +```sh + harbor info + harbor info --output-format json + harbor info -o yaml +``` + ### Options ```sh diff --git a/content/cli-docs/cli-docs/harbor-instance-create.md b/content/cli-docs/cli-docs/harbor-instance-create.md new file mode 100644 index 000000000..bf077280e --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-instance-create.md @@ -0,0 +1,51 @@ +--- +title: harbor instance create +weight: 0 +--- +## harbor instance create + +### Description + +##### Create a new preheat provider instance in Harbor + +### Synopsis + +Create a new preheat provider instance within Harbor for distributing container images. +The instance can be an external service such as Dragonfly, Kraken, or any custom provider. +You will need to provide the instance's name, vendor, endpoint, and optionally other details such as authentication and security options. + +```sh +harbor instance create [flags] +``` + +### Examples + +```sh + harbor-cli instance create --name my-instance --provider Dragonfly --url http://dragonfly.local --description "My preheat provider instance" --enable=true +``` + +### Options + +```sh + -a, --authmode string Choosing different types of authentication method (default "NONE") + --description string Description of the instance + --enable Whether it is enabled or not (default true) + -h, --help help for create + -i, --insecure Whether or not the certificate will be verified when Harbor tries to access the server (default true) + -n, --name string Name of the instance + -p, --provider string Provider for the instance + -u, --url string URL for the instance +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor instance](harbor-instance.md) - Manage preheat provider instances in Harbor + diff --git a/content/cli-docs/cli-docs/harbor-instance-delete.md b/content/cli-docs/cli-docs/harbor-instance-delete.md new file mode 100644 index 000000000..4d278f881 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-instance-delete.md @@ -0,0 +1,44 @@ +--- +title: harbor instance delete +weight: 35 +--- +## harbor instance delete + +### Description + +##### Delete a preheat provider instance by its name or ID + +### Synopsis + +Delete a preheat provider instance from Harbor. You can specify the instance name or ID directly as an argument. +If no argument is provided, you will be prompted to select an instance from a list of available instances. + +```sh +harbor instance delete [flags] +``` + +### Examples + +```sh + harbor-cli instance delete my-instance + harbor-cli instance delete 12345 +``` + +### Options + +```sh + -h, --help help for delete +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor instance](harbor-instance.md) - Manage preheat provider instances in Harbor + diff --git a/content/cli-docs/cli-docs/harbor-instance-list.md b/content/cli-docs/cli-docs/harbor-instance-list.md new file mode 100644 index 000000000..850685d70 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-instance-list.md @@ -0,0 +1,49 @@ +--- +title: harbor instance list +weight: 95 +--- +## harbor instance list + +### Description + +##### List all preheat provider instances in Harbor + +### Synopsis + +List all preheat provider instances registered in Harbor. You can paginate the results, +filter them using a query string, and sort them in ascending or descending order. +This command provides an easy way to view all instances along with their details. + +```sh +harbor instance list [flags] +``` + +### Examples + +```sh + harbor-cli instance list --page 1 --page-size 10 + harbor-cli instance list --query "name=my-instance" --sort "asc" +``` + +### Options + +```sh + -h, --help help for list + --page int Page number (default 1) + --page-size int Size of per page (default 10) + -q, --query string Query string to query resources + --sort string Sort the resource list in ascending or descending order +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor instance](harbor-instance.md) - Manage preheat provider instances in Harbor + diff --git a/content/cli-docs/cli-docs/harbor-instance.md b/content/cli-docs/cli-docs/harbor-instance.md new file mode 100644 index 000000000..deb7b8d49 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-instance.md @@ -0,0 +1,36 @@ +--- +title: harbor instance +weight: 5 +--- +## harbor instance + +### Description + +##### Manage preheat provider instances in Harbor + +### Synopsis + +Manage preheat provider instances used by Harbor for pre-distributing container images. +These instances represent external services such as Dragonfly or Kraken that help preheat images across nodes. + +### Options + +```sh + -h, --help help for instance +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor](harbor.md) - Official Harbor CLI +* [harbor instance create](harbor-instance-create.md) - Create a new preheat provider instance in Harbor +* [harbor instance delete](harbor-instance-delete.md) - Delete a preheat provider instance by its name or ID +* [harbor instance list](harbor-instance-list.md) - List all preheat provider instances in Harbor + diff --git a/content/cli-docs/cli-docs/harbor-quota-list.md b/content/cli-docs/cli-docs/harbor-quota-list.md new file mode 100644 index 000000000..583a004ea --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-quota-list.md @@ -0,0 +1,41 @@ +--- +title: harbor quota list +weight: 85 +--- +## harbor quota list + +### Description + +##### list quotas + +### Synopsis + +list quotas specified for each project + +```sh +harbor quota list [flags] +``` + +### Options + +```sh + -h, --help help for list + --page int Page number (default 1) + --page-size int Size of per page (use 0 to fetch all) + --ref string Reference type of quota + --refid string Reference ID of quota + --sort string Sort the resource list in ascending or descending order +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor quota](harbor-quota.md) - Manage quotas + diff --git a/content/cli-docs/cli-docs/harbor-quota-update.md b/content/cli-docs/cli-docs/harbor-quota-update.md new file mode 100644 index 000000000..cf172f23a --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-quota-update.md @@ -0,0 +1,35 @@ +--- +title: harbor quota update +weight: 70 +--- +## harbor quota update + +### Description + +##### update quotas for projects + +```sh +harbor quota update [QuotaID] [flags] +``` + +### Options + +```sh + -h, --help help for update + --project-id string Get quota by project ID + --project-name string Get quota by project-name + --storage string Enter storage size (e.g., 50GiB, 20MiB, 4TiB) +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor quota](harbor-quota.md) - Manage quotas + diff --git a/content/cli-docs/cli-docs/harbor-quota-view.md b/content/cli-docs/cli-docs/harbor-quota-view.md new file mode 100644 index 000000000..edd0d83bd --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-quota-view.md @@ -0,0 +1,34 @@ +--- +title: harbor quota view +weight: 30 +--- +## harbor quota view + +### Description + +##### get quota by quota ID + +```sh +harbor quota view [quotaID] [flags] +``` + +### Options + +```sh + -h, --help help for view + --project-id string Get quota by project ID + --project-name string Get quota by project-name +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor quota](harbor-quota.md) - Manage quotas + diff --git a/content/cli-docs/cli-docs/harbor-quota.md b/content/cli-docs/cli-docs/harbor-quota.md new file mode 100644 index 000000000..dafe644f3 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-quota.md @@ -0,0 +1,41 @@ +--- +title: harbor quota +weight: 30 +--- +## harbor quota + +### Description + +##### Manage quotas + +### Synopsis + +Manage quotas of projects + +### Examples + +```sh + harbor quota list +``` + +### Options + +```sh + -h, --help help for quota +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor](harbor.md) - Official Harbor CLI +* [harbor quota list](harbor-quota-list.md) - list quotas +* [harbor quota update](harbor-quota-update.md) - update quotas for projects +* [harbor quota view](harbor-quota-view.md) - get quota by quota ID + diff --git a/content/cli-docs/cli-docs/harbor-scanner-create.md b/content/cli-docs/cli-docs/harbor-scanner-create.md new file mode 100644 index 000000000..5a41d58b0 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-scanner-create.md @@ -0,0 +1,41 @@ +--- +title: harbor scanner create +weight: 95 +--- +## harbor scanner create + +### Description + +##### Create a scanner + +```sh +harbor scanner create [flags] +``` + +### Options + +```sh + --auth string Authentication method [None|Basic|Bearer|X-ScannerAdapter-API-Key] + --credential string Authorization header for the Scanner Adapter API + --description string New description for the scanner + --disabled Disable the scanner registration + -h, --help help for create + --name string New name for the scanner + --ping Ping the scanner adapter without creating it. + --skip-cert-verification Skip certificate verification in HTTP requests + --url string Base URL of the scanner adapter + --use-internal-addr Use internal registry address for scanning +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor scanner](harbor-scanner.md) - scanner commands + diff --git a/content/cli-docs/cli-docs/harbor-scanner-delete.md b/content/cli-docs/cli-docs/harbor-scanner-delete.md new file mode 100644 index 000000000..f25ed054f --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-scanner-delete.md @@ -0,0 +1,49 @@ +--- +title: harbor scanner delete +weight: 0 +--- +## harbor scanner delete + +### Description + +##### Delete a scanner registration + +### Synopsis + +Delete a scanner registration from Harbor. + +You can: + - Provide the scanner name as an argument to delete it directly, or + - Omit the argument to select a scanner interactively. + +Note: Deleting a scanner will permanently remove its registration and associated metadata from the system. + +Examples: + # Delete a scanner by name + harbor scanner delete trivy-scanner + + # Interactively choose a scanner to delete + harbor scanner delete + +```sh +harbor scanner delete [scanner-name] [flags] +``` + +### Options + +```sh + -h, --help help for delete +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor scanner](harbor-scanner.md) - scanner commands + diff --git a/content/cli-docs/cli-docs/harbor-scanner-list.md b/content/cli-docs/cli-docs/harbor-scanner-list.md new file mode 100644 index 000000000..9e2f9b572 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-scanner-list.md @@ -0,0 +1,32 @@ +--- +title: harbor scanner list +weight: 50 +--- +## harbor scanner list + +### Description + +##### List scanners + +```sh +harbor scanner list [flags] +``` + +### Options + +```sh + -h, --help help for list +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor scanner](harbor-scanner.md) - scanner commands + diff --git a/content/cli-docs/cli-docs/harbor-scanner-metadata.md b/content/cli-docs/cli-docs/harbor-scanner-metadata.md new file mode 100644 index 000000000..1b41727f0 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-scanner-metadata.md @@ -0,0 +1,52 @@ +--- +title: harbor scanner metadata +weight: 60 +--- +## harbor scanner metadata + +### Description + +##### Retrieve metadata for a specific scanner + +### Synopsis + +Retrieve detailed metadata for a specified scanner integration in Harbor. + +You can either: + - Provide the scanner name as an argument (recommended), or + - Leave it blank to be prompted interactively. + +The metadata includes supported MIME types, capabilities, vendor information, and more. + +Examples: + # Get metadata for a specific scanner by name + harbor scanner metadata trivy-scanner + + # Interactively select a scanner if no name is provided + harbor scanner metadata + +Flags: + --output-format Output format: 'json' or 'yaml' (default is table view) + +```sh +harbor scanner metadata [scanner-name] [flags] +``` + +### Options + +```sh + -h, --help help for metadata +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor scanner](harbor-scanner.md) - scanner commands + diff --git a/content/cli-docs/cli-docs/harbor-scanner-set-default.md b/content/cli-docs/cli-docs/harbor-scanner-set-default.md new file mode 100644 index 000000000..e2e07b300 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-scanner-set-default.md @@ -0,0 +1,44 @@ +--- +title: harbor scanner set default +weight: 25 +--- +## harbor scanner set-default + +### Description + +##### Set the default scanner for Harbor + +### Synopsis + +Set the scanner that will be used as the default in Harbor. This scanner will be used for all default scanning tasks unless another scanner is specified. + +```sh +harbor scanner set-default [flags] +``` + +### Examples + +```sh +harbor scanner set-default [scanner-name] + OR + harbor scanner set-default --id +``` + +### Options + +```sh + -h, --help help for set-default +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor scanner](harbor-scanner.md) - scanner commands + diff --git a/content/cli-docs/cli-docs/harbor-scanner-update.md b/content/cli-docs/cli-docs/harbor-scanner-update.md new file mode 100644 index 000000000..b12329c63 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-scanner-update.md @@ -0,0 +1,65 @@ +--- +title: harbor scanner update +weight: 90 +--- +## harbor scanner update + +### Description + +##### Update a scanner registration + +### Synopsis + +Update the fields of an existing scanner registration. + +You can pass the scanner name as an argument, or the CLI will prompt you to enter a scanner ID. +Only the fields passed through flags will be updated; other fields will retain their existing values. + +```sh +harbor scanner update [scanner-name] [flags] +``` + +### Examples + +```sh + + # Update description and URL for a scanner named 'trivy-scanner' + harbor scanner update trivy-scanner --description "Updated scanner" --url "http://trivy.local:8080" + + # Change the authentication method and credential + harbor scanner update trivy-scanner --auth Basic --credential "base64encodedAuth" + + # Disable the scanner and rename it + harbor scanner update trivy-scanner --name "trivy-secure" --disabled + + # If no name is passed, you'll be prompted to enter a Scanner ID + harbor scanner update --description "Updated via ID prompt" + +``` + +### Options + +```sh + --auth string Authentication method [None|Basic|Bearer|X-ScannerAdapter-API-Key] + --credential string Authorization header for the Scanner Adapter API + --description string New description for the scanner + --disabled Disable the scanner registration + -h, --help help for update + --name string New name for the scanner + --skip-cert-verification Skip certificate verification in HTTP requests + --url string Base URL of the scanner adapter + --use-internal-addr Use internal registry address for scanning +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor scanner](harbor-scanner.md) - scanner commands + diff --git a/content/cli-docs/cli-docs/harbor-scanner-view.md b/content/cli-docs/cli-docs/harbor-scanner-view.md new file mode 100644 index 000000000..6b2ef834c --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-scanner-view.md @@ -0,0 +1,52 @@ +--- +title: harbor scanner view +weight: 95 +--- +## harbor scanner view + +### Description + +##### Display detailed information about a scanner registration + +### Synopsis + +Display full details of a scanner registration in Harbor. + +You can: + - Provide a scanner name to view its details directly. + - Omit the argument to select a scanner interactively by ID. + +Supports custom output formats using the --output-format flag (e.g., json, yaml, table). + +Examples: + # View a specific scanner by name + harbor scanner view trivy-scanner + + # Interactively choose a scanner to view + harbor scanner view + + # View scanner in JSON format + harbor scanner view trivy-scanner --output-format=json + +```sh +harbor scanner view [scanner-name] [flags] +``` + +### Options + +```sh + -h, --help help for view +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor scanner](harbor-scanner.md) - scanner commands + diff --git a/content/cli-docs/cli-docs/harbor-scanner.md b/content/cli-docs/cli-docs/harbor-scanner.md new file mode 100644 index 000000000..8dcfd70c0 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-scanner.md @@ -0,0 +1,35 @@ +--- +title: harbor scanner +weight: 70 +--- +## harbor scanner + +### Description + +##### scanner commands + +### Options + +```sh + -h, --help help for scanner +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor](harbor.md) - Official Harbor CLI +* [harbor scanner create](harbor-scanner-create.md) - Create a scanner +* [harbor scanner delete](harbor-scanner-delete.md) - Delete a scanner registration +* [harbor scanner list](harbor-scanner-list.md) - List scanners +* [harbor scanner metadata](harbor-scanner-metadata.md) - Retrieve metadata for a specific scanner +* [harbor scanner set-default](harbor-scanner-set-default.md) - Set the default scanner for Harbor +* [harbor scanner update](harbor-scanner-update.md) - Update a scanner registration +* [harbor scanner view](harbor-scanner-view.md) - Display detailed information about a scanner registration + diff --git a/content/cli-docs/cli-docs/harbor-tag-immutable-create.md b/content/cli-docs/cli-docs/harbor-tag-immutable-create.md new file mode 100644 index 000000000..7580f673e --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-tag-immutable-create.md @@ -0,0 +1,46 @@ +--- +title: harbor tag immutable create +weight: 0 +--- +## harbor tag immutable create + +### Description + +##### create immutable tag rule + +### Synopsis + +create immutable tag rule to the project in harbor + +```sh +harbor tag immutable create [flags] +``` + +### Examples + +```sh +harbor tag immutable create +``` + +### Options + +```sh + -h, --help help for create + --repo-decoration string repository which either apply or exclude from the rule + --repo-list string list of repository to which to either apply or exclude from the rule + --tag-decoration string tags which either apply or exclude from the rule + --tag-list string list of tags to which to either apply or exclude from the rule +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor tag immutable](harbor-tag-immutable.md) - Manage Immutability rules in the project + diff --git a/content/cli-docs/cli-docs/harbor-tag-immutable-delete.md b/content/cli-docs/cli-docs/harbor-tag-immutable-delete.md new file mode 100644 index 000000000..58bb67cfd --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-tag-immutable-delete.md @@ -0,0 +1,32 @@ +--- +title: harbor tag immutable delete +weight: 0 +--- +## harbor tag immutable delete + +### Description + +##### delete immutable rule + +```sh +harbor tag immutable delete [flags] +``` + +### Options + +```sh + -h, --help help for delete +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor tag immutable](harbor-tag-immutable.md) - Manage Immutability rules in the project + diff --git a/content/cli-docs/cli-docs/harbor-tag-immutable-list.md b/content/cli-docs/cli-docs/harbor-tag-immutable-list.md new file mode 100644 index 000000000..bfcf56bb3 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-tag-immutable-list.md @@ -0,0 +1,32 @@ +--- +title: harbor tag immutable list +weight: 40 +--- +## harbor tag immutable list + +### Description + +##### list all immutable tag rule of project + +```sh +harbor tag immutable list [flags] +``` + +### Options + +```sh + -h, --help help for list +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor tag immutable](harbor-tag-immutable.md) - Manage Immutability rules in the project + diff --git a/content/cli-docs/cli-docs/harbor-tag-immutable.md b/content/cli-docs/cli-docs/harbor-tag-immutable.md new file mode 100644 index 000000000..23ff3f495 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-tag-immutable.md @@ -0,0 +1,41 @@ +--- +title: harbor tag immutable +weight: 25 +--- +## harbor tag immutable + +### Description + +##### Manage Immutability rules in the project + +### Synopsis + +Manage Immutability rules in the project in Harbor + +### Examples + +```sh +harbor tag immutable +``` + +### Options + +```sh + -h, --help help for immutable +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor tag](harbor-tag.md) - Manage tags in Harbor registry +* [harbor tag immutable create](harbor-tag-immutable-create.md) - create immutable tag rule +* [harbor tag immutable delete](harbor-tag-immutable-delete.md) - delete immutable rule +* [harbor tag immutable list](harbor-tag-immutable-list.md) - list all immutable tag rule of project + diff --git a/content/cli-docs/cli-docs/harbor-tag.md b/content/cli-docs/cli-docs/harbor-tag.md new file mode 100644 index 000000000..7d5a0a995 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-tag.md @@ -0,0 +1,33 @@ +--- +title: harbor tag +weight: 0 +--- +## harbor tag + +### Description + +##### Manage tags in Harbor registry + +### Synopsis + +Manage tags in the Harbor registry, including creating, listing, and deleting rules. + +### Options + +```sh + -h, --help help for tag +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor](harbor.md) - Official Harbor CLI +* [harbor tag immutable](harbor-tag-immutable.md) - Manage Immutability rules in the project + diff --git a/content/cli-docs/cli-docs/harbor-webhook-create.md b/content/cli-docs/cli-docs/harbor-webhook-create.md new file mode 100644 index 000000000..ac4cd75e1 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-webhook-create.md @@ -0,0 +1,64 @@ +--- +title: harbor webhook create +weight: 60 +--- +## harbor webhook create + +### Description + +##### Create a new webhook for a Harbor project + +### Synopsis + +This command creates a new webhook policy for a specified Harbor project. + +You can either provide all required flags (project name, notify type, endpoint, etc.) directly to create the webhook non-interactively, +or leave them out and be guided through an interactive prompt to input each field. The webhook name is required as an argument. + +```sh +harbor webhook create [name] [flags] +``` + +### Examples + +```sh + # Create a webhook using flags + harbor-cli webhook create my-webhook \ + --project my-project \ + --notify-type http \ + --event-type PUSH_ARTIFACT,DELETE_ARTIFACT \ + --endpoint-url https://example.com/webhook \ + --description "Webhook for artifact events" \ + --payload-format Default \ + --auth-header "Bearer mytoken" + + # Create a webhook using the interactive prompt + harbor-cli webhook create my-webhook +``` + +### Options + +```sh + --auth-header string Authentication Header + --description string Webhook Description + --endpoint-url string Webhook Endpoint URL + --event-type strings Event Types (comma separated) + -h, --help help for create + --notify-type string Notify Type (http, slack) + --payload-format string Payload Format (Default, CloudEvents) + --project string Project Name + --verify-remote-certificate Verify Remote Certificate (default true) +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor webhook](harbor-webhook.md) - Manage webhook policies in Harbor + diff --git a/content/cli-docs/cli-docs/harbor-webhook-delete.md b/content/cli-docs/cli-docs/harbor-webhook-delete.md new file mode 100644 index 000000000..ea8822084 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-webhook-delete.md @@ -0,0 +1,54 @@ +--- +title: harbor webhook delete +weight: 70 +--- +## harbor webhook delete + +### Description + +##### Delete a webhook from a Harbor project + +### Synopsis + +Delete a webhook from a specified Harbor project. +You can either specify the project name and webhook ID using flags, +pass the webhook name as an argument, +or interactively select a project and webhook if not provided. + +```sh +harbor webhook delete [webhook-name] [flags] +``` + +### Examples + +```sh + # Delete by project and webhook ID + harbor-cli webhook delete --project my-project --webhook 5 + + # Delete by project and webhook name + harbor-cli webhook delete my-webhook --project my-project + + # Fully interactive deletion + harbor-cli webhook delete +``` + +### Options + +```sh + -h, --help help for delete + --project string Project name (required when providing webhook ID or name) + --webhook-id int Webhook ID (alternative to providing webhook name as argument) (default -1) +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor webhook](harbor-webhook.md) - Manage webhook policies in Harbor + diff --git a/content/cli-docs/cli-docs/harbor-webhook-edit.md b/content/cli-docs/cli-docs/harbor-webhook-edit.md new file mode 100644 index 000000000..2f512aef1 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-webhook-edit.md @@ -0,0 +1,67 @@ +--- +title: harbor webhook edit +weight: 55 +--- +## harbor webhook edit + +### Description + +##### Edit an existing webhook for a Harbor project + +### Synopsis + +This command allows you to update an existing webhook policy in a Harbor project. + +You can either pass all the necessary flags (webhook ID, project name, etc.) to perform a non-interactive update, +or leave them out and use the interactive prompt to select and update a webhook. + +```sh +harbor webhook edit [WEBHOOK_NAME] [flags] +``` + +### Examples + +```sh + # Edit a webhook by providing all fields directly + harbor-cli webhook edit my-webhook \ + --project my-project \ + --notify-type http \ + --event-type PUSH_ARTIFACT \ + --endpoint-url https://new-url.com \ + --description "Updated webhook for artifact push" \ + --payload-format Default \ + --auth-header "Bearer newtoken" \ + --enabled=true + + # Edit a webhook using the interactive prompt + harbor-cli webhook edit +``` + +### Options + +```sh + --auth-header string Authentication Header + --description string Webhook Description + --enabled Webhook Enabled (default true) + --endpoint-url string Webhook Endpoint URL + --event-type strings Event Types (comma separated) + -h, --help help for edit + --notify-type string Notify Type (http, slack) + --payload-format string Payload Format (Default, CloudEvents) + --project string Project Name + --verify-remote-certificate Verify Remote Certificate (default true) + --webhook-id int Webhook ID (default -1) +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor webhook](harbor-webhook.md) - Manage webhook policies in Harbor + diff --git a/content/cli-docs/cli-docs/harbor-webhook-list.md b/content/cli-docs/cli-docs/harbor-webhook-list.md new file mode 100644 index 000000000..e448d5033 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-webhook-list.md @@ -0,0 +1,52 @@ +--- +title: harbor webhook list +weight: 60 +--- +## harbor webhook list + +### Description + +##### List all webhook policies for a Harbor project + +### Synopsis + +This command retrieves and displays all webhook policies associated with a Harbor project. + +You can either specify the project name directly as an argument or use the interactive prompt to select a project. +Use the '--output-format' flag for raw JSON output. + +```sh +harbor webhook list [PROJECT_NAME] [flags] +``` + +### Examples + +```sh + # List webhooks for a specific project + harbor-cli webhook list my-project + + # List webhooks interactively by selecting the project + harbor-cli webhook list + + # Output in JSON format + harbor-cli webhook list my-project --output-format=json +``` + +### Options + +```sh + -h, --help help for list +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor webhook](harbor-webhook.md) - Manage webhook policies in Harbor + diff --git a/content/cli-docs/cli-docs/harbor-webhook.md b/content/cli-docs/cli-docs/harbor-webhook.md new file mode 100644 index 000000000..72466c2f3 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-webhook.md @@ -0,0 +1,55 @@ +--- +title: harbor webhook +weight: 0 +--- +## harbor webhook + +### Description + +##### Manage webhook policies in Harbor + +### Synopsis + +Use this command to manage webhook policies in your Harbor projects. + +Webhooks enable external systems to be notified of events in Harbor (e.g., pushing an image, deleting an artifact). +This command supports listing, creating, editing, and deleting webhook configurations. + +### Examples + +```sh + # List webhook policies in a project + harbor-cli webhook list my-project + + # Create a new webhook policy + harbor-cli webhook create --project my-project --name my-webhook + + # Edit an existing webhook policy + harbor-cli webhook edit --project my-project --webhook-id 5 + + # Delete a webhook policy + harbor-cli webhook delete --project my-project --webhook-id 5 +``` + +### Options + +```sh + -h, --help help for webhook +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor](harbor.md) - Official Harbor CLI +* [harbor webhook create](harbor-webhook-create.md) - Create a new webhook for a Harbor project +* [harbor webhook delete](harbor-webhook-delete.md) - Delete a webhook from a Harbor project +* [harbor webhook edit](harbor-webhook-edit.md) - Edit an existing webhook for a Harbor project +* [harbor webhook list](harbor-webhook-list.md) - List all webhook policies for a Harbor project + diff --git a/content/cli-docs/cli-docs/harbor.md b/content/cli-docs/cli-docs/harbor.md index 5b7f98e8d..18354df29 100644 --- a/content/cli-docs/cli-docs/harbor.md +++ b/content/cli-docs/cli-docs/harbor.md @@ -1,6 +1,6 @@ --- title: harbor -weight: 5 +weight: 95 --- ## harbor @@ -27,7 +27,7 @@ harbor help ### Options ```sh - --config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) -h, --help help for harbor -o, --output-format string Output format. One of: json|yaml -v, --verbose verbose output @@ -36,10 +36,16 @@ harbor help ### SEE ALSO * [harbor artifact](harbor-artifact.md) - Manage artifacts +* [harbor config](harbor-config.md) - Manage the config of the Harbor Cli +* [harbor health](harbor-health.md) - Get the health status of Harbor components +* [harbor info](harbor-info.md) - Show the current credential information +* [harbor label](harbor-label.md) - Manage labels in Harbor * [harbor login](harbor-login.md) - Log in to Harbor registry * [harbor project](harbor-project.md) - Manage projects and assign resources to them * [harbor registry](harbor-registry.md) - Manage registries * [harbor repo](harbor-repo.md) - Manage repositories +* [harbor schedule](harbor-schedule.md) - Schedule jobs in Harbor * [harbor user](harbor-user.md) - Manage users * [harbor version](harbor-version.md) - Version of Harbor CLI +* [harbor webhook](harbor-webhook.md) - Manage webhooks diff --git a/content/cli-docs/cli-encryption/_index.md b/content/cli-docs/cli-encryption/_index.md deleted file mode 100644 index bccdc008f..000000000 --- a/content/cli-docs/cli-encryption/_index.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: Harbor CLI Encryption -weight: 25 ---- - -# Harbor CLI Encryption Guide - -This document provides an overview of how Harbor CLI encrypts sensitive data and offers recommendations for different runtime environments. While the Harbor CLI configuration file manages your credentials, passwords themselves are never stored in plain text. Instead, they are secured using the AES-GCM encryption described below. For details on how to configure and manage these credentials, please refer to the [Harbor CLI Config Management documentation](../cli-config). - -## Overview of Encryption -Harbor CLI secures credentials using AES-GCM encryption. An encryption key is automatically generated and stored in one of several keyring backends, depending on your environment: - -1. **Environment-based Keyring** -2. **System Keyring** -3. **File-based Keyring (Fallback)** - -### How It Works -1. **Key Retrieval** - The CLI checks if an encryption key already exists. - If not present, Harbor CLI generates a new 32-byte key. -2. **Encrypt** - Harbor CLI uses AES-GCM to encrypt credentials with a random nonce. - The CLI stores ciphertext as a Base64-encoded string. -3. **Decrypt** - Harbor CLI decodes and decrypts the stored ciphertext whenever credentials are needed. - -## Recommended Backends -### Desktop Environments -**Use the system keyring** if available. This is the most secure method, as most desktop operating systems keep secrets confidentially within their native keyring service. - -### Docker / Kubernetes Environments -**Use the environment-based keyring** in production. System keyrings typically aren’t available in Docker or Kubernetes. Supplying encryption keys as environment variables or secrets is straightforward. - -#### Example: Running Harbor CLI in Docker -Use a randomly generated key as an environment variable: -```bash -docker run -it --rm \ - -e HARBOR_ENCRYPTION_KEY="$(openssl rand -base64 32)" \ - registry.goharbor.io/harbor-cli/harbor-cli \ - login https://demo.goharbor.io -u username -p password -``` - -#### Example: Running Harbor CLI in Kubernetes -Use a randomly generated key / strong password and store in a kubernetes secret. Pass the secret content as an environment variable to the deployment pod: -```yaml -# secrets.yaml -apiVersion: v1 -kind: Secret -metadata: - name: harbor-cli-secrets -type: Opaque -data: - HARBOR_ENCRYPTION_KEY: "" - -# deployment.yaml -spec: - containers: - - name: harbor-cli - image: registry.goharbor.io/harbor-cli/harbor-cli - envFrom: - - secretRef: - name: harbor-cli-secrets -``` - -### File-based Keyring (Fallback) - -In environments where neither a system keyring nor environment-based keyring is available, Harbor CLI can store the encryption key in a file. By default, this file-based keyring is located at `~/.harbor/keyring`. The stored key is protected by file permissions set to allow only the owner to read or write the file. However, **this approach is less secure** and is **not recommended for production**. diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html index 531aafaa8..28bff1197 100644 --- a/layouts/partials/navbar.html +++ b/layouts/partials/navbar.html @@ -67,6 +67,17 @@

{{ end }} - From 26c88f673c3c4205695856ff326174d7eaf974a3 Mon Sep 17 00:00:00 2001 From: Patrick Eschenbach Date: Wed, 2 Jul 2025 09:53:55 +0200 Subject: [PATCH 09/12] Added latest tag after release of harbor-cli Signed-off-by: Patrick Eschenbach --- cli-docs.sh | 2 +- content/cli-docs/_index.md | 20 ++++ content/cli-docs/cli-config/_index.md | 110 ++++++++++++++++++ .../cli-docs/harbor-artifact-label-add.md | 48 ++++++++ .../cli-docs/harbor-artifact-label-delete.md | 50 ++++++++ .../cli-docs/harbor-artifact-label-list.md | 56 +++++++++ .../cli-docs/harbor-artifact-label.md | 43 +++++++ content/cli-docs/cli-docs/harbor-artifact.md | 1 + content/cli-docs/cli-docs/harbor-config.md | 36 ------ ...fig-delete.md => harbor-context-delete.md} | 16 ++- ...or-config-get.md => harbor-context-get.md} | 12 +- ...-config-list.md => harbor-context-list.md} | 16 +-- ...or-config-set.md => harbor-context-set.md} | 0 .../cli-docs/harbor-context-switch.md | 38 ++++++ ...fig-update.md => harbor-context-update.md} | 10 +- content/cli-docs/cli-docs/harbor-context.md | 44 +++++++ .../cli-docs/harbor-cve-allowlist-add.md | 2 +- .../cli-docs/harbor-cve-allowlist-list.md | 2 +- .../cli-docs/cli-docs/harbor-cve-allowlist.md | 2 +- content/cli-docs/cli-docs/harbor-health.md | 2 +- .../cli-docs/harbor-instance-create.md | 2 +- .../cli-docs/harbor-instance-delete.md | 3 +- .../cli-docs/cli-docs/harbor-label-delete.md | 2 +- content/cli-docs/cli-docs/harbor-login.md | 4 +- .../cli-docs/harbor-project-config-list.md | 56 +++++++++ .../cli-docs/harbor-project-config-update.md | 63 ++++++++++ .../cli-docs/harbor-project-config.md | 31 +++++ .../cli-docs/harbor-project-create.md | 9 +- .../cli-docs/harbor-project-delete.md | 18 ++- .../cli-docs/cli-docs/harbor-project-list.md | 9 +- .../cli-docs/cli-docs/harbor-project-logs.md | 8 +- .../cli-docs/harbor-project-robot-create.md | 92 +++++++++++++++ .../cli-docs/harbor-project-robot-delete.md | 61 ++++++++++ .../cli-docs/harbor-project-robot-list.md | 73 ++++++++++++ .../cli-docs/harbor-project-robot-refresh.md | 73 ++++++++++++ .../cli-docs/harbor-project-robot-update.md | 82 +++++++++++++ .../cli-docs/harbor-project-robot-view.md | 62 ++++++++++ .../cli-docs/cli-docs/harbor-project-robot.md | 40 +++++++ .../cli-docs/cli-docs/harbor-project-view.md | 3 +- content/cli-docs/cli-docs/harbor-project.md | 9 +- .../cli-docs/harbor-registry-create.md | 12 +- .../cli-docs/harbor-registry-delete.md | 10 +- .../cli-docs/cli-docs/harbor-registry-list.md | 2 +- .../cli-docs/harbor-registry-update.md | 18 +-- .../cli-docs/cli-docs/harbor-registry-view.md | 10 +- content/cli-docs/cli-docs/harbor-registry.md | 7 +- .../cli-docs/cli-docs/harbor-repo-delete.md | 2 +- content/cli-docs/cli-docs/harbor-repo-list.md | 18 ++- content/cli-docs/cli-docs/harbor-repo.md | 5 +- .../cli-docs/harbor-scan-all-metrics.md | 60 ++++++++++ .../cli-docs/cli-docs/harbor-scan-all-run.md | 59 ++++++++++ .../cli-docs/cli-docs/harbor-scan-all-stop.md | 46 ++++++++ .../harbor-scan-all-update-schedule.md | 67 +++++++++++ .../cli-docs/harbor-scan-all-view-schedule.md | 54 +++++++++ content/cli-docs/cli-docs/harbor-scan-all.md | 33 ++++++ .../cli-docs/harbor-scanner-delete.md | 2 +- .../cli-docs/harbor-tag-immutable-create.md | 2 +- .../cli-docs/harbor-tag-immutable-delete.md | 2 +- .../cli-docs/harbor-tag-immutable-list.md | 22 +++- .../cli-docs/cli-docs/harbor-tag-immutable.md | 2 +- content/cli-docs/cli-docs/harbor-tag.md | 2 +- .../cli-docs/cli-docs/harbor-user-create.md | 2 +- .../cli-docs/cli-docs/harbor-user-delete.md | 4 +- .../cli-docs/cli-docs/harbor-user-elevate.md | 2 +- content/cli-docs/cli-docs/harbor-user-list.md | 10 +- content/cli-docs/cli-docs/harbor-user.md | 6 +- content/cli-docs/cli-docs/harbor-version.md | 2 +- content/cli-docs/cli-docs/harbor-webhook.md | 2 +- content/cli-docs/cli-docs/harbor.md | 12 +- content/cli-docs/cli-encryption/_index.md | 73 ++++++++++++ 70 files changed, 1619 insertions(+), 139 deletions(-) create mode 100644 content/cli-docs/_index.md create mode 100644 content/cli-docs/cli-config/_index.md create mode 100644 content/cli-docs/cli-docs/harbor-artifact-label-add.md create mode 100644 content/cli-docs/cli-docs/harbor-artifact-label-delete.md create mode 100644 content/cli-docs/cli-docs/harbor-artifact-label-list.md create mode 100644 content/cli-docs/cli-docs/harbor-artifact-label.md delete mode 100644 content/cli-docs/cli-docs/harbor-config.md rename content/cli-docs/cli-docs/{harbor-config-delete.md => harbor-context-delete.md} (68%) rename content/cli-docs/cli-docs/{harbor-config-get.md => harbor-context-get.md} (74%) rename content/cli-docs/cli-docs/{harbor-config-list.md => harbor-context-list.md} (61%) rename content/cli-docs/cli-docs/{harbor-config-set.md => harbor-context-set.md} (100%) create mode 100644 content/cli-docs/cli-docs/harbor-context-switch.md rename content/cli-docs/cli-docs/{harbor-config-update.md => harbor-context-update.md} (81%) create mode 100644 content/cli-docs/cli-docs/harbor-context.md create mode 100644 content/cli-docs/cli-docs/harbor-project-config-list.md create mode 100644 content/cli-docs/cli-docs/harbor-project-config-update.md create mode 100644 content/cli-docs/cli-docs/harbor-project-config.md create mode 100644 content/cli-docs/cli-docs/harbor-project-robot-create.md create mode 100644 content/cli-docs/cli-docs/harbor-project-robot-delete.md create mode 100644 content/cli-docs/cli-docs/harbor-project-robot-list.md create mode 100644 content/cli-docs/cli-docs/harbor-project-robot-refresh.md create mode 100644 content/cli-docs/cli-docs/harbor-project-robot-update.md create mode 100644 content/cli-docs/cli-docs/harbor-project-robot-view.md create mode 100644 content/cli-docs/cli-docs/harbor-project-robot.md create mode 100644 content/cli-docs/cli-docs/harbor-scan-all-metrics.md create mode 100644 content/cli-docs/cli-docs/harbor-scan-all-run.md create mode 100644 content/cli-docs/cli-docs/harbor-scan-all-stop.md create mode 100644 content/cli-docs/cli-docs/harbor-scan-all-update-schedule.md create mode 100644 content/cli-docs/cli-docs/harbor-scan-all-view-schedule.md create mode 100644 content/cli-docs/cli-docs/harbor-scan-all.md create mode 100644 content/cli-docs/cli-encryption/_index.md diff --git a/cli-docs.sh b/cli-docs.sh index 663643d73..3a2e32fce 100755 --- a/cli-docs.sh +++ b/cli-docs.sh @@ -12,7 +12,7 @@ LATEST_TAG=$( # # Step 3: Clone the repository at the latest tag git clone --depth 1 --branch "$LATEST_TAG" "$HARBOR_CLI_REPO" harbor-cli - +# git clone --depth 1 --branch main "$HARBOR_CLI_REPO" harbor-cli # Step 4: Copy the CLI documentation to the website directory HARBOR_CLI_DOCS="harbor-cli/doc/" WEBSITE_CLI_DOCS="content/cli-docs" diff --git a/content/cli-docs/_index.md b/content/cli-docs/_index.md new file mode 100644 index 000000000..e63a4da0c --- /dev/null +++ b/content/cli-docs/_index.md @@ -0,0 +1,20 @@ +--- +title: Harbor CLI Documentation +--- + +Welcome to the Harbor CLI documentation. This provides detailed documentation for the Harbor CLI. + +## Harbor CLI Documentation + +This section describes the comprehensive set of commands provided by the Harbor CLI, which enables you to efficiently manage and interact with your Harbor registry. + +- `harbor` - Configure the Harbor CLI and set global flags to customize your experience. +- `harbor artifact` - Manage artifacts in Harbor Repository +- `harbor project` - Manage projects and assign resources to them +- `harbor registry` - Manage registries in Harbor +- `harbor repo` - Manage repositories in Harbor context +- `harbor user` - Administer users in Harbor, including creating, updating, and managing user accounts + +## Access the Documentation Source Files + +The source files for this documentation set are located in the [Harbor CLI repository on Github](https://github.com/goharbor/harbor-cli/tree/main/doc/cli-docs). diff --git a/content/cli-docs/cli-config/_index.md b/content/cli-docs/cli-config/_index.md new file mode 100644 index 000000000..fa5c2e83f --- /dev/null +++ b/content/cli-docs/cli-config/_index.md @@ -0,0 +1,110 @@ +--- +title: Harbor CLI Config Management +weight: 25 +--- + +# Harbor CLI Configuration Management + +> **Note** +> The Harbor CLI follows the [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) for configuration and data storage by default. + +## Introduction +Harbor CLI is a flexible command-line tool that lets you manage various Harbor environments with different credentials. Whether you need a production-ready setup or quick testing configurations, the CLI's hierarchical structure and XDG support help keep things organized. + + +## Understanding the Configuration Structure +The Harbor CLI can manage multiple credentials and keep track of which credential is currently active. This setup allows you to maintain separate contexts for different Harbor instances or user accounts without having to rewrite configuration files manually. While the Harbor CLI configuration file manages your credentials, passwords themselves are never stored in plain text. Instead, they are secured using the AES-GCM encryption described in the [Harbor CLI Encryption documentation](../cli-config). + +### Example Configuration File +Below is a simplified example of a typical Harbor CLI configuration file: +```yaml +current-credential-name: example@demo-harbor +credentials: + - name: example@demo-harbor + username: example-user + password: example-password + serveraddress: https://demo.goharbor.io +``` + +In this configuration: +- **current-credential-name** references the active credential by name. +- **credentials** holds one or more sets of user credentials, each following the same structure. + +## Managing Multiple Credentials +If you need to work with multiple sets of credentials—such as development, staging, or production — Harbor CLI makes it easy to create and switch between them. + +> **Note**: For more login command details please refer to the [login command reference](../cli-docs/harbor-login.md). +### Creating a New Credentials Entry +Use the `harbor login` command with the required arguments to store new credentials: +```bash +harbor login --name my-new-credential \ + --username myuser \ + --password mypass \ + https://my-harbor-instance.com +``` +This adds a new entry to your credentials list, allowing you to manage different Harbor accounts from the same CLI. + +### Switching Between Credentials +To switch to another credential set, run: +```bash +harbor login --name +``` +The CLI will then set the specified credential as the active one, eliminating the need to manually edit your configuration files. This will overwrite the `current-credential-name`. + + +## Configuration Hierarchy (Highest to Lowest Priority) + +1. **Explicit Config Flag** + Provide a custom config file at runtime using `--config`: + ```bash + harbor --config /path/to/custom/config.yaml artifact list + ``` + +2. **Environment Variable** + Set a persistent configuration through the `HARBOR_CLI_CONFIG` environment variable: + ```bash + export HARBOR_CLI_CONFIG="$HOME/.custom/harbor-config.yaml" + harbor artifact list # Uses the environment-specified config + ``` + +3. **XDG Default Paths** + Automatically discover configuration in the following order: + ```bash + ${XDG_CONFIG_HOME}/harbor-cli/config.yaml # If XDG_CONFIG_HOME is set + ~/.config/harbor-cli/config.yaml # Fallback default + ``` + +## Data Storage Management +### Data File Location + +- **Primary Path**: `$XDG_DATA_HOME/harbor-cli/data.yaml` +- **Fallback Path**: `$HOME/.local/share/harbor-cli/data.yaml` + +> **Important** +> The data file automatically tracks the last-used configuration file path + +## Configuration Precedence Summary +| Priority | Method | Example | +|----------|----------------------------|---------------------------------------| +| 1 | --config flag | harbor --config ./test.yaml ... | +| 2 | HARBOR_CLI_CONFIG env var | export HARBOR_CLI_CONFIG=... | +| 3 | XDG Default Locations | ~/.config/harbor-cli/config.yaml | + +## Practical Usage Examples +### Scenario 1: Temporary Config Override +```bash +harbor --config ./experimental.yaml project create "new-project" +``` + +### Scenario 2: Persistent Environment-based Config +```bash +echo 'export HARBOR_CLI_CONFIG="$HOME/work/configs/prod-harbor.yaml"' >> ~/.zshrc +source ~/.zshrc +harbor config list # Uses production config +``` + +### Scenario 3: Reset to Default Configuration +```bash +unset HARBOR_CLI_CONFIG +harbor config delete --current # Deletes current context +``` diff --git a/content/cli-docs/cli-docs/harbor-artifact-label-add.md b/content/cli-docs/cli-docs/harbor-artifact-label-add.md new file mode 100644 index 000000000..31c189a47 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-artifact-label-add.md @@ -0,0 +1,48 @@ +--- +title: harbor artifact label add +weight: 95 +--- +## harbor artifact label add + +### Description + +##### Attach a label to an artifact in a Harbor project repository + +### Synopsis + +Attach an existing label to a specific artifact identified by /:. +You can specify the artifact and label directly as arguments, or interactively select them if arguments are omitted. + +Examples: + # Add a label to an artifact using project/repo:reference and label name + harbor artifact label add myproject/myrepo@sha256:abcdef1234567890 dev + + # Prompt-based label selection for an artifact + harbor artifact label add library/nginx:1.21 + + # Fully interactive mode (prompt for everything) + harbor artifact label add + + +```sh +harbor artifact label add [flags] +``` + +### Options + +```sh + -h, --help help for add +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor artifact label](harbor-artifact-label.md) - label command for artifacts + diff --git a/content/cli-docs/cli-docs/harbor-artifact-label-delete.md b/content/cli-docs/cli-docs/harbor-artifact-label-delete.md new file mode 100644 index 000000000..42d0008d2 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-artifact-label-delete.md @@ -0,0 +1,50 @@ +--- +title: harbor artifact label delete +weight: 90 +--- +## harbor artifact label delete + +### Description + +##### Detach a label from an artifact in a Harbor project repository + +### Synopsis + +Remove an existing label from a specific artifact identified by /:. +You can provide the artifact and label name as arguments, or choose them interactively if not specified. + +Examples: + # Remove a label by specifying artifact and label name + harbor artifact label delete library/nginx:latest stable + + # Prompt-based label selection for a specific artifact + harbor artifact label del library/nginx:1.21 + + # Fully interactive mode (prompt for project, repo, reference, and label) + harbor artifact label delete + + # Remove a label from an artifact identified by digest + harbor artifact label del myproject/myrepo@sha256:abcdef1234567890 qa-label + +```sh +harbor artifact label delete [flags] +``` + +### Options + +```sh + -h, --help help for delete +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor artifact label](harbor-artifact-label.md) - label command for artifacts + diff --git a/content/cli-docs/cli-docs/harbor-artifact-label-list.md b/content/cli-docs/cli-docs/harbor-artifact-label-list.md new file mode 100644 index 000000000..9254ee144 --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-artifact-label-list.md @@ -0,0 +1,56 @@ +--- +title: harbor artifact label list +weight: 30 +--- +## harbor artifact label list + +### Description + +##### Display labels attached to a specific artifact + +### Synopsis + +This command lists all labels currently associated with a specific artifact in a Harbor project repository. +You can provide the artifact reference in the format /: (where reference is either a tag or a digest). +If the reference is not provided as an argument, the command will prompt you to select the project, repository, and artifact. + +Supports output formatting such as JSON or YAML using the --output (-o) flag. + +```sh +harbor artifact label list [flags] +``` + +### Examples + +```sh + # List labels for a tagged artifact + harbor artifact label list library/nginx:latest + + # List labels for an artifact by digest + harbor artifact label list myproject/myrepo@sha256:abc123... + + # Prompt-based interactive selection of artifact + harbor artifact label list + + # Output in JSON format + harbor artifact label list library/nginx:1.21 -o json +``` + +### Options + +```sh + -h, --help help for list +``` + +### Options inherited from parent commands + +```sh + -c, --config string config file (default is $HOME/.config/harbor-cli/config.yaml) + -o, --output-format string Output format. One of: json|yaml + -v, --verbose verbose output +``` + +### SEE ALSO + +* [harbor artifact label](harbor-artifact-label.md) - label command for artifacts + diff --git a/content/cli-docs/cli-docs/harbor-artifact-label.md b/content/cli-docs/cli-docs/harbor-artifact-label.md new file mode 100644 index 000000000..6a2666e9e --- /dev/null +++ b/content/cli-docs/cli-docs/harbor-artifact-label.md @@ -0,0 +1,43 @@ +--- +title: harbor artifact label +weight: 70 +--- +## harbor artifact label + +### Description + +##### label command for artifacts + +### Synopsis + +label command for artifact + +### Examples + +```sh +harbor artifact label add //