Skip to content

Conversation

@wlan0
Copy link
Contributor

@wlan0 wlan0 commented Aug 4, 2025

Fixes #375

@wlan0 wlan0 requested a review from jglogan August 4, 2025 22:58
@katiewasnothere
Copy link
Contributor

@wlan0 could we use something like https://github.com/apple/swift-argument-parser/blob/main/Tools/generate-manual/GenerateManual.swift to generate man pages instead? I'd like something that we don't need to manually update

@wlan0
Copy link
Contributor Author

wlan0 commented Aug 7, 2025

@wlan0 could we use something like https://github.com/apple/swift-argument-parser/blob/main/Tools/generate-manual/GenerateManual.swift to generate man pages instead? I'd like something that we don't need to manually update

Let’s skip man pages entirely. Every detail a user would look for in man container - subcommands, flags, examples already comes straight from our source of truth via container --help.

Our commands are largely static and any future changes automatically flow into --help.

Let’s keep Markdown as the only human-readable doc format and rely on container --help for terminal users

@katiewasnothere
Copy link
Contributor

I think overall we should keep the language/descriptions of the subcommands and options the same as in the help output. Otherwise the difference in language could become confusing (for example, the comment above about referring to "tailing the logs" as using the --follow option while also having an option on the same command that operates like tail in linux).

IMO this doc really should just be the help output with a bit more description as needed (for example, the description of the run command in this PR is very helpful and augments what's in the help output) and some example use cases as you already have.

@wlan0 wlan0 force-pushed the command-reference-docs branch from 10be898 to 2a546c9 Compare August 13, 2025 02:54
@wlan0
Copy link
Contributor Author

wlan0 commented Aug 13, 2025

@katiewasnothere addressed all comments

@@ -0,0 +1,709 @@
# Container CLI Command Reference
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need a PR template that includes a reminder (or checklist if we also want a reminder for unit/integration tests and anything else) for updating docs?

Copy link
Contributor

Choose a reason for hiding this comment

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

if we wanted a more closed-form approach to this (one that we could validate via build), swift-argument-parser offers an --experimental-dump-help that writes all help output to a JSON file. If we wanted to merge informative content with the normative material from the dump, we could maintain the informative material as a set of files that could be JSON patched in, and then rendered to markdown or whatever we want

Copy link
Contributor

@katiewasnothere katiewasnothere Aug 13, 2025

Choose a reason for hiding this comment

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

Another option is argument parser's generate-docc-reference. Doesn't look like this plugin is feature rich enough for us yet, but maybe in the future it will be.

@wlan0 wlan0 force-pushed the command-reference-docs branch from 2a546c9 to c8ed946 Compare August 13, 2025 18:45
@wlan0 wlan0 force-pushed the command-reference-docs branch from c8ed946 to 1df604b Compare August 13, 2025 19:10
Copy link
Contributor

@jglogan jglogan left a comment

Choose a reason for hiding this comment

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

One nit, see comment.

@katiewasnothere katiewasnothere merged commit e42fe80 into main Aug 29, 2025
2 checks passed
@katiewasnothere katiewasnothere deleted the command-reference-docs branch August 29, 2025 17:23
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.

[Request]: Structured documentation for the container commands

3 participants