Skip to content

docs: cli usage#324

Merged
KSXGitHub merged 53 commits intomasterfrom
copilot/add-cli-usage-documentation
Feb 28, 2026
Merged

docs: cli usage#324
KSXGitHub merged 53 commits intomasterfrom
copilot/add-cli-usage-documentation

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 28, 2026

Fixes #323
Fixes #54

Co-authored-by: KSXGitHub <11488886+KSXGitHub@users.noreply.github.com>
Copilot AI changed the title [WIP] Add CLI usage documentation and help files docs: add CLI usage help files, README section, and sync tests Feb 28, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 28, 2026

Performance Regression Reports

commit: c75e98d

There are no regressions.

KSXGitHub

This comment was marked as resolved.

Co-authored-by: KSXGitHub <11488886+KSXGitHub@users.noreply.github.com>
@KSXGitHub

This comment was marked as resolved.

Co-authored-by: KSXGitHub <11488886+KSXGitHub@users.noreply.github.com>

This comment was marked as resolved.

Copilot AI changed the title docs: add CLI usage help files, README section, and sync tests docs: add CLI usage help files, README section, USAGE.md, and sync tests Feb 28, 2026
Comment thread tests/sync_help.rs Outdated
Comment thread tests/sync_help.rs Outdated
Comment thread README.md Outdated
Comment thread USAGE.md Outdated
Comment thread USAGE.md Outdated
Comment thread USAGE.md Outdated
… refactor test

Co-authored-by: KSXGitHub <11488886+KSXGitHub@users.noreply.github.com>
Comment thread USAGE.md Outdated
Comment thread USAGE.md Outdated
Comment thread USAGE.md Outdated
Comment thread cli/usage_md.rs Outdated
Comment thread cli/usage_md.rs Outdated
Comment thread cli/usage_md.rs Outdated
Copilot AI and others added 2 commits February 28, 2026 12:04
…tertools join, new detection spec

Co-authored-by: KSXGitHub <11488886+KSXGitHub@users.noreply.github.com>
Co-authored-by: KSXGitHub <11488886+KSXGitHub@users.noreply.github.com>
Copilot AI changed the title docs: add CLI usage help files, README section, USAGE.md, and sync tests refactor(usage_md): heading-based options, semantic item detection, periods, itertools join Feb 28, 2026
Comment thread src/usage_md.rs
Comment thread src/usage_md.rs
… detect boolean flags

Co-authored-by: KSXGitHub <11488886+KSXGitHub@users.noreply.github.com>
@KSXGitHub KSXGitHub requested a review from Copilot February 28, 2026 18:50
@KSXGitHub KSXGitHub marked this pull request as ready for review February 28, 2026 18:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the project’s CLI documentation pipeline by generating USAGE.md and help snapshots directly from clap’s introspection APIs, and adds tests to keep those generated artifacts in sync with the actual CLI.

Changes:

  • Add usage_md renderer (src/usage_md.rs) and a dedicated pdu-usage-md binary to generate USAGE.md.
  • Gate/export the new module behind cfg(feature = "cli") to fix doc builds without CLI features.
  • Add snapshot-style tests and generation script updates for exports/*.help and USAGE.md, and link USAGE.md from the README.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/sync_help.rs Adds snapshot tests to detect stale exports/*.help and USAGE.md.
src/usage_md.rs Implements Markdown rendering for CLI usage/options/examples via clap introspection.
src/lib.rs Gates and exports usage_md behind the cli feature.
generate-completions.sh Extends generator script to also emit long/short help and USAGE.md.
exports/short.help Adds generated short help snapshot.
exports/long.help Adds generated long help snapshot.
cli/usage_md.rs Adds pdu-usage-md binary entrypoint to print rendered Markdown.
USAGE.md Adds regenerated CLI usage reference page.
README.md Links to USAGE.md from the README.
Cargo.toml Registers the new pdu-usage-md binary (feature-gated).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/sync_help.rs Outdated
Comment thread exports/long.help
@KSXGitHub KSXGitHub marked this pull request as draft February 28, 2026 18:58
Co-authored-by: KSXGitHub <11488886+KSXGitHub@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/sync_help.rs
//!
//! If the tests fail, run `./generate-completions.sh` on the root of the repo to update the help files.

// Since the CLI in Windows look a little different, and I am way too lazy to make two versions
Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

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

Grammar: "the CLI in Windows look" should be "the CLI in Windows looks".

Suggested change
// Since the CLI in Windows look a little different, and I am way too lazy to make two versions
// Since the CLI in Windows looks a little different, and I am way too lazy to make two versions

Copilot uses AI. Check for mistakes.
Comment thread README.md
Comment thread tests/sync_help.rs
@KSXGitHub KSXGitHub marked this pull request as ready for review February 28, 2026 19:55
@KSXGitHub KSXGitHub merged commit 20758ea into master Feb 28, 2026
13 checks passed
@KSXGitHub KSXGitHub deleted the copilot/add-cli-usage-documentation branch February 28, 2026 20:07
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.

docs: cli usage Better documentation for CLI usage

3 participants