UNPKG

rdme

Version:

ReadMe's official CLI and GitHub Action.

950 lines 44.4 kB
{ "commands": { "changelog:upload": { "aliases": [], "args": { "path": { "description": "Path to a local Markdown file or folder of Markdown files.", "name": "path", "required": true } }, "description": "The path can either be a directory or a single Markdown file.\n\nThe Markdown files will require YAML frontmatter with certain ReadMe documentation attributes. Check out our docs for more info on setting up your frontmatter: https://docs.readme.com/main/docs/rdme#markdown-file-setup", "examples": [ { "description": "The path input can be a directory. This will also upload any Markdown files that are located in subdirectories:", "command": "<%= config.bin %> <%= command.id %> documentation/" }, { "description": "The path input can also be individual Markdown files:", "command": "<%= config.bin %> <%= command.id %> documentation/about.md" }, { "description": "This command also has a dry run mode, which can be useful for initial setup and debugging. You can read more about dry run mode in our docs: https://docs.readme.com/main/docs/rdme#dry-run-mode", "command": "<%= config.bin %> <%= command.id %> [path] --dry-run" } ], "flags": { "key": { "description": "An API key for your ReadMe project. Note that API authentication is required despite being omitted from the example usage. See our docs for more information: https://github.com/readmeio/rdme/tree/v10#authentication", "name": "key", "required": true, "summary": "ReadMe project API key", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "confirm-autofixes": { "description": "This is useful if you are using this command in a CI/CD pipeline and want to ensure that the command does not prompt for user input.", "hidden": true, "name": "confirm-autofixes", "summary": "Bypasses the prompt and automatically fixes up any autofixable errors that are found in the Markdown files.", "allowNo": false, "type": "boolean" }, "dry-run": { "aliases": [ "dryRun" ], "deprecateAliases": true, "description": "Runs the command without creating nor updating any Changelog entries in ReadMe. Useful for debugging.", "name": "dry-run", "allowNo": false, "type": "boolean" }, "max-errors": { "description": "By default, this command will respond with a 1 exit code if any number of the Markdown files fail to upload. This flag allows you to set a maximum number of errors before the command fails. For example, if you set this flag to `5`, the command will respond with an error if 5 or more errors are encountered. If you do not want the command to fail under any circumstances (this could be useful for plugins where you want to handle the error handling yourself), set this flag to `-1`.", "hidden": true, "name": "max-errors", "summary": "Maximum number of page uploading errors before the command throws an error.", "default": 0, "hasDynamicHelp": false, "multiple": false, "type": "option" }, "skip-validation": { "description": "Skips the pre-upload validation of the Markdown files. This flag can be a useful escape hatch but its usage is not recommended.", "hidden": true, "name": "skip-validation", "allowNo": false, "type": "boolean" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "changelog:upload", "pluginAlias": "rdme", "pluginName": "rdme", "pluginType": "core", "strict": true, "summary": "Upload Markdown files to the Changelog section of your ReadMe project.", "section": "Changelog" }, "changelogs": { "aliases": [], "args": { "path": { "description": "Path to a local Markdown file or folder of Markdown files.", "name": "path", "required": true } }, "deprecationOptions": { "message": "`rdme changelogs` is deprecated in favor of `rdme changelog upload`. For more information, please visit our migration guide: https://github.com/readmeio/rdme/blob/v10/documentation/migration-guide.md" }, "description": "Syncs Markdown files to the Changelog section of your ReadMe project. The path can either be a directory or a single Markdown file. The Markdown files will require YAML frontmatter with certain ReadMe documentation attributes. Check out our docs for more info on setting up your frontmatter: https://docs.readme.com/main/docs/rdme#markdown-file-setup", "examples": [ { "description": "Passing in a path to a directory will also upload any Markdown files that are located in subdirectories. The path input can also be individual Markdown files:", "command": "<%= config.bin %> <%= command.id %> [path] --version={project-version}" }, { "description": "This command also has a dry run mode, which can be useful for initial setup and debugging. You can read more about dry run mode in our docs: https://docs.readme.com/main/docs/rdme#dry-run-mode", "command": "<%= config.bin %> <%= command.id %> [path] --version={project-version} --dryRun" } ], "flags": { "key": { "description": "An API key for your ReadMe project. Note that API authentication is required despite being omitted from the example usage. See our docs for more information: https://github.com/readmeio/rdme/tree/v10#authentication", "name": "key", "required": true, "summary": "ReadMe project API key", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "dryRun": { "description": "Runs the command without creating nor updating any changelogs in ReadMe. Useful for debugging.", "name": "dryRun", "allowNo": false, "type": "boolean" }, "github": { "description": "Create a new GitHub Actions workflow for this command.", "name": "github", "allowNo": false, "type": "boolean" } }, "hasDynamicHelp": false, "hidden": true, "hiddenAliases": [], "id": "changelogs", "pluginAlias": "rdme", "pluginName": "rdme", "pluginType": "core", "state": "deprecated", "strict": true, "summary": "Upload Markdown files to your ReadMe project as Changelog posts." }, "custompages:upload": { "aliases": [], "args": { "path": { "description": "Path to a local Markdown/HTML file or folder of Markdown/HTML files.", "name": "path", "required": true } }, "description": "The path can either be a directory or a single Markdown/HTML file.\n\nThe Markdown/HTML files will require YAML frontmatter with certain ReadMe documentation attributes. Check out our docs for more info on setting up your frontmatter: https://docs.readme.com/main/docs/rdme#markdown-file-setup", "examples": [ { "description": "The path input can be a directory. This will also upload any Markdown/HTML files that are located in subdirectories:", "command": "<%= config.bin %> <%= command.id %> documentation/ --branch={project-branch}" }, { "description": "The path input can also be individual Markdown/HTML files:", "command": "<%= config.bin %> <%= command.id %> documentation/about.md --branch={project-branch}" }, { "description": "You can omit the `--branch` flag to default to the `stable` branch of your project:", "command": "<%= config.bin %> <%= command.id %> [path]" }, { "description": "This command also has a dry run mode, which can be useful for initial setup and debugging. You can read more about dry run mode in our docs: https://docs.readme.com/main/docs/rdme#dry-run-mode", "command": "<%= config.bin %> <%= command.id %> [path] --dry-run" } ], "flags": { "key": { "description": "An API key for your ReadMe project. Note that API authentication is required despite being omitted from the example usage. See our docs for more information: https://github.com/readmeio/rdme/tree/v10#authentication", "name": "key", "required": true, "summary": "ReadMe project API key", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "branch": { "aliases": [ "version" ], "deprecateAliases": true, "description": "Defaults to `stable` (i.e., your main project version).", "name": "branch", "summary": "ReadMe project version", "default": "stable", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "confirm-autofixes": { "description": "This is useful if you are using this command in a CI/CD pipeline and want to ensure that the command does not prompt for user input.", "hidden": true, "name": "confirm-autofixes", "summary": "Bypasses the prompt and automatically fixes up any autofixable errors that are found in the Markdown/HTML files.", "allowNo": false, "type": "boolean" }, "dry-run": { "aliases": [ "dryRun" ], "deprecateAliases": true, "description": "Runs the command without creating nor updating any custom pages in ReadMe. Useful for debugging.", "name": "dry-run", "allowNo": false, "type": "boolean" }, "max-errors": { "description": "By default, this command will respond with a 1 exit code if any number of the Markdown/HTML files fail to upload. This flag allows you to set a maximum number of errors before the command fails. For example, if you set this flag to `5`, the command will respond with an error if 5 or more errors are encountered. If you do not want the command to fail under any circumstances (this could be useful for plugins where you want to handle the error handling yourself), set this flag to `-1`.", "hidden": true, "name": "max-errors", "summary": "Maximum number of page uploading errors before the command throws an error.", "default": 0, "hasDynamicHelp": false, "multiple": false, "type": "option" }, "skip-validation": { "description": "Skips the pre-upload validation of the Markdown/HTML files. This flag can be a useful escape hatch but its usage is not recommended.", "hidden": true, "name": "skip-validation", "allowNo": false, "type": "boolean" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "custompages:upload", "pluginAlias": "rdme", "pluginName": "rdme", "pluginType": "core", "strict": true, "summary": "Upload Markdown or HTML files to the Custom Pages section of your ReadMe project.", "section": "Custom Pages" }, "docs:migrate": { "aliases": [], "args": { "path": { "description": "Path to a local Markdown file or folder of Markdown files.", "name": "path", "required": true } }, "description": "The path can either be a directory or a single Markdown file. The command will transform the Markdown using plugins and validate the frontmatter to conform to ReadMe's standards.", "flags": { "out": { "name": "out", "summary": "The directory to write the migration output to. Defaults to a temporary directory.", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "confirm-autofixes": { "description": "This is useful if you are using this command in a CI/CD pipeline and want to ensure that the command does not prompt for user input.", "hidden": true, "name": "confirm-autofixes", "summary": "Bypasses the prompt and automatically fixes up any autofixable errors that are found in the Markdown files.", "allowNo": false, "type": "boolean" }, "dry-run": { "aliases": [ "dryRun" ], "deprecateAliases": true, "description": "Runs the command without creating nor updating any guides in ReadMe. Useful for debugging.", "name": "dry-run", "allowNo": false, "type": "boolean" }, "max-errors": { "description": "By default, this command will respond with a 1 exit code if any number of the Markdown files fail to upload. This flag allows you to set a maximum number of errors before the command fails. For example, if you set this flag to `5`, the command will respond with an error if 5 or more errors are encountered. If you do not want the command to fail under any circumstances (this could be useful for plugins where you want to handle the error handling yourself), set this flag to `-1`.", "hidden": true, "name": "max-errors", "summary": "Maximum number of page uploading errors before the command throws an error.", "default": 0, "hasDynamicHelp": false, "multiple": false, "type": "option" }, "skip-validation": { "description": "Skips the pre-upload validation of the Markdown files. This flag can be a useful escape hatch but its usage is not recommended.", "hidden": true, "name": "skip-validation", "allowNo": false, "type": "boolean" }, "hide-experimental-warning": { "description": "Hides the warning message about this command being in an experimental alpha.", "hidden": true, "name": "hide-experimental-warning", "allowNo": false, "type": "boolean" } }, "hasDynamicHelp": false, "hidden": true, "hiddenAliases": [], "id": "docs:migrate", "pluginAlias": "rdme", "pluginName": "rdme", "pluginType": "core", "strict": true, "summary": "Migrates a directory of pages to the ReadMe Guides format.\n\nThis command is in an experimental alpha and is likely to change. Use at your own risk!" }, "docs:upload": { "aliases": [], "args": { "path": { "description": "Path to a local Markdown file or folder of Markdown files.", "name": "path", "required": true } }, "description": "The path can either be a directory or a single Markdown file.\n\nThe Markdown files will require YAML frontmatter with certain ReadMe documentation attributes. Check out our docs for more info on setting up your frontmatter: https://docs.readme.com/main/docs/rdme#markdown-file-setup", "examples": [ { "description": "The path input can be a directory. This will also upload any Markdown files that are located in subdirectories:", "command": "<%= config.bin %> <%= command.id %> documentation/ --branch={project-branch}" }, { "description": "The path input can also be individual Markdown files:", "command": "<%= config.bin %> <%= command.id %> documentation/about.md --branch={project-branch}" }, { "description": "You can omit the `--branch` flag to default to the `stable` branch of your project:", "command": "<%= config.bin %> <%= command.id %> [path]" }, { "description": "This command also has a dry run mode, which can be useful for initial setup and debugging. You can read more about dry run mode in our docs: https://docs.readme.com/main/docs/rdme#dry-run-mode", "command": "<%= config.bin %> <%= command.id %> [path] --dry-run" } ], "flags": { "key": { "description": "An API key for your ReadMe project. Note that API authentication is required despite being omitted from the example usage. See our docs for more information: https://github.com/readmeio/rdme/tree/v10#authentication", "name": "key", "required": true, "summary": "ReadMe project API key", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "branch": { "aliases": [ "version" ], "deprecateAliases": true, "description": "Defaults to `stable` (i.e., your main project version).", "name": "branch", "summary": "ReadMe project version", "default": "stable", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "confirm-autofixes": { "description": "This is useful if you are using this command in a CI/CD pipeline and want to ensure that the command does not prompt for user input.", "hidden": true, "name": "confirm-autofixes", "summary": "Bypasses the prompt and automatically fixes up any autofixable errors that are found in the Markdown files.", "allowNo": false, "type": "boolean" }, "dry-run": { "aliases": [ "dryRun" ], "deprecateAliases": true, "description": "Runs the command without creating nor updating any guides in ReadMe. Useful for debugging.", "name": "dry-run", "allowNo": false, "type": "boolean" }, "max-errors": { "description": "By default, this command will respond with a 1 exit code if any number of the Markdown files fail to upload. This flag allows you to set a maximum number of errors before the command fails. For example, if you set this flag to `5`, the command will respond with an error if 5 or more errors are encountered. If you do not want the command to fail under any circumstances (this could be useful for plugins where you want to handle the error handling yourself), set this flag to `-1`.", "hidden": true, "name": "max-errors", "summary": "Maximum number of page uploading errors before the command throws an error.", "default": 0, "hasDynamicHelp": false, "multiple": false, "type": "option" }, "skip-validation": { "description": "Skips the pre-upload validation of the Markdown files. This flag can be a useful escape hatch but its usage is not recommended.", "hidden": true, "name": "skip-validation", "allowNo": false, "type": "boolean" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "docs:upload", "pluginAlias": "rdme", "pluginName": "rdme", "pluginType": "core", "strict": true, "summary": "Upload Markdown files to the Guides section of your ReadMe project.", "section": "Guides" }, "login": { "aliases": [], "args": {}, "description": "Login to a ReadMe project.", "flags": { "email": { "description": "Your email address", "name": "email", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "password": { "description": "Your password", "name": "password", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "project": { "description": "The subdomain of the project you wish to log into", "name": "project", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "otp": { "description": "Your one-time password (if you have two-factor authentication enabled)", "name": "otp", "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "login", "pluginAlias": "rdme", "pluginName": "rdme", "pluginType": "core", "strict": true }, "logout": { "aliases": [], "args": {}, "description": "Logs the currently authenticated user out of ReadMe.", "flags": {}, "hasDynamicHelp": false, "hiddenAliases": [], "id": "logout", "pluginAlias": "rdme", "pluginName": "rdme", "pluginType": "core", "strict": true }, "openapi:convert": { "aliases": [], "args": { "spec": { "description": "A path to your API definition — either a local file path or a URL. If your working directory and all subdirectories contain a single OpenAPI file, you can omit the path.", "name": "spec" } }, "description": "Converts Swagger files and Postman collections to OpenAPI and bundles any external references. **Note**: All of our other OpenAPI commands already do this conversion automatically, but this command is available in case you need this functionality exclusively.", "examples": [ { "description": "By default, this command will display a comprehensive table of all OpenAPI and ReadMe features found in your API definition:", "command": "<%= config.bin %> <%= command.id %> [url-or-local-path-to-file]" }, { "description": "You can omit the file name and `rdme` will scan your working directory (and any subdirectories) for OpenAPI/Swagger files. This approach will provide you with CLI prompts, so we do not recommend this technique in CI environments.", "command": "<%= config.bin %> <%= command.id %>" } ], "flags": { "out": { "description": "Output file path to write converted file to", "name": "out", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "title": { "description": "An override value for the `info.title` field in the API definition", "name": "title", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "workingDirectory": { "description": "Working directory (for usage with relative external references)", "name": "workingDirectory", "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "openapi:convert", "pluginAlias": "rdme", "pluginName": "rdme", "pluginType": "core", "strict": true, "summary": "Converts an API definition to OpenAPI and bundles any external references." }, "openapi:inspect": { "aliases": [], "args": { "spec": { "description": "A path to your API definition — either a local file path or a URL. If your working directory and all subdirectories contain a single OpenAPI file, you can omit the path.", "name": "spec" } }, "description": "This command will perform a comprehensive analysis of your API definition to determine how it's utilizing aspects of the OpenAPI Specification (such as circular references, polymorphism, etc.) and any ReadMe-specific extensions you might be using.", "examples": [ { "description": "By default, this command will display a comprehensive table of all OpenAPI and ReadMe features found in your API definition:", "command": "<%= config.bin %> <%= command.id %> [url-or-local-path-to-file]" }, { "description": "You can omit the file name and `rdme` will scan your working directory (and any subdirectories) for OpenAPI/Swagger files. This approach will provide you with CLI prompts, so we do not recommend this technique in CI environments.", "command": "<%= config.bin %> <%= command.id %>" }, { "description": "If you wish to automate this command, it contains a `--feature` flag so you can filter for one or several specific features. If you pass in one or more `--feature` flags, the command returns a `0` exit code if your definition contains all of the given features and a `1` exit code if your definition lacks any of the given features:", "command": "<%= config.bin %> <%= command.id %> [url-or-local-path-to-file] --feature circularRefs --feature polymorphism" } ], "flags": { "feature": { "description": "A specific OpenAPI or ReadMe feature you wish to see detailed information on (if it exists). If any features supplied do not exist within the API definition an exit(1) code will be returned alongside the report.", "name": "feature", "hasDynamicHelp": false, "multiple": true, "options": [ "additionalProperties", "callbacks", "circularRefs", "commonParameters", "discriminators", "links", "style", "polymorphism", "serverVariables", "webhooks", "xml", "readme" ], "type": "option" }, "workingDirectory": { "description": "Working directory (for usage with relative external references)", "name": "workingDirectory", "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "openapi:inspect", "pluginAlias": "rdme", "pluginName": "rdme", "pluginType": "core", "strict": true, "summary": "Analyze an OpenAPI/Swagger definition for various OpenAPI and ReadMe feature usage." }, "openapi:reduce": { "aliases": [], "args": { "spec": { "description": "A path to your API definition — either a local file path or a URL. If your working directory and all subdirectories contain a single OpenAPI file, you can omit the path.", "name": "spec" } }, "description": "Reduce your API definition down to a specific set of tags or paths, which can be useful if you're debugging a problematic schema somewhere, or if you have a file that is too big to maintain.", "examples": [ { "description": "By default, this command will ask you a couple questions about how you wish to reduce the file and then do so:", "command": "<%= config.bin %> <%= command.id %> [url-or-local-path-to-file]" }, { "description": "You can omit the file name and `rdme` will scan your working directory (and any subdirectories) for OpenAPI/Swagger files. This approach will provide you with CLI prompts, so we do not recommend this technique in CI environments.", "command": "<%= config.bin %> <%= command.id %>" }, { "description": "If you wish to automate this command, you can pass in CLI arguments to bypass the prompts:", "command": "<%= config.bin %> <%= command.id %> petstore.json --path /pet/{id} --method get --method put --out petstore.reduced.json" } ], "flags": { "method": { "description": "Methods to reduce by (can only be used alongside the `path` option)", "name": "method", "hasDynamicHelp": false, "multiple": true, "type": "option" }, "out": { "description": "Output file path to write reduced file to", "name": "out", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "path": { "description": "Paths to reduce by", "name": "path", "hasDynamicHelp": false, "multiple": true, "type": "option" }, "tag": { "description": "Tags to reduce by", "name": "tag", "hasDynamicHelp": false, "multiple": true, "type": "option" }, "title": { "description": "An override value for the `info.title` field in the API definition", "name": "title", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "workingDirectory": { "description": "Working directory (for usage with relative external references)", "name": "workingDirectory", "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "openapi:reduce", "pluginAlias": "rdme", "pluginName": "rdme", "pluginType": "core", "strict": true, "summary": "Reduce an OpenAPI definition into a smaller subset." }, "openapi:resolve": { "aliases": [], "args": { "spec": { "description": "A path to your API definition — either a local file path or a URL. If your working directory and all subdirectories contain a single OpenAPI file, you can omit the path.", "name": "spec" } }, "description": "This command provides a workaround for circular or recursive references within OpenAPI definitions so they can render properly in ReadMe. It automatically identifies and replaces these references with simplified object schemas, ensuring compatibility for seamless display in the ReadMe API Reference. As a result, instead of displaying an empty form, as would occur with schemas containing such references, you will receive a flattened representation of the object, showing what the object can potentially contain, including references to itself. Complex circular references may require manual inspection and may not be fully resolved.", "examples": [ { "description": "This will resolve circular and recursive references in the OpenAPI definition at the given file or URL:", "command": "<%= config.bin %> <%= command.id %> [url-or-local-path-to-file]" }, { "description": "You can omit the file name and `rdme` will scan your working directory (and any subdirectories) for OpenAPI files. This approach will provide you with CLI prompts, so we do not recommend this technique in CI environments.", "command": "<%= config.bin %> <%= command.id %>" }, { "description": "If you wish to automate this command, you can pass in CLI arguments to bypass the prompts:", "command": "<%= config.bin %> <%= command.id %> petstore.json --out petstore.openapi.json" } ], "flags": { "out": { "description": "Output file path to write resolved file to", "name": "out", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "workingDirectory": { "description": "Working directory (for usage with relative external references)", "name": "workingDirectory", "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "openapi:resolve", "pluginAlias": "rdme", "pluginName": "rdme", "pluginType": "core", "strict": true, "summary": "Resolves circular and recursive references in OpenAPI by replacing them with object schemas." }, "openapi:upload": { "aliases": [], "args": { "spec": { "description": "A path to your API definition — either a local file path or a URL. If your working directory and all subdirectories contain a single OpenAPI file, you can omit the path.", "name": "spec" } }, "description": "By default, the slug (i.e., the unique identifier for your API definition resource in ReadMe) will be inferred from the spec name and path. As long as you maintain these directory/file names and run `rdme` from the same location relative to your file, the inferred slug will be preserved and any updates you make to this file will be synced to the same resource in ReadMe.\n\nIf the spec is a local file, the inferred slug takes the relative path and slugifies it (e.g., the slug for `docs/api/petstore.json` will be `docs-api-petstore.json`).\n\nIf the spec is a URL, the inferred slug is the base file name from the URL (e.g., the slug for `https://example.com/docs/petstore.json` will be `petstore.json`).", "examples": [ { "description": "You can pass in a file name like so:", "command": "<%= config.bin %> <%= command.id %> --branch=1.0.0 openapi.json" }, { "description": "You can also pass in a file in a subdirectory (we recommend always running the CLI from the root of your repository):", "command": "<%= config.bin %> <%= command.id %> --branch=v1.0.0 example-directory/petstore.json" }, { "description": "You can also pass in a URL:", "command": "<%= config.bin %> <%= command.id %> --branch=1.0.0 https://example.com/openapi.json" }, { "description": "If you specify your ReadMe project version in the `info.version` field in your OpenAPI definition, you can use that:", "command": "<%= config.bin %> <%= command.id %> --useSpecVersion https://example.com/openapi.json" } ], "flags": { "key": { "description": "An API key for your ReadMe project. Note that API authentication is required despite being omitted from the example usage. See our docs for more information: https://github.com/readmeio/rdme/tree/v10#authentication", "name": "key", "required": true, "summary": "ReadMe project API key", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "branch": { "aliases": [ "version" ], "deprecateAliases": true, "description": "Defaults to `stable` (i.e., your main project version). This flag is mutually exclusive with `--useSpecVersion`.", "name": "branch", "summary": "ReadMe project version", "default": "stable", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "confirm-overwrite": { "description": "If set, file overwrites will be made without a confirmation prompt. This flag can be a useful in automated environments where prompts cannot be responded to.", "hidden": true, "name": "confirm-overwrite", "allowNo": false, "type": "boolean" }, "legacy-id": { "deprecated": true, "description": "This is only used for legacy `rdme` CLI workflows and only applies if your project, and this API definition, predate ReadMe Refactored. This flag is considered deprecated and we recommend using `--slug` instead.", "exclusive": [ "slug" ], "hidden": true, "name": "legacy-id", "summary": "The legacy ID for your API definition.", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "slug": { "description": "Allows you to override the slug (i.e., the unique identifier for your API definition resource in ReadMe) that's inferred from the API definition's file/URL path.\n\nYou do not need to include a file extension (i.e., either `custom-slug.json` or `custom-slug` will work). If you do, it must match the file extension of the file you're uploading.", "name": "slug", "summary": "Override the slug (i.e., the unique identifier) for your API definition.", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "useSpecVersion": { "description": "If included, use the version specified in the `info.version` field in your OpenAPI definition for your ReadMe project version. This flag is mutually exclusive with `--branch`.", "exclusive": [ "branch" ], "name": "useSpecVersion", "summary": "Use the OpenAPI `info.version` field for your ReadMe project version", "allowNo": false, "type": "boolean" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "openapi:upload", "pluginAlias": "rdme", "pluginName": "rdme", "pluginType": "core", "strict": true, "summary": "Upload (or re-upload) your API definition to ReadMe." }, "openapi:validate": { "aliases": [], "args": { "spec": { "description": "A path to your API definition — either a local file path or a URL. If your working directory and all subdirectories contain a single OpenAPI file, you can omit the path.", "name": "spec" } }, "description": "Perform a local validation of your API definition (no ReadMe account required!), which can be useful when constructing or editing your API definition.", "examples": [ { "description": "This will validate the API definition at the given URL or path:", "command": "<%= config.bin %> <%= command.id %> [url-or-local-path-to-file]" }, { "description": "You can omit the file name and `rdme` will scan your working directory (and any subdirectories) for OpenAPI/Swagger files. This approach will provide you with CLI prompts, so we do not recommend this technique in CI environments.", "command": "<%= config.bin %> <%= command.id %>" } ], "flags": { "github": { "description": "Create a new GitHub Actions workflow for this command.", "name": "github", "allowNo": false, "type": "boolean" }, "workingDirectory": { "description": "Working directory (for usage with relative external references)", "name": "workingDirectory", "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "openapi:validate", "pluginAlias": "rdme", "pluginName": "rdme", "pluginType": "core", "strict": true, "summary": "Validate your OpenAPI/Swagger definition." }, "reference:upload": { "aliases": [], "args": { "path": { "description": "Path to a local Markdown file or folder of Markdown files.", "name": "path", "required": true } }, "description": "The path can either be a directory or a single Markdown file.\n\nThe Markdown files will require YAML frontmatter with certain ReadMe documentation attributes. Check out our docs for more info on setting up your frontmatter: https://docs.readme.com/main/docs/rdme#markdown-file-setup", "examples": [ { "description": "The path input can be a directory. This will also upload any Markdown files that are located in subdirectories:", "command": "<%= config.bin %> <%= command.id %> documentation/ --branch={project-branch}" }, { "description": "The path input can also be individual Markdown files:", "command": "<%= config.bin %> <%= command.id %> documentation/about.md --branch={project-branch}" }, { "description": "You can omit the `--branch` flag to default to the `stable` branch of your project:", "command": "<%= config.bin %> <%= command.id %> [path]" }, { "description": "This command also has a dry run mode, which can be useful for initial setup and debugging. You can read more about dry run mode in our docs: https://docs.readme.com/main/docs/rdme#dry-run-mode", "command": "<%= config.bin %> <%= command.id %> [path] --dry-run" } ], "flags": { "key": { "description": "An API key for your ReadMe project. Note that API authentication is required despite being omitted from the example usage. See our docs for more information: https://github.com/readmeio/rdme/tree/v10#authentication", "name": "key", "required": true, "summary": "ReadMe project API key", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "branch": { "aliases": [ "version" ], "deprecateAliases": true, "description": "Defaults to `stable` (i.e., your main project version).", "name": "branch", "summary": "ReadMe project version", "default": "stable", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "confirm-autofixes": { "description": "This is useful if you are using this command in a CI/CD pipeline and want to ensure that the command does not prompt for user input.", "hidden": true, "name": "confirm-autofixes", "summary": "Bypasses the prompt and automatically fixes up any autofixable errors that are found in the Markdown files.", "allowNo": false, "type": "boolean" }, "dry-run": { "aliases": [ "dryRun" ], "deprecateAliases": true, "description": "Runs the command without creating nor updating any reference pages in ReadMe. Useful for debugging.", "name": "dry-run", "allowNo": false, "type": "boolean" }, "max-errors": { "description": "By default, this command will respond with a 1 exit code if any number of the Markdown files fail to upload. This flag allows you to set a maximum number of errors before the command fails. For example, if you set this flag to `5`, the command will respond with an error if 5 or more errors are encountered. If you do not want the command to fail under any circumstances (this could be useful for plugins where you want to handle the error handling yourself), set this flag to `-1`.", "hidden": true, "name": "max-errors", "summary": "Maximum number of page uploading errors before the command throws an error.", "default": 0, "hasDynamicHelp": false, "multiple": false, "type": "option" }, "skip-validation": { "description": "Skips the pre-upload validation of the Markdown files. This flag can be a useful escape hatch but its usage is not recommended.", "hidden": true, "name": "skip-validation", "allowNo": false, "type": "boolean" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "reference:upload", "pluginAlias": "rdme", "pluginName": "rdme", "pluginType": "core", "strict": true, "summary": "Upload Markdown files to the Reference section of your ReadMe project.", "section": "Reference" }, "whoami": { "aliases": [], "args": {}, "description": "Displays the current user and project authenticated with ReadMe.", "flags": {}, "hasDynamicHelp": false, "hiddenAliases": [], "id": "whoami", "pluginAlias": "rdme", "pluginName": "rdme", "pluginType": "core", "strict": true } }, "version": "10.4.0" }