goharbor / harbor-cli

[Sandbox] Official Harbor CLI
Apache License 2.0
31 stars 37 forks source link

Improve create project flow #117

Closed Vad1mo closed 2 months ago

Vad1mo commented 2 months ago

Create project is a common flow, the current cli doesn't make it easy.

In my opinion, this should work.

harbor project create my_project

This should create a new private project my_project with unlimited quota.

harbor-cli on  fork/bupd/batch-process:batch-process via 🐹 v1.21.6 
❯ ./harbor project create --help
create project

Usage:
  harbor project create [flags]

Flags:
  -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")

Global Flags:
      --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

harbor-cli on  fork/bupd/batch-process:batch-process via 🐹 v1.21.6 
❯ ./harbor project create my_project
Althaf66 commented 2 months ago

@Vad1mo Yes, this sounds good