Welcome to the Harbor CLI documentation guide! This document outlines the steps to generate the CLI documentation files.
The doc.go script is designed to create markdown files that detail the functions of commands available in the Harbor CLI. These files are generated based on the existing cli commands and it will be placed in the cli-docs directory.
- Clone the repository
git clone https://github.com/goharbor/harbor-cli.git
- Navigate to the doc directory:
cd harbor-cli/doc
change your directory to the doc
folder where the doc.go
script is located.
- Run the
doc.go
file:
go run doc.go
This generates markdown files for CLI commands that do not already exist in the cli-docs directory.
Make sure you have latest Dagger installed in your system.
git clone https://github.com/goharbor/harbor-cli.git
cd harbor-cli
dagger call run-doc --source=. export --path=doc
This would runs the dagger function and generate markdown files in cli-docs.
- For any newly generated markdown files, ensure to set the weight according to the order you want them to appear.