Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Prerequisites
- I'm using the latest version of Docusaurus.
- I have tried the
npm run clear
oryarn clear
command. - I have tried
rm -rf node_modules yarn.lock package-lock.json
and re-installing packages. - I have tried creating a repro with https://new.docusaurus.io.
- I have read the console error message carefully (if applicable).
Description
Using extendCli
to extend the docusaurus CLI with new commands no longer includes those commands, i.e. usage, description, arguments, options, when executing docusaurus --help
or docusaurus -h
.
However, the extended commands do appear in the console output after attempting to call an unknown command.
I verified that extended command usage does appear in prior docusaurus release, e.g. v2.4.3 but have not tested releases in between that and the current release.
Reproducible demo
https://codesandbox.io/p/devbox/elegant-water-docusaurus?privacy=public
Steps to reproduce
- Bootstrap a fresh docusaurus site
- Create the example plugin referenced in the extendCli docs.
- Update
docusaurus.config.js
to include the new plugin. - Execute
yarn docusaurus -h
and observe the extended command is not present in help output. - Execute
yarn docusaurus foo
and observe the extended command in the output.
Expected behavior
When executing yarn docusaurus -h
I expect to see my extended command usage, description, options, etc., in the output.
Actual behavior
Running yarn docusaurus -h
not not include the usage for my extended command. However, my extended command does appear when I attempt to pass an invalid command argument.
Your environment
- Public source code: https://github.com/PaloAltoNetworks/docusaurus-openapi-docs
- Public site URL: https://docusaurus-openapi.tryingpan.dev/
- Docusaurus version used: 3.6.0 and 3.6.1
- Environment name and version (e.g. Chrome 89, Node.js 16.4): Chromium 130.0.6723.117 and Node 18.7
- Operating system and version (e.g. Ubuntu 20.04.2 LTS): Mac OS Sonoma 14.7.1 (23H222)
Self-service
- I'd be willing to fix this bug myself.