Skip to content

Add CLI documentation - #8

Merged
BenasB merged 5 commits into
mainfrom
cli_docs
Jul 9, 2025
Merged

Add CLI documentation#8
BenasB merged 5 commits into
mainfrom
cli_docs

Conversation

@BenasB

@BenasB BenasB commented Jul 9, 2025

Copy link
Copy Markdown
Owner
  • Start using standard flag package in CLI
    • Support flags for commands
    • support -h (and --h, --help, -help) flag to print out command description, usage and flag explanations.
  • Create a task in Taskfile to extract, parse and transform the help data from the CLI binary to .md pages.
  • Add CLI documentation generation to GitHub Actions workflow

CLI help example

$ bx2cloud container exec -h
bx2cloud container exec: Starts a shell process inside a specified container or executes a specific command, if specified
usage: bx2cloud container exec <id> [cmd]
flags: none

$ bx2cloud -h
bx2cloud subcommands:
  version
  network
  subnetwork
  container
flags:
  -t string
        API target <host>:<port> (default "localhost:8080")

Docusaurus example

---
title: "container exec"
custom_edit_url: null
---
# bx2cloud container exec

Starts a shell process inside a specified container or executes a specific command, if specified

## Usage

```
bx2cloud container exec <id> [cmd]
```
---
title: "Global flags"
sidebar_position: 1
custom_edit_url: null
---
# Global flags

These flags can be used with any command.

## Usage

```
bx2cloud -t 127.0.0.1:9876 version
```

## Flags

| Flag | Type | Description | Default |
|------|------|-------------|---------|
| `-t` | `string` | API target `<host>`:`<port>` | localhost:8080 |

Unrelated changes

  • Change slug of autogenerated TF provider reference slug to be nested under /terraform/ instead of /category/. Also move the content from /terraform/autogenerated file directory to /terraform/reference
  • Change example command in CLI docs to be bx2cloud version

@BenasB
BenasB merged commit af3121e into main Jul 9, 2025
19 checks passed
@BenasB
BenasB deleted the cli_docs branch July 9, 2025 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant