Skip to content

Files

Latest commit

3c8e623 · Jul 29, 2025

History

History

doc

README.md

Harbor CLI Documentation

Welcome to the Harbor CLI documentation guide! This document outlines the steps to generate the CLI documentation files.

Overview

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.

Steps to Generate CLI Documentation

  1. Clone the repository
    git clone https://github.com/goharbor/harbor-cli.git
  1. Navigate to the doc directory:
    cd harbor-cli/doc

change your directory to the doc folder where the doc.go script is located.

  1. 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.

Generate Documentation using Dagger

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.

Note

  • For any newly generated markdown files, ensure to set the weight according to the order you want them to appear.