Skip to content

Commit

Permalink
docs: add more descriptions for the key and version flags
Browse files Browse the repository at this point in the history
  • Loading branch information
kanadgupta committed Dec 6, 2024
1 parent 6b783fc commit 826feca
Show file tree
Hide file tree
Showing 7 changed files with 158 additions and 23 deletions.
40 changes: 34 additions & 6 deletions documentation/commands/categories.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ USAGE
$ rdme categories --key <value> [--version <value>]
FLAGS
--key=<value> (required) ReadMe Project API key
--version=<value> Project version. If running command in a CI environment and this option is not passed, the main
project version will be used.
--key=<value> (required) 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/v9#authentication
--version=<value> ReadMe project version
DESCRIPTION
Get all categories in your ReadMe project.
Expand All @@ -26,6 +27,19 @@ EXAMPLES
Get all categories associated to your project version:
$ rdme categories --version={project-version}
FLAG DESCRIPTIONS
--key=<value>
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/v9#authentication
ReadMe project API key
--version=<value> ReadMe project version
Your ReadMe project version. If running command in a CI environment and this option is not passed, the main project
version will be used. See our docs for more information: https://docs.readme.com/main/docs/versions
```

## `rdme categories create TITLE`
Expand All @@ -42,11 +56,12 @@ ARGUMENTS
FLAGS
--categoryType=<option> (required) Category type
<options: guide|reference>
--key=<value> (required) ReadMe Project API key
--key=<value> (required) 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/v9#authentication
--preventDuplicates Prevents the creation of a new category if there is an existing category with a matching
`categoryType` and `title`
--version=<value> Project version. If running command in a CI environment and this option is not passed, the
main project version will be used.
--version=<value> ReadMe project version
DESCRIPTION
Create a category with the specified title and guide in your ReadMe project.
Expand All @@ -61,4 +76,17 @@ EXAMPLES
$ rdme categories create <title> --categoryType={guide|reference} --version={project-version} \
--preventDuplicates
FLAG DESCRIPTIONS
--key=<value>
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/v9#authentication
ReadMe project API key
--version=<value> ReadMe project version
Your ReadMe project version. If running command in a CI environment and this option is not passed, the main project
version will be used. See our docs for more information: https://docs.readme.com/main/docs/versions
```
12 changes: 11 additions & 1 deletion documentation/commands/changelogs.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ ARGUMENTS
FLAGS
--dryRun Runs the command without creating/updating any changelogs in ReadMe. Useful for debugging.
--github Create a new GitHub Actions workflow for this command.
--key=<value> (required) ReadMe Project API key
--key=<value> (required) 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/v9#authentication
DESCRIPTION
Sync Markdown files to your ReadMe project as Changelog posts.
Expand All @@ -38,4 +40,12 @@ EXAMPLES
dry run mode in our docs: https://docs.readme.com/main/docs/rdme#dry-run-mode
$ rdme changelogs [path] --version={project-version} --dryRun
FLAG DESCRIPTIONS
--key=<value>
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/v9#authentication
ReadMe project API key
```
12 changes: 11 additions & 1 deletion documentation/commands/custompages.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ ARGUMENTS
FLAGS
--dryRun Runs the command without creating/updating any custom pages in ReadMe. Useful for debugging.
--github Create a new GitHub Actions workflow for this command.
--key=<value> (required) ReadMe Project API key
--key=<value> (required) 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/v9#authentication
DESCRIPTION
Sync Markdown/HTML files to your ReadMe project as Custom Pages.
Expand All @@ -38,4 +40,12 @@ EXAMPLES
dry run mode in our docs: https://docs.readme.com/main/docs/rdme#dry-run-mode
$ rdme custompages [path] --version={project-version} --dryRun
FLAG DESCRIPTIONS
--key=<value>
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/v9#authentication
ReadMe project API key
```
40 changes: 34 additions & 6 deletions documentation/commands/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ ARGUMENTS
FLAGS
--dryRun Runs the command without creating/updating any docs in ReadMe. Useful for debugging.
--github Create a new GitHub Actions workflow for this command.
--key=<value> (required) ReadMe Project API key
--version=<value> Project version. If running command in a CI environment and this option is not passed, the main
project version will be used.
--key=<value> (required) 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/v9#authentication
--version=<value> ReadMe project version
DESCRIPTION
Sync Markdown files to your ReadMe project as Guides.
Expand All @@ -44,6 +45,19 @@ EXAMPLES
dry run mode in our docs: https://docs.readme.com/main/docs/rdme#dry-run-mode
$ rdme docs [path] --version={project-version} --dryRun
FLAG DESCRIPTIONS
--key=<value>
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/v9#authentication
ReadMe project API key
--version=<value> ReadMe project version
Your ReadMe project version. If running command in a CI environment and this option is not passed, the main project
version will be used. See our docs for more information: https://docs.readme.com/main/docs/versions
```

## `rdme docs prune FOLDER`
Expand All @@ -61,9 +75,10 @@ FLAGS
--confirm Bypass the confirmation prompt. Useful for CI environments.
--dryRun Runs the command without deleting any docs in ReadMe. Useful for debugging.
--github Create a new GitHub Actions workflow for this command.
--key=<value> (required) ReadMe Project API key
--version=<value> Project version. If running command in a CI environment and this option is not passed, the main
project version will be used.
--key=<value> (required) 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/v9#authentication
--version=<value> ReadMe project version
DESCRIPTION
Delete any docs from ReadMe if their slugs are not found in the target folder.
Expand All @@ -79,4 +94,17 @@ EXAMPLES
Run with `--confirm` to bypass the confirmation prompt (useful for CI environments):
$ rdme docs prune [path-to-directory-of-markdown] --confirm
FLAG DESCRIPTIONS
--key=<value>
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/v9#authentication
ReadMe project API key
--version=<value> ReadMe project version
Your ReadMe project version. If running command in a CI environment and this option is not passed, the main project
version will be used. See our docs for more information: https://docs.readme.com/main/docs/versions
```
19 changes: 16 additions & 3 deletions documentation/commands/openapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,16 @@ FLAGS
--github Create a new GitHub Actions workflow for this command.
--id=<value> Unique identifier for your API definition. Use this if you're re-uploading an existing API
definition.
--key=<value> (required) ReadMe Project API key
--key=<value> (required) 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/v9#authentication
--raw Return the command results as a JSON object instead of a pretty output.
--title=<value> An override value for the `info.title` field in the API definition
--update Bypasses the create/update prompt and automatically updates an existing API definition in
ReadMe.
--useSpecVersion Uses the version listed in the `info.version` field in the API definition for the project
version parameter.
--version=<value> Project version. If running command in a CI environment and this option is not passed, the
main project version will be used.
--version=<value> ReadMe project version
--workingDirectory=<value> Working directory (for usage with relative external references)
DESCRIPTION
Expand Down Expand Up @@ -98,10 +99,22 @@ EXAMPLES
$ rdme openapi [url-or-local-path-to-file] --version={project-version} --update
FLAG DESCRIPTIONS
--key=<value>
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/v9#authentication
ReadMe project API key
--update Bypasses the create/update prompt and automatically updates an existing API definition in ReadMe.
Bypasses the create/update prompt and automatically updates an existing API definition in ReadMe. Note that this
flag only works if there's only one API definition associated with the current version.
--version=<value> ReadMe project version
Your ReadMe project version. If running command in a CI environment and this option is not passed, the main project
version will be used. See our docs for more information: https://docs.readme.com/main/docs/versions
```

## `rdme openapi convert [SPEC]`
Expand Down
48 changes: 44 additions & 4 deletions documentation/commands/versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ USAGE
$ rdme versions --key <value> [--version <value>]
FLAGS
--key=<value> (required) ReadMe Project API key
--key=<value> (required) 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/v9#authentication
--version=<value> A specific project version to view.
DESCRIPTION
Expand All @@ -31,6 +33,14 @@ EXAMPLES
Get all information about a particular version:
$ rdme versions --version={project-version}
FLAG DESCRIPTIONS
--key=<value>
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/v9#authentication
ReadMe project API key
```

## `rdme versions create VERSION`
Expand All @@ -54,7 +64,9 @@ FLAGS
--fork=<value> The semantic version which you'd like to fork from.
--hidden=<option> Should this version be hidden? The main version cannot be hidden.
<options: true|false>
--key=<value> (required) ReadMe Project API key
--key=<value> (required) 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/v9#authentication
--main=<option> Should this be the main version for your project?
<options: true|false>
Expand All @@ -71,6 +83,14 @@ EXAMPLES
$ rdme versions create <version> --fork={version-fork} --main={true|false} --beta={true|false} \
--deprecated={true|false} --hidden={true|false}
FLAG DESCRIPTIONS
--key=<value>
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/v9#authentication
ReadMe project API key
```

## `rdme versions delete [VERSION]`
Expand All @@ -85,7 +105,9 @@ ARGUMENTS
VERSION The version you'd like to delete.
FLAGS
--key=<value> (required) ReadMe Project API key
--key=<value> (required) 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/v9#authentication
DESCRIPTION
Delete a version associated with your ReadMe project.
Expand All @@ -94,6 +116,14 @@ EXAMPLES
Remove a specific version from your project, as well as all of the associated documentation:
$ rdme versions delete <version>
FLAG DESCRIPTIONS
--key=<value>
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/v9#authentication
ReadMe project API key
```

## `rdme versions update [VERSION]`
Expand All @@ -116,7 +146,9 @@ FLAGS
<options: true|false>
--hidden=<option> Should this version be hidden? The main version cannot be hidden.
<options: true|false>
--key=<value> (required) ReadMe Project API key
--key=<value> (required) 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/v9#authentication
--main=<option> Should this be the main version for your project?
<options: true|false>
--newVersion=<value> What should the version be renamed to?
Expand All @@ -134,4 +166,12 @@ EXAMPLES
$ rdme versions update <version> --newVersion={new-version-name} --main={true|false} --beta={true|false} \
--deprecated={true|false} --hidden={true|false}
FLAG DESCRIPTIONS
--key=<value>
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/v9#authentication
ReadMe project API key
```
10 changes: 8 additions & 2 deletions src/lib/flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ export const githubFlag = Flags.boolean({ description: 'Create a new GitHub Acti
/**
* Used in any command where `key` is a `flag.
*/
export const keyFlag = Flags.string({ description: 'ReadMe Project API key', required: true });
export const keyFlag = Flags.string({
description: 'ReadMe project API key',
required: true,
summary:
'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/v9#authentication',
});

/**
* Used in the `openapi` family of commands where `title` is an option.
Expand All @@ -22,7 +27,8 @@ export const titleFlag = Flags.string({
*/
export const versionFlag = Flags.string({
description:
'Project version. If running command in a CI environment and this option is not passed, the main project version will be used.',
'Your ReadMe project version. If running command in a CI environment and this option is not passed, the main project version will be used. See our docs for more information: https://docs.readme.com/main/docs/versions',
summary: 'ReadMe project version',
});

/**
Expand Down

0 comments on commit 826feca

Please sign in to comment.