-
Notifications
You must be signed in to change notification settings - Fork 46
[DX-329] Implemented reference documentation for ably-cli tool #3307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sacOO7
wants to merge
10
commits into
main
Choose a base branch
from
feature/ably-cli-reference-documentation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
231633b
Implemented reference documentation for ably-cli tool
sacOO7 ef019c9
Added NODE_OPTIONS: --max-old-space-size=8192 to the build job's envi…
sacOO7 7e09b7d
- Implemented proper navigation links to CLI reference
sacOO7 5883c5d
Updated ably-cli tool page to have explicit sections for auto-complet…
sacOO7 1159ee1
Added cli commands to nav bar entries for proper navigation
sacOO7 e747bf6
Refactored and reordered headings for channels, rooms and spaces sub-…
sacOO7 5c05a16
- Added output format for apps and accounts
sacOO7 98459da
Added output to channels publish and subscribe commands for CLI tool …
sacOO7 6f7e276
Merge remote-tracking branch 'origin/main' into feature/ably-cli-refe…
sacOO7 ec81ef5
Added missing synopsis to commands similar to aws CLI
sacOO7 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| --- | ||
| title: "Accounts current" | ||
| meta_description: "Show the current Ably account using the CLI." | ||
| meta_keywords: "ably cli, cli, accounts, current account, ably accounts current" | ||
| --- | ||
|
|
||
| Use the `ably accounts current` command to show details of the currently active Ably account. | ||
|
|
||
| ## Synopsis | ||
|
|
||
| <Code> | ||
| ```shell | ||
| ably accounts current [flags] | ||
| ``` | ||
| </Code> | ||
|
|
||
| ## Global flags | ||
|
|
||
| The following [global flags](/docs/cli#global-flags) are also available: | ||
|
|
||
| * [`--json`](/docs/cli#json) or [`--pretty-json`](/docs/cli#pretty-json) — mutually exclusive output format flags. | ||
| * [`--verbose`](/docs/cli#verbose) — can be combined with either output format flag. | ||
|
|
||
| ## Examples | ||
|
|
||
| Display the current account: | ||
|
|
||
| <Code> | ||
| ```shell | ||
| ably accounts current | ||
| ``` | ||
| </Code> | ||
|
|
||
| Display the current account in JSON format: | ||
|
|
||
| <Code> | ||
| ```shell | ||
| ably accounts current --json | ||
| ``` | ||
| </Code> | ||
|
|
||
| ## Output | ||
|
|
||
| The `ably accounts current` command displays: | ||
|
|
||
| | Property | Description | | ||
| | -------- | ----------- | | ||
| | Account | The account name and ID. | | ||
| | User | The email address of the logged-in user. | | ||
| | Apps configured | Number of apps configured for this account. | | ||
| | Current App | The currently selected app name and ID. | | ||
| | Current API Key | The API key being used. | | ||
| | Key Label | The label of the current API key. | | ||
|
|
||
| ## See also | ||
|
|
||
| * [Accounts](/docs/cli/accounts) — Explore all `ably accounts` commands. | ||
| * [CLI reference](/docs/cli) — Full list of available commands. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| --- | ||
| title: "Accounts" | ||
| meta_description: "Manage Ably accounts and configured access tokens using the CLI." | ||
| meta_keywords: "ably cli, cli, accounts, authentication, account management, ably accounts" | ||
| --- | ||
|
|
||
| Use the `ably accounts` command group to manage your Ably accounts and configured access tokens. These commands enable you to log in, switch between accounts, view account information, and log out. | ||
|
|
||
| ## Subcommands | ||
|
|
||
| | Command | Description | | ||
| | ------- | ----------- | | ||
| | [`ably accounts current`](/docs/cli/accounts/current) | Show the current Ably account. | | ||
| | [`ably accounts list`](/docs/cli/accounts/list) | List all locally configured Ably accounts. | | ||
| | [`ably accounts login`](/docs/cli/accounts/login) | Log in to an Ably account. | | ||
| | [`ably accounts logout`](/docs/cli/accounts/logout) | Log out from an Ably account. | | ||
| | [`ably accounts switch`](/docs/cli/accounts/switch) | Switch to a different Ably account. | | ||
|
|
||
| ## See also | ||
|
|
||
| * [CLI reference](/docs/cli) — Full list of available commands. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| --- | ||
| title: "Accounts list" | ||
| meta_description: "List all locally configured Ably accounts using the CLI." | ||
| meta_keywords: "ably cli, cli, accounts, list accounts, ably accounts list" | ||
| --- | ||
|
|
||
| Use the `ably accounts list` command to list all locally configured Ably accounts. | ||
|
|
||
| ## Synopsis | ||
|
|
||
| <Code> | ||
| ```shell | ||
| ably accounts list [flags] | ||
| ``` | ||
| </Code> | ||
|
|
||
| ## Global flags | ||
|
|
||
| The following [global flags](/docs/cli#global-flags) are also available: | ||
|
|
||
| * [`--json`](/docs/cli#json) or [`--pretty-json`](/docs/cli#pretty-json) — mutually exclusive output format flags. | ||
| * [`--verbose`](/docs/cli#verbose) — can be combined with either output format flag. | ||
|
|
||
| ## Examples | ||
|
|
||
| List all configured accounts: | ||
|
|
||
| <Code> | ||
| ```shell | ||
| ably accounts list | ||
| ``` | ||
| </Code> | ||
|
|
||
| List all configured accounts in JSON format: | ||
|
|
||
| <Code> | ||
| ```shell | ||
| ably accounts list --json | ||
| ``` | ||
| </Code> | ||
|
|
||
| ## Output | ||
|
|
||
| The `ably accounts list` command displays list of accounts in format: | ||
|
|
||
| | Property | Description | | ||
| | -------- | ----------- | | ||
| | Account | The account name and ID. | | ||
| | Name | The alias name of the account, if one is configured. | | ||
| | User | The email address of the logged-in user. | | ||
| | Apps | Number of apps configured for this account. | | ||
| | Current App | The currently selected app name and ID. | | ||
|
|
||
| ## See also | ||
|
|
||
| * [Accounts](/docs/cli/accounts) — Explore all `ably accounts` commands. | ||
| * [CLI reference](/docs/cli) — Full list of available commands. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| --- | ||
| title: "Accounts login" | ||
| meta_description: "Log in to your Ably account using the CLI." | ||
| meta_keywords: "ably cli, cli, accounts, login, authentication, ably accounts login" | ||
| --- | ||
|
|
||
| Use the `ably accounts login` command to log in to your Ably account. By default, this opens a browser window to authenticate. You can optionally provide an access token directly. | ||
|
|
||
| ## Synopsis | ||
|
|
||
| <Code> | ||
| ```shell | ||
| ably accounts login [token] [flags] | ||
| ``` | ||
| </Code> | ||
|
|
||
| ## Arguments | ||
|
|
||
| ### `token` <a id="token"/> | ||
|
|
||
| An optional access token to use for authentication. If not provided, the CLI opens a browser window to authenticate interactively. | ||
|
|
||
| ## Flags | ||
|
|
||
| You can optionally pass the following flags to the `ably accounts login` command: | ||
|
|
||
| ### `--alias | -a` <a id="alias"/> | ||
|
|
||
| Set an alias name for this account. This enables you to easily switch between multiple accounts. | ||
|
|
||
| ### `--no-browser` <a id="no-browser"/> | ||
|
|
||
| Prevent the CLI from automatically opening a browser window for authentication. The CLI displays a URL that you can manually open instead. | ||
|
|
||
| ## Global flags | ||
|
|
||
| The following [global flags](/docs/cli#global-flags) are also available: | ||
|
|
||
| * [`--json`](/docs/cli#json) or [`--pretty-json`](/docs/cli#pretty-json) — mutually exclusive output format flags. | ||
| * [`--verbose`](/docs/cli#verbose) — can be combined with either output format flag. | ||
|
|
||
| ## Examples | ||
|
|
||
| Log in to your Ably account using the browser: | ||
|
|
||
| <Code> | ||
| ```shell | ||
| ably accounts login | ||
| ``` | ||
| </Code> | ||
|
|
||
| Log in and set an alias for the account: | ||
|
|
||
| <Code> | ||
| ```shell | ||
| ably accounts login --alias work | ||
| ``` | ||
| </Code> | ||
|
|
||
| Log in without opening a browser: | ||
|
|
||
| <Code> | ||
| ```shell | ||
| ably accounts login --no-browser | ||
| ``` | ||
| </Code> | ||
|
|
||
| ## See also | ||
|
|
||
| * [Accounts](/docs/cli/accounts) — Explore all `ably accounts` commands. | ||
| * [CLI reference](/docs/cli) — Full list of available commands. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| --- | ||
| title: "Accounts logout" | ||
| meta_description: "Log out from an Ably account using the CLI." | ||
| meta_keywords: "ably cli, cli, accounts, logout, authentication, ably accounts logout" | ||
| --- | ||
|
|
||
| Use the `ably accounts logout` command to log out from an Ably account. By default, this logs out from the current account and prompts for confirmation. | ||
|
|
||
| ## Synopsis | ||
|
|
||
| <Code> | ||
| ```shell | ||
| ably accounts logout [alias] [flags] | ||
| ``` | ||
| </Code> | ||
|
|
||
| ## Arguments | ||
|
|
||
| ### `alias` <a id="alias"/> | ||
|
|
||
| An optional account alias to log out from. If not provided, the CLI logs out from the current account. | ||
|
|
||
| ## Flags | ||
|
|
||
| You can optionally pass the following flags to the `ably accounts logout` command: | ||
|
|
||
| ### `--force | -f` <a id="force"/> | ||
|
|
||
| Skip the confirmation prompt and log out immediately. Required when using `--json`. | ||
|
|
||
| ## Global flags | ||
|
|
||
| The following [global flags](/docs/cli#global-flags) are also available: | ||
|
|
||
| * [`--json`](/docs/cli#json) or [`--pretty-json`](/docs/cli#pretty-json) — mutually exclusive output format flags. | ||
| * [`--verbose`](/docs/cli#verbose) — can be combined with either output format flag. | ||
|
|
||
| ## Examples | ||
|
|
||
| Log out from the current account: | ||
|
|
||
| <Code> | ||
| ```shell | ||
| ably accounts logout | ||
| ``` | ||
| </Code> | ||
|
|
||
| Log out from a specific account by alias: | ||
|
|
||
| <Code> | ||
| ```shell | ||
| ably accounts logout work | ||
| ``` | ||
| </Code> | ||
|
|
||
| Log out without confirmation: | ||
|
|
||
| <Code> | ||
| ```shell | ||
| ably accounts logout --force | ||
| ``` | ||
| </Code> | ||
|
|
||
| ## See also | ||
|
|
||
| * [Accounts](/docs/cli/accounts) — Explore all `ably accounts` commands. | ||
| * [CLI reference](/docs/cli) — Full list of available commands. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| --- | ||
| title: "Accounts switch" | ||
| meta_description: "Switch to a different Ably account using the CLI." | ||
| meta_keywords: "ably cli, cli, accounts, switch account, ably accounts switch" | ||
| --- | ||
|
|
||
| Use the `ably accounts switch` command to switch to a different locally configured Ably account. If no alias is provided, the CLI presents an interactive list of available accounts. | ||
|
|
||
| ## Synopsis | ||
|
|
||
| <Code> | ||
| ```shell | ||
| ably accounts switch [alias] | ||
| ``` | ||
| </Code> | ||
|
|
||
| ## Arguments | ||
|
|
||
| ### `alias` <a id="alias"/> | ||
|
|
||
| An optional account alias to switch to. If not provided, the CLI displays an interactive prompt to select from available accounts. | ||
|
|
||
| ## Global flags | ||
|
|
||
| The following [global flags](/docs/cli#global-flags) are also available: | ||
|
|
||
| * [`--json`](/docs/cli#json) or [`--pretty-json`](/docs/cli#pretty-json) — mutually exclusive output format flags. | ||
| * [`--verbose`](/docs/cli#verbose) — can be combined with either output format flag. | ||
|
|
||
| ## Examples | ||
|
|
||
| Switch accounts interactively: | ||
|
|
||
| <Code> | ||
| ```shell | ||
| ably accounts switch | ||
| ``` | ||
| </Code> | ||
|
|
||
| Switch to a specific account by alias: | ||
|
|
||
| <Code> | ||
| ```shell | ||
| ably accounts switch work | ||
| ``` | ||
| </Code> | ||
|
|
||
| ## See also | ||
|
|
||
| * [Accounts](/docs/cli/accounts) — Explore all `ably accounts` commands. | ||
| * [CLI reference](/docs/cli) — Full list of available commands. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| --- | ||
| title: "Apps create" | ||
| meta_description: "Create a new Ably application using the CLI." | ||
| meta_keywords: "ably cli, cli, apps, create, new application, ably apps create" | ||
| --- | ||
|
|
||
| Use the `ably apps create` command to create a new Ably application in your account. | ||
|
|
||
| ## Synopsis | ||
|
|
||
| <Code> | ||
| ```shell | ||
| ably apps create --name <name> [flags] | ||
| ``` | ||
| </Code> | ||
|
|
||
| ## Flags | ||
|
|
||
| You can pass the following flags to the `ably apps create` command: | ||
|
|
||
| ### `--name` <a id="name"/> | ||
|
|
||
| The name of the application to create. This flag is required. | ||
|
|
||
| ### `--tls-only` <a id="tls-only"/> | ||
|
|
||
| Restrict the application to TLS connections only. When enabled, all connections to this app must use TLS encryption. | ||
|
|
||
| ## Global flags | ||
|
|
||
| The following [global flags](/docs/cli#global-flags) are also available: | ||
|
|
||
| * [`--json`](/docs/cli#json) or [`--pretty-json`](/docs/cli#pretty-json) — mutually exclusive output format flags. | ||
| * [`--verbose`](/docs/cli#verbose) — can be combined with either output format flag. | ||
|
|
||
| ## Examples | ||
|
|
||
| Create a new application: | ||
|
|
||
| <Code> | ||
| ```shell | ||
| ably apps create --name "my-app" | ||
| ``` | ||
| </Code> | ||
|
|
||
| Create an application restricted to TLS connections only: | ||
|
|
||
| <Code> | ||
| ```shell | ||
| ably apps create --name "secure-app" --tls-only | ||
| ``` | ||
| </Code> | ||
|
|
||
| ## See also | ||
|
|
||
| * [Apps](/docs/cli/apps) — Explore all `ably apps` commands. | ||
| * [CLI reference](/docs/cli) — Full list of available commands. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having this repeated over every single page is going to get very repetitive. Is it better to have a "global flags" page and that's it? Otherwise if we add another global flag then it mean lots of updates.
Alternatively a partial, @m-hulbert will probably have the best advice on this