Skip to content

Commit f40dbe3

Browse files
committed
docs: update README to enhance clarity and detail on Harbor CLI features and usage
1 parent 254ed57 commit f40dbe3

1 file changed

Lines changed: 50 additions & 19 deletions

File tree

README.md

Lines changed: 50 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,50 @@
11
![harbor-3](https://github.com/goharbor/harbor-cli/assets/70086051/835ab686-1cce-4ac7-bc57-05a35c2b73cc)
22

3-
**Welcome to the Harbor CLI project! This powerful command-line tool facilitates seamless interaction with the Harbor container registry. It simplifies various tasks such as creating, updating, and managing projects, registries, and other resources in Harbor.**
3+
**Harbor CLI — a command-line interface for interacting with your Harbor container registry. A streamlined, user-friendly alternative to the WebUI, as your daily driver or for scripting and automation.**
44

55
[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/harbor-cli)](https://artifacthub.io/packages/search?repo=harbor-cli)
66
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fgoharbor%2Fharbor-cli.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fgoharbor%2Fharbor-cli?ref=badge_shield)
77

8-
# Project Scope 🧪
8+
# Scope 🧪
99

10-
The Harbor CLI is designed to enhance your interaction with the Harbor container registry. Built on Golang, it offers a user-friendly interface to perform various tasks related to projects, registries, and more. Whether you're creating, updating, or managing resources, the Harbor CLI streamlines your workflow efficiently.
10+
1. CLI alternative to the WebUI
11+
2. Tool for scripting and automation of common repeatable Harbor tasks running on your machine or inside your pipeline
1112

12-
# Project Features 🤯
13+
# Features
14+
The project's first goal is to reach WebUI parity.
15+
16+
[] project Mange projects
17+
[] repo Manage repositories
18+
[] artifact Manage artifacts
19+
[] label Manage labels
20+
[] tag Manage tags
21+
[] quota Manage quotas
22+
[] webhook Manage webhook policies
23+
24+
[] login Log in to Harbor registry
25+
[] user Manage users
26+
27+
[] config Manage the config of the Harbor CLI
28+
[] cve-allowlist Manage system CVE allowlist
29+
[] health Get the health status of Harbor components
30+
[] instance Manage preheat provider instances in Harbor
31+
[] info Display detailed Harbor system, statistics, and CLI environment information
32+
33+
[] registry Manage registries
34+
[] scanner scanner commands
35+
[] schedule Schedule jobs in Harbor
36+
37+
[] completion Generate the autocompletion script for the specified shell
38+
[] help Help about any command
39+
[] version Version of Harbor CLI
1340

14-
🔹 Get details about projects, registries, repositories and more <br>
15-
🔹 Create new projects, registries, and other resources <br>
16-
🔹 Delete projects, registries, and other resources <br>
17-
🔹 Run commands with various flags for enhanced functionality <br>
18-
🔹 More features coming soon... 🚧
1941

2042

2143
# Installation
2244

2345
## Container
2446

25-
It is straightforward to use the Harbor CLI as a container. You can run the following command to use the Harbor CLI as a container:
47+
Running Harbor CLI as a container is simple. Use the following command to get started:
2648

2749
```shell
2850
docker run -ti --rm -v $HOME/.config/harbor-cli/config.yaml:/root/.config/harbor-cli/config.yaml \
@@ -32,7 +54,11 @@ docker run -ti --rm -v $HOME/.config/harbor-cli/config.yaml:/root/.config/harbor
3254
```
3355
Use the `HARBOR_ENCRYPTION_KEY` container environment variable as a base64-encoded 32-byte key for AES-256 encryption. This securely stores your harbor login password.
3456

35-
# Add the following command to create an alias and append the alias to your .zshrc or .bashrc file
57+
I you intend
58+
to run the CLI as a container,it is advised
59+
to set the following environment variables and to create an alias
60+
and append the alias to your .zshrc or .bashrc file
61+
3662
```shell
3763
echo "export HARBOR_CLI_CONFIG=\$HOME/.config/harbor-cli/config.yaml" >> ~/.zshrc
3864
echo "export HARBOR_ENCRYPTION_KEY=\$(cat <path_to_32bit_private_key_file> | base64)" >> ~/.zshrc
@@ -45,14 +71,14 @@ source ~/.zshrc # or restart your terminal
4571

4672
Harbor CLI will soon be published on Homebrew.
4773
Meantime, we recommend using Harbor in the Container
48-
or download the binary from the [releases page](https://github.com/goharbor/harbor-cli/releases)
74+
or downloading the binary from the [releases page](https://github.com/goharbor/harbor-cli/releases)
4975

5076

5177

5278
## Add the Harbor CLI to your Container Image
5379

54-
Using Curl or Wget isn't recommended
55-
for adding the Harbor CLI to your container.
80+
Using Curl or Wget isn't needed if you want to
81+
add the Harbor CLI to your container.
5682
Instead, we recommend copying the Harbor CLI from our official image
5783
by using the following Dockerfile:
5884

@@ -115,15 +141,19 @@ Use "harbor [command] --help" for more information about a command.
115141
#### Config Management
116142

117143
##### Hierarchy
118-
Use the `--config` flag to specify a custom configuration file path (highest priority).
119-
```bash
144+
Use the `--config` flag to specify a custom configuration file path (the highest priority).
145+
146+
```bash
120147
harbor --config /path/to/custom/config.yaml artifact list
121148
```
149+
122150
If `--config` is not provided, Harbor CLI checks the `HARBOR_CLI_CONFIG` environment variable for the config file path.
151+
123152
```bash
124153
export HARBOR_CLI_CONFIG=/path/to/custom/config.yaml
125154
harbor artifact list
126155
```
156+
127157
If neither is set, it defaults to `$XDG_CONFIG_HOME/harbor-cli/config.yaml` or `$HOME/.config/harbor-cli/config.yaml` if `XDG_CONFIG_HOME` is unset.
128158
```bash
129159
harbor artifact list
@@ -190,9 +220,10 @@ Windows | ✅
190220

191221
# Build From Source
192222

193-
Make sure you have latest [Dagger](https://docs.dagger.io/) installed in your system.
223+
Make sure you have the latest [Dagger](https://docs.dagger.io/) installed in your system.
194224

195225
#### Using Dagger
226+
196227
```bash
197228
git clone https://github.com/goharbor/harbor-cli.git && cd harbor-cli
198229
dagger call build-dev --platform darwin/arm64 export --path=./harbor-cli
@@ -208,8 +239,8 @@ go build -o harbor-cli cmd/harbor/main.go
208239

209240
# Version Compatibility With Harbor
210241

211-
At the moment, the Harbor CLI is developed and tested with Harbor 2.11.
212-
The CLI should work with versions prior to 2.11,
242+
At the moment, the Harbor CLI is developed and tested with Harbor 2.13.
243+
The CLI should work with versions prior to 2.13,
213244
but not all functionalities may be available or work as expected.
214245

215246
Harbor <2.0.0 is not supported.

0 commit comments

Comments
 (0)