Help
bdoctor describes itself. The help lists every command, and each command has its own help with its options, grouped the way you use them, a few examples and a link to its documentation.
Asking for help
Section titled “Asking for help”| Run | Shows |
|---|---|
bdoctor |
The general help: every command with a one-line summary. |
bdoctor --help or bdoctor -h |
The general help. |
bdoctor help |
The general help. |
bdoctor <command> --help or bdoctor <command> -h |
The help of that command, for instance bdoctor publish --help. |
bdoctor help <command> |
The help of that command, for instance bdoctor help status. |
The --help flag can go anywhere after the command, so you can add it to a command you were about to run to check its options. Nothing is published, authenticated or read from SharePoint when you ask for help.
Help does not read your bdoctor.json file and does not validate your other arguments, so it works in any folder and even when a value you passed is wrong.
The general help
Section titled “The general help”BETTER DOCTOR v3.1.0
Usage: bdoctor <command> [options]
Commands: init Create the folder structure, a starter page and a bdoctor.json file. publish Publish your Markdown files as pages on your SharePoint site. status Show what the next publish would do, without changing anything. validate Check front matter, links and tags before you publish. Exits 1 on an error. tags Check tags against the tags.json vocabulary, report on them, or fix them. workflow Generate a GitHub Actions workflow or an Azure DevOps pipeline. version Show the installed version. setup Install <tab> autocomplete for your shell. cleanup Remove the <tab> autocomplete again. help Show help for bdoctor or one of its commands.
Run "bdoctor <command> --help" or "bdoctor help <command>" for the options of a command.Options can also be set in bdoctor.json; an argument wins over it.
Documentation: https://better-doctor.cwoz.dev/docs/cli/The help of a command
Section titled “The help of a command”Each command lists the options it reads, with their short aliases and value placeholders. bdoctor status --help for example:
BETTER DOCTOR v3.1.0
Usage: bdoctor status [options]
Show what the next publish would do, without changing anything.
Authentication: -a, --auth <auth> Authentication type; certificate is the only one supported (default). --appId <appId> ID of the Entra app registration to sign in with. --tenant <tenant> ID of the tenant to sign in to. --certificate <certificate> Certificate file (.pfx, .p12, .pem) or its base64 contents. --password <password> Password of the certificate, when it has one.
Options: -u, --url <url> URL of the SharePoint site. -f, --folder <folder> Folder with your Markdown files, relative or absolute (default ./src). ... -h, --help Show this help.
Examples: bdoctor status bdoctor status --verbose bdoctor status --output json
Documentation: https://better-doctor.cwoz.dev/docs/cli/#statusAll options: https://better-doctor.cwoz.dev/docs/configuration/cli-options/bdoctor publish --help groups its options into authentication, site and content, what gets published, removal and migration, and run options.
The help keeps each description to one line. The CLI options page has the full description of every option, and the commands page describes what each command does.
JSON output
Section titled “JSON output”With --output json, the help is written as a single JSON document, like the result of any other command:
bdoctor publish --help --output json{ "command": "help", "success": true, "version": "3.1.0", "help": { "command": "publish", "summary": "Publish your Markdown files as pages on your SharePoint site.", "usage": "bdoctor publish [options]", "options": [ { "group": "Authentication", "flags": "-a, --auth", "value": "<auth>", "description": "Authentication type; certificate is the only one supported (default)." } ], "examples": ["bdoctor publish"], "documentation": "https://better-doctor.cwoz.dev/docs/cli/#publish" }}The general help returns usage, a commands array of name and summary pairs, and documentation.
Unknown commands
Section titled “Unknown commands”A command bdoctor does not know stops with an error and exit code 1, instead of running nothing:
ERROR: Unknown command "pubish". Run "bdoctor --help" to list the commands.