Skip to content

Update CLI reference docs for v2.3.0#1097

Open
adamwg wants to merge 4 commits into
crossplane:masterfrom
adamwg:awg/cli-reference-v2.3.0
Open

Update CLI reference docs for v2.3.0#1097
adamwg wants to merge 4 commits into
crossplane:masterfrom
adamwg:awg/cli-reference-v2.3.0

Conversation

@adamwg
Copy link
Copy Markdown
Member

@adamwg adamwg commented May 21, 2026

Use the new crossplane generate-docs command to generate CLI reference docs from the built-in CLI help. Update both master and v2.3, since they're the same for now.

Toward #1092

Use the new `crossplane generate-docs` command to generate CLI reference docs
from the built-in CLI help. Update both `master` and `v2.3`, since they're the
same for now.

Signed-off-by: Adam Wolfe Gordon <awg@upbound.io>
@netlify
Copy link
Copy Markdown

netlify Bot commented May 21, 2026

Deploy Preview for crossplane ready!

Name Link
🔨 Latest commit fc3ed6f
🔍 Latest deploy log https://app.netlify.com/projects/crossplane/deploys/6a14c7037771630008a56633
😎 Deploy Preview https://deploy-preview-1097--crossplane.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 93 (no change from production)
Accessibility: 90 (🔴 down 2 from production)
Best Practices: 92 (no change from production)
SEO: 100 (no change from production)
PWA: 70 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Member

@jbw976 jbw976 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are a couple funny headings that are rendering odd, e.g. https://deploy-preview-1097--crossplane.netlify.app/v2.3/cli/command-reference/#read-the-xrd-from-stdin

are those at the right level? are they supposed to be headings? 🤔

@adamwg
Copy link
Copy Markdown
Member Author

adamwg commented May 21, 2026

there are a couple funny headings that are rendering odd, e.g. https://deploy-preview-1097--crossplane.netlify.app/v2.3/cli/command-reference/#read-the-xrd-from-stdin

are those at the right level? are they supposed to be headings? 🤔

Good catch - we missed properly converting the help for crossplane xrd convert to markdown, so it's producing some weird rendering. For now, I think I'll manually edit the generated docs to fix this and the vale warnings, then propagate the changes back to the CLI's built-in help that powers the generation.

I've updated the CLI's docs generator locally to fix as many vale issues as
possible and re-generated the docs using it. There are still a few issues we
can't fix because of how our docs generation works:

- The abbreviation `config` in the `crossplane config` command.
- The abbreviation `k8s` in the flag help for `crossplane dependency add`.
- The abbreviation `admin` in `cluster-admin` in the help for `crossplane
  project run`.

Signed-off-by: Adam Wolfe Gordon <awg@upbound.io>
@adamwg
Copy link
Copy Markdown
Member Author

adamwg commented May 22, 2026

I've fixed as many vale issues as possible while still auto-generating docs. See crossplane/cli#30 for details.

@jbw976
Copy link
Copy Markdown
Member

jbw976 commented May 23, 2026

amazing @adamwg, great work at tackling most all of the vale issues!

do you think it would be possible (or reasonable) to include exclusions in the CLI docs templates where needed for the specifically failing Vale styles, e.g. gitlab.SubstitutionWarning, gitlab.Units, Google.WordList, etc.? or is that just not a path we think is worth it? if it's not worth it (or not possible), do we live with the remaining failures? 🤔

@adamwg
Copy link
Copy Markdown
Member Author

adamwg commented May 25, 2026

do you think it would be possible (or reasonable) to include exclusions in the CLI docs templates where needed for the specifically failing Vale styles, e.g. gitlab.SubstitutionWarning, gitlab.Units, Google.WordList, etc.? or is that just not a path we think is worth it? if it's not worth it (or not possible), do we live with the remaining failures? 🤔

I thought about doing this, but since the remaining issues are in text that comes from the kong command/argument tags rather than markdown-formatted text, I think we would have to add these exclusions for the entire document, rather than scoped around the specific instances we want to ignore. I also looked at whether we could ignore only specific matches, but couldn't make it work - not sure if our version of vale doesn't support that, or if the checks/styles we're using don't support it. If we could ignore Google.WordList["k8s"] for the whole doc that would feel a lot better than ignoring Google.WordList entirely.

I'm inclined to accept the existing issues, since they should only get flagged when we update the CLI docs. But, I would definitely prefer to have vale return a clean status if we can figure out a way to do it.

adamwg added 2 commits May 25, 2026 10:20
Signed-off-by: Adam Wolfe Gordon <awg@upbound.io>
With the latest version of vale, we can specify ignores with arbitrary
specificity, e.g., ignoring a single word from a list of forbidden words. This
lets us add some targeted ignores to our CLI reference where we can't easily
avoid breaking certain rules (e.g., because the command name is a forbidden
word).

Update the version of vale we use in CI and add targeted ignores output by the
latest iteration of the CLI's `generate-docs` command.

Signed-off-by: Adam Wolfe Gordon <awg@upbound.io>
@adamwg
Copy link
Copy Markdown
Member Author

adamwg commented May 25, 2026

I put some more time into this today and figured out how to ignore specific matches (does require a newer vale version). I've updated this PR with the output, and crossplane/cli#30 to include (a) the ability to disable a specific check for a specific command, and (b) a CI job that generates docs and runs vale with the config from this repo, so that we ensure no new issues creep in.

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.

2 participants