docs: add integrations directory with framework tracker#499
Conversation
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Summary of ChangesHello @jdx, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #499 +/- ##
=======================================
Coverage 77.81% 77.81%
=======================================
Files 47 47
Lines 6595 6595
Branches 6595 6595
=======================================
Hits 5132 5132
Misses 1105 1105
Partials 358 358 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
The additions to the integrations page are very helpful for users getting started with Cobra and clap. The examples are clear and follow the recommended patterns. I've suggested a few minor updates to the code snippets to ensure they are complete and use the most idiomatic approaches for each language, such as including missing imports and simplifying the Rust output logic.
| import cobra_usage "github.com/jdx/usage/integrations/cobra" | ||
|
|
||
| // Print usage spec as KDL | ||
| fmt.Print(cobra_usage.Generate(rootCmd)) |
There was a problem hiding this comment.
The Go snippet uses fmt.Print but the fmt package is not imported. Updating the import section to a block including fmt makes the example more complete and easier to use for a quick start.
| import cobra_usage "github.com/jdx/usage/integrations/cobra" | |
| // Print usage spec as KDL | |
| fmt.Print(cobra_usage.Generate(rootCmd)) | |
| import ( | |
| "fmt" | |
| cobra_usage "github.com/jdx/usage/integrations/cobra" | |
| ) | |
| // Print usage spec as KDL | |
| fmt.Print(cobra_usage.Generate(rootCmd)) |
| use clap::Command; | ||
|
|
||
| let mut cmd = Command::new("mycli") | ||
| .version("1.0") | ||
| .arg(clap::Arg::new("input")); | ||
|
|
||
| let mut buf = Vec::new(); | ||
| clap_usage::generate(&mut cmd, "mycli", &mut buf); | ||
| println!("{}", String::from_utf8(buf).unwrap()); |
There was a problem hiding this comment.
This snippet can be simplified by writing directly to stdout and handling the Result returned by clap_usage::generate. Additionally, importing Arg alongside Command makes the code cleaner and more idiomatic.
| use clap::Command; | |
| let mut cmd = Command::new("mycli") | |
| .version("1.0") | |
| .arg(clap::Arg::new("input")); | |
| let mut buf = Vec::new(); | |
| clap_usage::generate(&mut cmd, "mycli", &mut buf); | |
| println!("{}", String::from_utf8(buf).unwrap()); | |
| use clap::{Arg, Command}; | |
| let mut cmd = Command::new("mycli") | |
| .version("1.0") | |
| .arg(Arg::new("input")); | |
| clap_usage::generate(&mut cmd, "mycli", &mut std::io::stdout()).unwrap(); |
- Move Cobra and clap docs into separate pages under /spec/integrations/ - Add framework tracker tables (planned integrations) to index page - Update sidebar with collapsed Integrations section Co-Authored-By: Claude Opus 4.6 <[email protected]>
There was a problem hiding this comment.
Pull request overview
This PR expands the minimal integrations documentation page with comprehensive installation and quick-start guides for both Cobra (Go) and clap (Rust) integrations. It demonstrates the recommended --usage-spec integration pattern for Cobra and provides practical examples for generating shell completions, markdown docs, and man pages. The PR also lists high-priority community integration targets.
Changes:
- Added complete quick-start documentation for Cobra integration with installation, code examples, and the recommended
--usage-specpattern - Added quick-start documentation for clap integration with installation and code examples
- Added a Community Integrations section listing high-priority framework targets across multiple languages
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| | [Laravel Zero](https://github.com/laravel-zero/laravel-zero) | PHP | | ||
| | [swift-argument-parser](https://github.com/apple/swift-argument-parser) | Swift | | ||
| | [System.CommandLine](https://github.com/dotnet/command-line-api) | C#/.NET | |
There was a problem hiding this comment.
The example commands for generating completions, markdown, and manpage documentation are incorrect. These commands do not support reading spec content from stdin via pipe.
The correct patterns are:
For completions, use --usage-cmd:
usage generate completion bash mycli --usage-cmd "mycli --usage-spec"For markdown and manpage, save the spec to a file first:
mycli --usage-spec > /tmp/spec.kdl
usage generate md --file /tmp/spec.kdl --out-file docs.md
usage generate manpage --file /tmp/spec.kdl --out-file mycli.1Alternatively, consider adding support for reading from stdin (e.g., via -f - pattern) to match the examples shown in the cobra integration README.
### 🚀 Features - add Cobra (Go) integration for generating usage specs by [@jdx](https://github.com/jdx) in [#498](#498) - Add support for nushell by [@abusch](https://github.com/abusch) in [#485](#485) ### 🐛 Bug Fixes - **(docs)** align homepage feature button with integrations page by [@jdx](https://github.com/jdx) in [#496](#496) ### 📚 Documentation - add integrations directory with framework tracker by [@jdx](https://github.com/jdx) in [#497](#497) - add integrations directory with framework tracker by [@jdx](https://github.com/jdx) in [#499](#499) ### 🔍 Other Changes - mise up by [@muzimuzhi](https://github.com/muzimuzhi) in [#492](#492) ### 📦️ Dependency Updates - update actions/checkout digest to de0fac2 by [@renovate[bot]](https://github.com/renovate[bot]) in [#494](#494) - update taiki-e/upload-rust-binary-action digest to f391289 by [@renovate[bot]](https://github.com/renovate[bot]) in [#495](#495) - lock file maintenance by [@renovate[bot]](https://github.com/renovate[bot]) in [#500](#500) ### New Contributors - @abusch made their first contribution in [#485](#485)
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [usage](https://github.com/jdx/usage) | minor | `2.16.2` → `2.17.0` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>jdx/usage (usage)</summary> ### [`v2.17.0`](https://github.com/jdx/usage/blob/HEAD/CHANGELOG.md#2170---2026-02-16) [Compare Source](jdx/usage@v2.16.2...v2.17.0) ##### 🚀 Features - add Cobra (Go) integration for generating usage specs by [@​jdx](https://github.com/jdx) in [#​498](jdx/usage#498) - Add support for nushell by [@​abusch](https://github.com/abusch) in [#​485](jdx/usage#485) ##### 🐛 Bug Fixes - **(docs)** align homepage feature button with integrations page by [@​jdx](https://github.com/jdx) in [#​496](jdx/usage#496) ##### 📚 Documentation - add integrations directory with framework tracker by [@​jdx](https://github.com/jdx) in [#​497](jdx/usage#497) - add integrations directory with framework tracker by [@​jdx](https://github.com/jdx) in [#​499](jdx/usage#499) ##### 🔍 Other Changes - mise up by [@​muzimuzhi](https://github.com/muzimuzhi) in [#​492](jdx/usage#492) ##### 📦️ Dependency Updates - update actions/checkout digest to [`de0fac2`](jdx/usage@de0fac2) by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​494](jdx/usage#494) - update taiki-e/upload-rust-binary-action digest to [`f391289`](jdx/usage@f391289) by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​495](jdx/usage#495) - lock file maintenance by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​500](jdx/usage#500) ##### New Contributors - [@​abusch](https://github.com/abusch) made their first contribution in [#​485](jdx/usage#485) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xNS4yIiwidXBkYXRlZEluVmVyIjoiNDMuMTUuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90IiwiYXV0b21hdGlvbjpib3QtYXV0aG9yZWQiLCJkZXBlbmRlbmN5LXR5cGU6Om1pbm9yIl19-->
Summary
/spec/integrations) and per-framework subpages (/spec/integrations/cobra,/spec/integrations/clap)Test plan
npm run docs:dev🤖 Generated with Claude Code