diff --git a/.circleci/config.yml b/.circleci/config.yml index fd47405d04..6c3422b6df 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -75,6 +75,7 @@ jobs: environment: ASSET_COMPRESSION_ITERATIONS: 1 COMPRESS_MAX_THREADS: 4 + NODE_OPTIONS: --max-old-space-size=8192 executor: name: default resource_class: xlarge diff --git a/src/data/nav/platform.ts b/src/data/nav/platform.ts index 38a8b53a47..4ea54e2171 100644 --- a/src/data/nav/platform.ts +++ b/src/data/nav/platform.ts @@ -386,6 +386,10 @@ export default { link: '/docs/api/control-api', name: 'Control API', }, + { + link: '/docs/cli', + name: 'Ably CLI Reference', + }, ], }, ], diff --git a/src/pages/docs/cli/accounts/current.mdx b/src/pages/docs/cli/accounts/current.mdx new file mode 100644 index 0000000000..bcda95c456 --- /dev/null +++ b/src/pages/docs/cli/accounts/current.mdx @@ -0,0 +1,46 @@ +--- +title: "ably 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 + + +```shell +ably accounts current [flags] +``` + + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Display the current account: + + +```shell +ably accounts current +``` + + +Display the current account in JSON format: + + +```shell +ably accounts current --json +``` + + +## See also + +* [Accounts](/docs/cli/accounts) — Explore all `ably accounts` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/accounts/index.mdx b/src/pages/docs/cli/accounts/index.mdx new file mode 100644 index 0000000000..4eadec1686 --- /dev/null +++ b/src/pages/docs/cli/accounts/index.mdx @@ -0,0 +1,21 @@ +--- +title: "ably 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. diff --git a/src/pages/docs/cli/accounts/list.mdx b/src/pages/docs/cli/accounts/list.mdx new file mode 100644 index 0000000000..af70aabfb1 --- /dev/null +++ b/src/pages/docs/cli/accounts/list.mdx @@ -0,0 +1,46 @@ +--- +title: "ably 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 + + +```shell +ably accounts list [flags] +``` + + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +List all configured accounts: + + +```shell +ably accounts list +``` + + +List all configured accounts in JSON format: + + +```shell +ably accounts list --json +``` + + +## See also + +* [Accounts](/docs/cli/accounts) — Explore all `ably accounts` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/accounts/login.mdx b/src/pages/docs/cli/accounts/login.mdx new file mode 100644 index 0000000000..65007fd8b1 --- /dev/null +++ b/src/pages/docs/cli/accounts/login.mdx @@ -0,0 +1,72 @@ +--- +title: "ably 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 + + +```shell +ably accounts login [token] [flags] +``` + + +## Arguments + +### `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` + +Set an alias name for this account. This enables you to easily switch between multiple accounts. + +### `--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) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Log in to your Ably account using the browser: + + +```shell +ably accounts login +``` + + +Log in and set an alias for the account: + + +```shell +ably accounts login --alias work +``` + + +Log in without opening a browser: + + +```shell +ably accounts login --no-browser +``` + + +## See also + +* [Accounts](/docs/cli/accounts) — Explore all `ably accounts` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/accounts/logout.mdx b/src/pages/docs/cli/accounts/logout.mdx new file mode 100644 index 0000000000..7587b3afad --- /dev/null +++ b/src/pages/docs/cli/accounts/logout.mdx @@ -0,0 +1,68 @@ +--- +title: "ably 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 + + +```shell +ably accounts logout [alias] [flags] +``` + + +## Arguments + +### `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` + +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) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Log out from the current account: + + +```shell +ably accounts logout +``` + + +Log out from a specific account by alias: + + +```shell +ably accounts logout work +``` + + +Log out without confirmation: + + +```shell +ably accounts logout --force +``` + + +## See also + +* [Accounts](/docs/cli/accounts) — Explore all `ably accounts` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/accounts/switch.mdx b/src/pages/docs/cli/accounts/switch.mdx new file mode 100644 index 0000000000..9b25d7c061 --- /dev/null +++ b/src/pages/docs/cli/accounts/switch.mdx @@ -0,0 +1,52 @@ +--- +title: "ably 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 + + +```shell +ably accounts switch [alias] +``` + + +## Arguments + +### `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) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Switch accounts interactively: + + +```shell +ably accounts switch +``` + + +Switch to a specific account by alias: + + +```shell +ably accounts switch work +``` + + +## See also + +* [Accounts](/docs/cli/accounts) — Explore all `ably accounts` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/apps/create.mdx b/src/pages/docs/cli/apps/create.mdx new file mode 100644 index 0000000000..d117711c4e --- /dev/null +++ b/src/pages/docs/cli/apps/create.mdx @@ -0,0 +1,56 @@ +--- +title: "ably apps create" +meta_description: "Create a new Ably application using the CLI." +meta_keywords: "ably cli, cli, apps, create, new application, ably apps create" +--- + + +```shell +ably apps create --name [flags] +``` + + +Use the `ably apps create` command to create a new Ably application in your account. + +## Flags + +You can pass the following flags to the `ably apps create` command: + +### `--name` + +The name of the application to create. This flag is required. + +### `--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) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Create a new application: + + +```shell +ably apps create --name "my-app" +``` + + +Create an application restricted to TLS connections only: + + +```shell +ably apps create --name "secure-app" --tls-only +``` + + +## See also + +* [Apps](/docs/cli/apps) — Explore all `ably apps` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/apps/current.mdx b/src/pages/docs/cli/apps/current.mdx new file mode 100644 index 0000000000..e3fd8713dd --- /dev/null +++ b/src/pages/docs/cli/apps/current.mdx @@ -0,0 +1,44 @@ +--- +title: "ably apps current" +meta_description: "Show the currently selected Ably application using the CLI." +meta_keywords: "ably cli, cli, apps, current, selected app, ably apps current" +--- + + +```shell +ably apps current +``` + + +Use the `ably apps current` command to display information about the currently selected Ably application. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Show the currently selected app: + + +```shell +ably apps current +``` + + +Show the currently selected app in JSON format: + + +```shell +ably apps current --json +``` + + +## See also + +* [Apps](/docs/cli/apps) — Explore all `ably apps` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/apps/delete.mdx b/src/pages/docs/cli/apps/delete.mdx new file mode 100644 index 0000000000..e06f63ca1c --- /dev/null +++ b/src/pages/docs/cli/apps/delete.mdx @@ -0,0 +1,76 @@ +--- +title: "ably apps delete" +meta_description: "Permanently delete an Ably application using the CLI." +meta_keywords: "ably cli, cli, apps, delete, remove application, ably apps delete" +--- + + +```shell +ably apps delete [id] [flags] +``` + + +Use the `ably apps delete` command to permanently delete an Ably application. + + + +## Arguments + +Pass the following arguments to the `ably apps delete` command: + +### `[id]` + +The ID of the application to delete. If not specified, the currently selected app is used. + +## Flags + +You can optionally pass the following flags to the `ably apps delete` command: + +### `--app` + +The app ID to delete. This flag overrides both the `[id]` argument and the currently selected app. + +### `--force | -f` + +Skip the confirmation prompt and delete the application immediately. Required when using `--json`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Delete the currently selected app: + + +```shell +ably apps delete +``` + + +Delete a specific app by ID: + + +```shell +ably apps delete aBcDe1 +``` + + +Delete an app without a confirmation prompt: + + +```shell +ably apps delete aBcDe1 --force +``` + + +## See also + +* [Apps](/docs/cli/apps) — Explore all `ably apps` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/apps/index.mdx b/src/pages/docs/cli/apps/index.mdx new file mode 100644 index 0000000000..6f32a5f47d --- /dev/null +++ b/src/pages/docs/cli/apps/index.mdx @@ -0,0 +1,32 @@ +--- +title: "ably apps" +meta_description: "Manage your Ably applications using the CLI." +meta_keywords: "ably cli, cli, apps, applications, app management, ably apps" +--- + +Use the `ably apps` command group to manage your Ably applications. These commands enable you to create, update, delete, list, and switch between apps, as well as manage channel rules for your apps. + +## App management commands + +| Command | Description | +| ------- | ----------- | +| [`ably apps create`](/docs/cli/apps/create) | Create a new Ably application. | +| [`ably apps current`](/docs/cli/apps/current) | Show the currently selected app. | +| [`ably apps delete`](/docs/cli/apps/delete) | Permanently delete an Ably application. | +| [`ably apps list`](/docs/cli/apps/list) | List all apps in the current account. | +| [`ably apps switch`](/docs/cli/apps/switch) | Switch to a different Ably app. | +| [`ably apps update`](/docs/cli/apps/update) | Update an app's configuration. | + +## Rule management commands + +| Command | Description | +| ------- | ----------- | +| [`ably apps rules`](/docs/cli/apps/rules) | Manage channel rules (namespaces) for apps. | +| [`ably apps rules create`](/docs/cli/apps/rules/create) | Create a channel rule for an app. | +| [`ably apps rules delete`](/docs/cli/apps/rules/delete) | Delete a channel rule from an app. | +| [`ably apps rules list`](/docs/cli/apps/rules/list) | List channel rules for an app. | +| [`ably apps rules update`](/docs/cli/apps/rules/update) | Update a channel rule for an app. | + +## See also + +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/apps/list.mdx b/src/pages/docs/cli/apps/list.mdx new file mode 100644 index 0000000000..b93058435c --- /dev/null +++ b/src/pages/docs/cli/apps/list.mdx @@ -0,0 +1,52 @@ +--- +title: "ably apps list" +meta_description: "List all Ably applications in the current account using the CLI." +meta_keywords: "ably cli, cli, apps, list, applications, ably apps list" +--- + + +```shell +ably apps list [flags] +``` + + +Use the `ably apps list` command to list all applications in the current account. + +## Flags + +You can optionally pass the following flags to the `ably apps list` command: + +### `--limit` + +The maximum number of results to return. Defaults to `100`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +List all apps in the current account: + + +```shell +ably apps list +``` + + +List apps in JSON format: + + +```shell +ably apps list --json +``` + + +## See also + +* [Apps](/docs/cli/apps) — Explore all `ably apps` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/apps/rules/create.mdx b/src/pages/docs/cli/apps/rules/create.mdx new file mode 100644 index 0000000000..f8b1b42b0e --- /dev/null +++ b/src/pages/docs/cli/apps/rules/create.mdx @@ -0,0 +1,112 @@ +--- +title: "ably apps rules create" +meta_description: "Create a channel rule for an Ably application using the CLI." +meta_keywords: "ably cli, cli, apps, rules, create, channel rule, namespace, ably apps rules create" +--- + + +```shell +ably apps rules create --name [flags] +``` + + +Use the `ably apps rules create` command to create a new channel rule for an Ably application. Channel rules define behavior for channels matching a specific namespace. + +## Flags + +You can pass the following flags to the `ably apps rules create` command: + +### `--app` + +The app ID to create the rule for. Uses the currently selected app if not specified. + +### `--name` + +The name of the channel rule to create. This flag is required. The name defines the namespace that matching channels belong to. + +### `--persisted` + +Enable message persistence for matching channels. Defaults to `false`. + +### `--push-enabled` + +Enable push notifications for matching channels. Defaults to `false`. + +### `--authenticated` + +Require authentication for operations on matching channels. + +### `--tls-only` + +Restrict matching channels to TLS connections only. + +### `--persist-last` + +Persist only the last message on matching channels. + +### `--populate-channel-registry` + +Populate the channel registry for matching channels, enabling channel enumeration. + +### `--mutable-messages` + +Enable message update and delete functionality on matching channels. Enabling this flag automatically enables message persistence. + +### `--batching-enabled` + +Enable message batching for matching channels. + +### `--batching-interval` + +The batching interval in milliseconds for matching channels. Only applicable when `--batching-enabled` is set. + +### `--conflation-enabled` + +Enable message conflation for matching channels. + +### `--conflation-interval` + +The conflation interval in milliseconds for matching channels. Only applicable when `--conflation-enabled` is set. + +### `--conflation-key` + +The conflation key for matching channels. Only applicable when `--conflation-enabled` is set. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Create a channel rule with message persistence enabled: + + +```shell +ably apps rules create --name "chat" --persisted +``` + + +Create a channel rule with mutable messages enabled: + + +```shell +ably apps rules create --name "updates" --mutable-messages +``` + + +Create a channel rule with push notifications enabled: + + +```shell +ably apps rules create --name "alerts" --push-enabled +``` + + +## See also + +* [Apps rules](/docs/cli/apps/rules) — Explore all `ably apps rules` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/apps/rules/delete.mdx b/src/pages/docs/cli/apps/rules/delete.mdx new file mode 100644 index 0000000000..567ff619b6 --- /dev/null +++ b/src/pages/docs/cli/apps/rules/delete.mdx @@ -0,0 +1,64 @@ +--- +title: "ably apps rules delete" +meta_description: "Delete a channel rule from an Ably application using the CLI." +meta_keywords: "ably cli, cli, apps, rules, delete, remove, channel rule, ably apps rules delete" +--- + + +```shell +ably apps rules delete [flags] +``` + + +Use the `ably apps rules delete` command to delete a channel rule from an Ably application. + +## Arguments + +Pass the following arguments to the `ably apps rules delete` command: + +### `` + +The name or ID of the channel rule to delete. This argument is required. + +## Flags + +You can optionally pass the following flags to the `ably apps rules delete` command: + +### `--app` + +The app ID to delete the rule from. Uses the currently selected app if not specified. + +### `--force | -f` + +Skip the confirmation prompt and delete the rule immediately. Required when using `--json`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Delete a channel rule by name: + + +```shell +ably apps rules delete "chat" +``` + + +Delete a channel rule without a confirmation prompt: + + +```shell +ably apps rules delete "chat" --force +``` + + +## See also + +* [Apps rules](/docs/cli/apps/rules) — Explore all `ably apps rules` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/apps/rules/index.mdx b/src/pages/docs/cli/apps/rules/index.mdx new file mode 100644 index 0000000000..cc2b9656d4 --- /dev/null +++ b/src/pages/docs/cli/apps/rules/index.mdx @@ -0,0 +1,21 @@ +--- +title: "ably apps rules" +meta_description: "Manage channel rules for Ably applications using the CLI." +meta_keywords: "ably cli, cli, apps, rules, namespaces, channel rules, ably apps rules" +--- + +Use the `ably apps rules` command group to manage channel rules (namespaces) for your Ably applications. Channel rules enable you to configure behavior for channels matching a specific namespace. + +## Subcommands + +| Command | Description | +| ------- | ----------- | +| [`ably apps rules create`](/docs/cli/apps/rules/create) | Create a channel rule for an app. | +| [`ably apps rules delete`](/docs/cli/apps/rules/delete) | Delete a channel rule from an app. | +| [`ably apps rules list`](/docs/cli/apps/rules/list) | List channel rules for an app. | +| [`ably apps rules update`](/docs/cli/apps/rules/update) | Update a channel rule for an app. | + +## See also + +* [Apps](/docs/cli/apps) — Explore all `ably apps` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/apps/rules/list.mdx b/src/pages/docs/cli/apps/rules/list.mdx new file mode 100644 index 0000000000..f495f82327 --- /dev/null +++ b/src/pages/docs/cli/apps/rules/list.mdx @@ -0,0 +1,56 @@ +--- +title: "ably apps rules list" +meta_description: "List channel rules for an Ably application using the CLI." +meta_keywords: "ably cli, cli, apps, rules, list, channel rules, namespaces, ably apps rules list" +--- + + +```shell +ably apps rules list [flags] +``` + + +Use the `ably apps rules list` command to list all channel rules configured for an Ably application. + +## Flags + +You can optionally pass the following flags to the `ably apps rules list` command: + +### `--app` + +The app ID to list rules for. Uses the currently selected app if not specified. + +### `--limit` + +The maximum number of results to return. Defaults to `100`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +List all channel rules for the current app: + + +```shell +ably apps rules list +``` + + +List channel rules for a specific app: + + +```shell +ably apps rules list --app aBcDe1 +``` + + +## See also + +* [Apps rules](/docs/cli/apps/rules) — Explore all `ably apps rules` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/apps/rules/update.mdx b/src/pages/docs/cli/apps/rules/update.mdx new file mode 100644 index 0000000000..003377fa67 --- /dev/null +++ b/src/pages/docs/cli/apps/rules/update.mdx @@ -0,0 +1,120 @@ +--- +title: "ably apps rules update" +meta_description: "Update a channel rule for an Ably application using the CLI." +meta_keywords: "ably cli, cli, apps, rules, update, modify, channel rule, ably apps rules update" +--- + + +```shell +ably apps rules update [flags] +``` + + +Use the `ably apps rules update` command to update an existing channel rule for an Ably application. + +## Arguments + +Pass the following arguments to the `ably apps rules update` command: + +### `` + +The name or ID of the channel rule to update. This argument is required. + +## Flags + +You can optionally pass the following flags to the `ably apps rules update` command: + + + +### `--app` + +The app ID that owns the rule to update. Uses the currently selected app if not specified. + +### `--persisted` + +Enable message persistence for matching channels. + +### `--push-enabled` + +Enable push notifications for matching channels. + +### `--authenticated` + +Require authentication for operations on matching channels. + +### `--tls-only` + +Restrict matching channels to TLS connections only. + +### `--persist-last` + +Persist only the last message on matching channels. + +### `--populate-channel-registry` + +Populate the channel registry for matching channels, enabling channel enumeration. + +### `--mutable-messages` + +Enable message update and delete functionality on matching channels. Enabling this flag automatically enables message persistence. + +### `--batching-enabled` + +Enable message batching for matching channels. + +### `--batching-interval` + +The batching interval in milliseconds for matching channels. Only applicable when `--batching-enabled` is set. + +### `--conflation-enabled` + +Enable message conflation for matching channels. + +### `--conflation-interval` + +The conflation interval in milliseconds for matching channels. Only applicable when `--conflation-enabled` is set. + +### `--conflation-key` + +The conflation key for matching channels. Only applicable when `--conflation-enabled` is set. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Enable message persistence on a channel rule: + + +```shell +ably apps rules update "chat" --persisted +``` + + +Disable push notifications on a channel rule: + + +```shell +ably apps rules update "alerts" --no-push-enabled +``` + + +Update a channel rule and output the result as JSON: + + +```shell +ably apps rules update "chat" --persisted --json +``` + + +## See also + +* [Apps rules](/docs/cli/apps/rules) — Explore all `ably apps rules` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/apps/switch.mdx b/src/pages/docs/cli/apps/switch.mdx new file mode 100644 index 0000000000..c4d59a4b72 --- /dev/null +++ b/src/pages/docs/cli/apps/switch.mdx @@ -0,0 +1,52 @@ +--- +title: "ably apps switch" +meta_description: "Switch to a different Ably application using the CLI." +meta_keywords: "ably cli, cli, apps, switch, change app, ably apps switch" +--- + + +```shell +ably apps switch [id] +``` + + +Use the `ably apps switch` command to switch to a different Ably application. The selected app is used as the default for subsequent commands. + +## Arguments + +Pass the following arguments to the `ably apps switch` command: + +### `[id]` + +The ID of the application to switch to. If not specified, the CLI will display an interactive prompt to select an app. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Switch to an app using the interactive prompt: + + +```shell +ably apps switch +``` + + +Switch to a specific app by ID: + + +```shell +ably apps switch aBcDe1 +``` + + +## See also + +* [Apps](/docs/cli/apps) — Explore all `ably apps` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/apps/update.mdx b/src/pages/docs/cli/apps/update.mdx new file mode 100644 index 0000000000..6250f94bbe --- /dev/null +++ b/src/pages/docs/cli/apps/update.mdx @@ -0,0 +1,64 @@ +--- +title: "ably apps update" +meta_description: "Update an Ably application's configuration using the CLI." +meta_keywords: "ably cli, cli, apps, update, modify application, ably apps update" +--- + + +```shell +ably apps update [flags] +``` + + +Use the `ably apps update` command to update the configuration of an existing Ably application. + +## Arguments + +Pass the following arguments to the `ably apps update` command: + +### `` + +The ID of the application to update. This argument is required. + +## Flags + +You can optionally pass the following flags to the `ably apps update` command: + +### `--name` + +The new name for the application. + +### `--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) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Update an application's name: + + +```shell +ably apps update aBcDe1 --name "new-app-name" +``` + + +Restrict an application to TLS connections only: + + +```shell +ably apps update aBcDe1 --tls-only +``` + + +## See also + +* [Apps](/docs/cli/apps) — Explore all `ably apps` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/auth/index.mdx b/src/pages/docs/cli/auth/index.mdx new file mode 100644 index 0000000000..f1e7bdcca2 --- /dev/null +++ b/src/pages/docs/cli/auth/index.mdx @@ -0,0 +1,32 @@ +--- +title: "ably auth" +meta_description: "Manage authentication, API keys, and tokens using the CLI." +meta_keywords: "ably cli, cli, auth, authentication, api keys, tokens, ably auth" +--- + +Use the `ably auth` command group to manage authentication, API keys, and tokens. These commands enable you to issue and revoke tokens, and manage API keys for your apps. + +## Token management commands + +| Command | Description | +| ------- | ----------- | +| [`ably auth issue-ably-token`](/docs/cli/auth/issue-ably-token) | Create an Ably Token with specified capabilities. | +| [`ably auth issue-jwt-token`](/docs/cli/auth/issue-jwt-token) | Create an Ably JWT token with specified capabilities. | +| [`ably auth revoke-token`](/docs/cli/auth/revoke-token) | Revoke an Ably token. | + +## Key management commands + +| Command | Description | +| ------- | ----------- | +| [`ably auth keys`](/docs/cli/auth/keys) | Manage API keys for Ably apps. | +| [`ably auth keys create`](/docs/cli/auth/keys/create) | Create a new API key for an app. | +| [`ably auth keys current`](/docs/cli/auth/keys/current) | Show the current API key for the selected app. | +| [`ably auth keys get`](/docs/cli/auth/keys/get) | Get details for a specific API key. | +| [`ably auth keys list`](/docs/cli/auth/keys/list) | List all API keys for an app. | +| [`ably auth keys revoke`](/docs/cli/auth/keys/revoke) | Permanently revoke an API key. | +| [`ably auth keys switch`](/docs/cli/auth/keys/switch) | Switch to a different API key for the current app. | +| [`ably auth keys update`](/docs/cli/auth/keys/update) | Update an API key's properties. | + +## See also + +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/auth/issue-ably-token.mdx b/src/pages/docs/cli/auth/issue-ably-token.mdx new file mode 100644 index 0000000000..ebe727c62c --- /dev/null +++ b/src/pages/docs/cli/auth/issue-ably-token.mdx @@ -0,0 +1,94 @@ +--- +title: "ably auth issue-ably-token" +meta_description: "Create an Ably Token with specified capabilities using the CLI." +meta_keywords: "ably cli, cli, auth, token, issue token, ably token, ably auth issue-ably-token" +--- + +Use the `ably auth issue-ably-token` command to create an Ably Token with specified capabilities. + +## Synopsis + + +```shell +ably auth issue-ably-token [flags] +``` + + +## Flags + +You can optionally pass the following flags to the `ably auth issue-ably-token` command: + +### `--app` + +The app ID to issue the token for. Uses the currently selected app if not specified. + +### `--capability` + +A JSON string specifying the [capabilities](/docs/auth/capabilities) for the token. Defaults to `'{"*":["*"]}'`. + +### `--client-id` + +The client ID to associate with the token. Use `"none"` to issue a token with no client ID. + +### `--ttl` + +The time to live for the token in seconds. Defaults to `3600`. + +### `--token-only` + +Output only the token string, without any additional information. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Issue a default Ably Token: + + +```shell +ably auth issue-ably-token +``` + + +Issue a token with specific capabilities: + + +```shell +ably auth issue-ably-token --capability '{"my-channel":["publish","subscribe"]}' +``` + + +Issue a token with a specific client ID: + + +```shell +ably auth issue-ably-token --client-id "user-123" +``` + + +Output only the token string for scripting: + + +```shell +ably auth issue-ably-token --token-only +``` + + +Pipe the token to another command: + + +```shell +ably auth issue-ably-token --token-only | pbcopy +``` + + +## See also + +* [Auth](/docs/cli/auth) — Explore all `ably auth` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/auth/issue-jwt-token.mdx b/src/pages/docs/cli/auth/issue-jwt-token.mdx new file mode 100644 index 0000000000..d6db76b1ed --- /dev/null +++ b/src/pages/docs/cli/auth/issue-jwt-token.mdx @@ -0,0 +1,78 @@ +--- +title: "ably auth issue-jwt-token" +meta_description: "Create an Ably JWT token with specified capabilities using the CLI." +meta_keywords: "ably cli, cli, auth, jwt, jwt token, issue jwt token, ably auth issue-jwt-token" +--- + +Use the `ably auth issue-jwt-token` command to create an Ably JWT token with specified capabilities. + +## Synopsis + + +```shell +ably auth issue-jwt-token [flags] +``` + + +## Flags + +You can optionally pass the following flags to the `ably auth issue-jwt-token` command: + +### `--app` + +The app ID to issue the token for. Uses the currently selected app if not specified. + +### `--capability` + +A JSON string specifying the [capabilities](/docs/auth/capabilities) for the token. Defaults to `'{"*":["*"]}'`. + +### `--client-id` + +The client ID to associate with the token. Use `"none"` to issue a token with no client ID. + +### `--ttl` + +The time to live for the token in seconds. Defaults to `3600`. + +### `--token-only` + +Output only the token string, without any additional information. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Issue a default Ably JWT token: + + +```shell +ably auth issue-jwt-token +``` + + +Issue a JWT token with specific capabilities: + + +```shell +ably auth issue-jwt-token --capability '{"my-channel":["publish","subscribe"]}' +``` + + +Output only the token string: + + +```shell +ably auth issue-jwt-token --token-only +``` + + +## See also + +* [Auth](/docs/cli/auth) — Explore all `ably auth` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/auth/keys/create.mdx b/src/pages/docs/cli/auth/keys/create.mdx new file mode 100644 index 0000000000..9b0b7d6ac4 --- /dev/null +++ b/src/pages/docs/cli/auth/keys/create.mdx @@ -0,0 +1,62 @@ +--- +title: "ably auth keys create" +meta_description: "Create a new API key for an Ably app using the CLI." +meta_keywords: "ably cli, cli, auth, keys, create key, api key, ably auth keys create" +--- + +Use the `ably auth keys create` command to create a new API key for an app. + +## Synopsis + + +```shell +ably auth keys create --name [flags] +``` + + +## Flags + +You can optionally pass the following flags to the `ably auth keys create` command: + +### `--app` + +The app ID to create the key for. Uses the currently selected app if not specified. + +### `--name` + +Required. The name for the new API key. + +### `--capabilities` + +A JSON string specifying the [capabilities](/docs/auth/capabilities) for the key. Defaults to `'{"*":["*"]}'`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Create a basic API key: + + +```shell +ably auth keys create --name "My API Key" +``` + + +Create a key with specific capabilities: + + +```shell +ably auth keys create --name "Publish Only" --capabilities '{"my-channel":["publish"]}' +``` + + +## See also + +* [Auth keys](/docs/cli/auth/keys) — Explore all `ably auth keys` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/auth/keys/current.mdx b/src/pages/docs/cli/auth/keys/current.mdx new file mode 100644 index 0000000000..9765818b87 --- /dev/null +++ b/src/pages/docs/cli/auth/keys/current.mdx @@ -0,0 +1,54 @@ +--- +title: "ably auth keys current" +meta_description: "Show the current API key for the selected Ably app using the CLI." +meta_keywords: "ably cli, cli, auth, keys, current key, api key, ably auth keys current" +--- + +Use the `ably auth keys current` command to show the current API key for the selected app. + +## Synopsis + + +```shell +ably auth keys current [flags] +``` + + +## Flags + +You can optionally pass the following flags to the `ably auth keys current` command: + +### `--app` + +The app ID to show the current key for. Uses the currently selected app if not specified. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Show the current API key: + + +```shell +ably auth keys current +``` + + +Show the current key for a specific app: + + +```shell +ably auth keys current --app "aBcDeF" +``` + + +## See also + +* [Auth keys](/docs/cli/auth/keys) — Explore all `ably auth keys` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/auth/keys/get.mdx b/src/pages/docs/cli/auth/keys/get.mdx new file mode 100644 index 0000000000..caf9b5ce5b --- /dev/null +++ b/src/pages/docs/cli/auth/keys/get.mdx @@ -0,0 +1,62 @@ +--- +title: "ably auth keys get" +meta_description: "Get details for a specific API key using the CLI." +meta_keywords: "ably cli, cli, auth, keys, get key, api key details, ably auth keys get" +--- + +Use the `ably auth keys get` command to get details for a specific API key. + +## Synopsis + + +```shell +ably auth keys get [flags] +``` + + +## Arguments + +Pass the following arguments to the `ably auth keys get` command: + +### `key-name-or-value` + +The identifier for the API key to retrieve. This can be a key name (`APP_ID.KEY_ID`), a key ID, a key label, or the full key value. + +## Flags + +You can optionally pass the following flags to the `ably auth keys get` command: + +### `--app` + +The app ID the key belongs to. Uses the currently selected app if not specified. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Get a key by its key name: + + +```shell +ably auth keys get "aBcDeF.gHiJkL" +``` + + +Get a key by its label: + + +```shell +ably auth keys get "My API Key" +``` + + +## See also + +* [Auth keys](/docs/cli/auth/keys) — Explore all `ably auth keys` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/auth/keys/index.mdx b/src/pages/docs/cli/auth/keys/index.mdx new file mode 100644 index 0000000000..f38b67abba --- /dev/null +++ b/src/pages/docs/cli/auth/keys/index.mdx @@ -0,0 +1,24 @@ +--- +title: "ably auth keys" +meta_description: "Manage API keys for Ably apps using the CLI." +meta_keywords: "ably cli, cli, auth, keys, api keys, key management, ably auth keys" +--- + +Use the `ably auth keys` command group to manage API keys for Ably apps. These commands enable you to create, list, update, revoke, and switch between API keys. + +## Subcommands + +| Command | Description | +| ------- | ----------- | +| [`ably auth keys create`](/docs/cli/auth/keys/create) | Create a new API key for an app. | +| [`ably auth keys current`](/docs/cli/auth/keys/current) | Show the current API key for the selected app. | +| [`ably auth keys get`](/docs/cli/auth/keys/get) | Get details for a specific API key. | +| [`ably auth keys list`](/docs/cli/auth/keys/list) | List all API keys for an app. | +| [`ably auth keys revoke`](/docs/cli/auth/keys/revoke) | Permanently revoke an API key. | +| [`ably auth keys switch`](/docs/cli/auth/keys/switch) | Switch to a different API key for the current app. | +| [`ably auth keys update`](/docs/cli/auth/keys/update) | Update an API key's properties. | + +## See also + +* [Auth](/docs/cli/auth) — Explore all `ably auth` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/auth/keys/list.mdx b/src/pages/docs/cli/auth/keys/list.mdx new file mode 100644 index 0000000000..f5a304727d --- /dev/null +++ b/src/pages/docs/cli/auth/keys/list.mdx @@ -0,0 +1,58 @@ +--- +title: "ably auth keys list" +meta_description: "List all API keys for an Ably app using the CLI." +meta_keywords: "ably cli, cli, auth, keys, list keys, api keys, ably auth keys list" +--- + +Use the `ably auth keys list` command to list all API keys for an app. + +## Synopsis + + +```shell +ably auth keys list [flags] +``` + + +## Flags + +You can optionally pass the following flags to the `ably auth keys list` command: + +### `--app` + +The app ID to list keys for. Uses the currently selected app if not specified. + +### `--limit` + +The maximum number of keys to return. Defaults to `100`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +List all API keys for the current app: + + +```shell +ably auth keys list +``` + + +List keys for a specific app: + + +```shell +ably auth keys list --app "aBcDeF" +``` + + +## See also + +* [Auth keys](/docs/cli/auth/keys) — Explore all `ably auth keys` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/auth/keys/revoke.mdx b/src/pages/docs/cli/auth/keys/revoke.mdx new file mode 100644 index 0000000000..c2377748e0 --- /dev/null +++ b/src/pages/docs/cli/auth/keys/revoke.mdx @@ -0,0 +1,66 @@ +--- +title: "ably auth keys revoke" +meta_description: "Permanently revoke an API key using the CLI." +meta_keywords: "ably cli, cli, auth, keys, revoke key, api key revocation, ably auth keys revoke" +--- + +Use the `ably auth keys revoke` command to permanently revoke an API key. + +## Synopsis + + +```shell +ably auth keys revoke [flags] +``` + + +## Arguments + +Pass the following arguments to the `ably auth keys revoke` command: + +### `key-name` + +The key name (`APP_ID.KEY_ID`) of the API key to revoke. + +## Flags + +You can optionally pass the following flags to the `ably auth keys revoke` command: + +### `--app` + +The app ID the key belongs to. Uses the currently selected app if not specified. + +### `--force` + +Skip the confirmation prompt and revoke the key immediately. Required when using `--json`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Revoke an API key: + + +```shell +ably auth keys revoke "aBcDeF.gHiJkL" +``` + + +Force revoke without confirmation: + + +```shell +ably auth keys revoke "aBcDeF.gHiJkL" --force +``` + + +## See also + +* [Auth keys](/docs/cli/auth/keys) — Explore all `ably auth keys` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/auth/keys/switch.mdx b/src/pages/docs/cli/auth/keys/switch.mdx new file mode 100644 index 0000000000..36019ebb60 --- /dev/null +++ b/src/pages/docs/cli/auth/keys/switch.mdx @@ -0,0 +1,60 @@ +--- +title: "ably auth keys switch" +meta_description: "Switch to a different API key for the current Ably app using the CLI." +meta_keywords: "ably cli, cli, auth, keys, switch key, api key, ably auth keys switch" +--- + +Use the `ably auth keys switch` command to switch to a different API key for the current app. If no key identifier is provided, the CLI presents an interactive list of available keys. + +## Synopsis + + +```shell +ably auth keys switch [key-name-or-value] [flags] +``` + + +## Arguments + +### `key-name-or-value` + +An optional identifier for the API key to switch to. This can be a key name (`APP_ID.KEY_ID`), a key ID, a key label, or the full key value. If not provided, the CLI displays an interactive prompt to select from available keys. + +## Flags + +You can optionally pass the following flags to the `ably auth keys switch` command: + +### `--app` + +The app ID to switch keys for. Uses the currently selected app if not specified. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Switch keys interactively: + + +```shell +ably auth keys switch +``` + + +Switch to a specific key: + + +```shell +ably auth keys switch "aBcDeF.gHiJkL" +``` + + +## See also + +* [Auth keys](/docs/cli/auth/keys) — Explore all `ably auth keys` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/auth/keys/update.mdx b/src/pages/docs/cli/auth/keys/update.mdx new file mode 100644 index 0000000000..266bb51d22 --- /dev/null +++ b/src/pages/docs/cli/auth/keys/update.mdx @@ -0,0 +1,70 @@ +--- +title: "ably auth keys update" +meta_description: "Update an API key's properties using the CLI." +meta_keywords: "ably cli, cli, auth, keys, update key, api key, ably auth keys update" +--- + +Use the `ably auth keys update` command to update an API key's properties. + +## Synopsis + + +```shell +ably auth keys update [flags] +``` + + +## Arguments + +Pass the following arguments to the `ably auth keys update` command: + +### `key-name` + +The key name (`APP_ID.KEY_ID`) of the API key to update. + +## Flags + +You can optionally pass the following flags to the `ably auth keys update` command: + +### `--app` + +The app ID the key belongs to. Uses the currently selected app if not specified. + +### `--name` + +The new name for the API key. + +### `--capabilities` + +A comma-separated list of new [capabilities](/docs/auth/capabilities) for the key, for example: `publish,subscribe`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Rename an API key: + + +```shell +ably auth keys update "aBcDeF.gHiJkL" --name "Production Key" +``` + + +Update the capabilities for a key: + + +```shell +ably auth keys update "aBcDeF.gHiJkL" --capabilities "publish,subscribe" +``` + + +## See also + +* [Auth keys](/docs/cli/auth/keys) — Explore all `ably auth keys` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/auth/revoke-token.mdx b/src/pages/docs/cli/auth/revoke-token.mdx new file mode 100644 index 0000000000..45ee0d386c --- /dev/null +++ b/src/pages/docs/cli/auth/revoke-token.mdx @@ -0,0 +1,66 @@ +--- +title: "ably auth revoke-token" +meta_description: "Revoke an Ably token using the CLI." +meta_keywords: "ably cli, cli, auth, revoke token, token revocation, ably auth revoke-token" +--- + +Use the `ably auth revoke-token` command to revoke an Ably token. + +## Synopsis + + +```shell +ably auth revoke-token [flags] +``` + + +## Arguments + +Pass the following arguments to the `ably auth revoke-token` command: + +### `token` + +The token to revoke. + +## Flags + +You can optionally pass the following flags to the `ably auth revoke-token` command: + +### `--app` + +The app ID the token belongs to. Uses the currently selected app if not specified. + +### `--client-id | -c` + +The client ID to revoke tokens for. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Revoke a specific token: + + +```shell +ably auth revoke-token "xVLyHw.DRE6hQ..." +``` + + +Revoke tokens for a specific client ID: + + +```shell +ably auth revoke-token "xVLyHw.DRE6hQ..." --client-id "user-123" +``` + + +## See also + +* [Auth](/docs/cli/auth) — Explore all `ably auth` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/autocomplete.mdx b/src/pages/docs/cli/autocomplete.mdx new file mode 100644 index 0000000000..d0b7dcb6db --- /dev/null +++ b/src/pages/docs/cli/autocomplete.mdx @@ -0,0 +1,75 @@ +--- +title: "ably autocomplete" +meta_description: "Display autocomplete installation instructions for the Ably CLI." +meta_keywords: "ably cli, cli, autocomplete, shell completion, bash, zsh, powershell" +--- + + +```shell +ably autocomplete [SHELL] +``` + + +Use the `ably autocomplete` command to display installation instructions for shell autocompletion. Once configured, autocomplete enables tab completion for commands and flags in your terminal. + +## Arguments + +Pass the following arguments to the `ably autocomplete` command: + +### `[SHELL]` + +The shell type to set up autocomplete for. Supported values: `zsh`, `bash`, `powershell`. + +If no shell is specified, the default shell is used. + +## Flags + +### `--refresh-cache | -r` + +Refresh the autocomplete cache, ignoring displaying instructions. + +## Examples + +Display autocomplete setup instructions for the default shell: + + +```shell +ably autocomplete +``` + + +Set up autocomplete for bash: + + +```shell +ably autocomplete bash +``` + + +Set up autocomplete for zsh: + + +```shell +ably autocomplete zsh +``` + + +Set up autocomplete for powershell: + + +```shell +ably autocomplete powershell +``` + + +Refresh the autocomplete cache: + + +```shell +ably autocomplete --refresh-cache +``` + + +## See also + +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/bench/index.mdx b/src/pages/docs/cli/bench/index.mdx new file mode 100644 index 0000000000..73407927cb --- /dev/null +++ b/src/pages/docs/cli/bench/index.mdx @@ -0,0 +1,18 @@ +--- +title: "ably bench" +meta_description: "Performance benchmarking commands." +meta_keywords: "ably cli, cli, bench, benchmark, performance, ably bench" +--- + +Use the `ably bench` command group to run performance benchmarking tests. These commands enable you to measure publishing and subscribing throughput on Ably channels. + +## Subcommands + +| Command | Description | +| ------- | ----------- | +| [`ably bench publisher`](/docs/cli/bench/publisher) | Run a publisher benchmark test. | +| [`ably bench subscriber`](/docs/cli/bench/subscriber) | Run a subscriber benchmark test. | + +## See also + +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/bench/publisher.mdx b/src/pages/docs/cli/bench/publisher.mdx new file mode 100644 index 0000000000..2dc65ca164 --- /dev/null +++ b/src/pages/docs/cli/bench/publisher.mdx @@ -0,0 +1,88 @@ +--- +title: "ably bench publisher" +meta_description: "Run a publisher benchmark test using the Ably CLI." +meta_keywords: "ably cli, cli, bench, publisher, benchmark, performance, ably bench publisher" +--- + + +```shell +ably bench publisher [flags] +``` + + +Use the `ably bench publisher` command to run a publisher benchmark test on an Ably channel. + +## Arguments + +Pass the following arguments to the `ably bench publisher` command: + +### `` + +The name of the channel to publish messages to. This argument is required. + +## Flags + +You can optionally pass the following flags to the `ably bench publisher` command: + +### `--message-size` + +The size of each message in bytes. The default value is `100`. + +### `--messages | -m` + +The number of messages to publish. The default value is `1000`. The maximum value is `10000`. + +### `--rate | -r` + +The rate of messages per second. The default value is `15`. The maximum value is `20`. + +### `--transport | -t` + +The transport protocol to use for publishing. Valid options are `rest` or `realtime`. The default value is `realtime`. + +### `--wait-for-subscribers` + +Wait for subscribers to connect before publishing. The default value is `false`. + +### `--client-id` + +The client ID to use for the benchmark. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Run a basic publisher benchmark: + + +```shell +ably bench publisher my-channel +``` + + +Run a benchmark with custom message count and rate: + + +```shell +ably bench publisher my-channel --messages 5000 --rate 20 +``` + + +Run a benchmark using the REST transport: + + +```shell +ably bench publisher my-channel --transport rest +``` + + +## See also + +* [Bench](/docs/cli/bench) — Explore all `ably bench` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/bench/subscriber.mdx b/src/pages/docs/cli/bench/subscriber.mdx new file mode 100644 index 0000000000..c2cd245a10 --- /dev/null +++ b/src/pages/docs/cli/bench/subscriber.mdx @@ -0,0 +1,56 @@ +--- +title: "ably bench subscriber" +meta_description: "Run a subscriber benchmark test using the Ably CLI." +meta_keywords: "ably cli, cli, bench, subscriber, benchmark, performance, ably bench subscriber" +--- + + +```shell +ably bench subscriber [flags] +``` + + +Use the `ably bench subscriber` command to run a subscriber benchmark test on an Ably channel. + +## Arguments + +Pass the following arguments to the `ably bench subscriber` command: + +### `` + +The name of the channel to subscribe to. This argument is required. + +## Flags + +You can optionally pass the following flags to the `ably bench subscriber` command: + +### `--duration | -D` + +The duration of the subscriber benchmark in seconds. + +### `--client-id` + +The client ID to use for the benchmark. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Run a basic subscriber benchmark: + + +```shell +ably bench subscriber my-channel +``` + + +## See also + +* [Bench](/docs/cli/bench) — Explore all `ably bench` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/channels/annotations/delete.mdx b/src/pages/docs/cli/channels/annotations/delete.mdx new file mode 100644 index 0000000000..b10ebe1d2c --- /dev/null +++ b/src/pages/docs/cli/channels/annotations/delete.mdx @@ -0,0 +1,72 @@ +--- +title: "ably channels annotations delete" +meta_description: "Delete an annotation from an Ably Pub/Sub channel message using the CLI." +meta_keywords: "ably cli, cli, channels, annotations, delete, reactions, ably channels annotations delete" +--- + + +```shell +ably channels annotations delete [flags] +``` + + +Use the `ably channels annotations delete` command to delete an annotation from a channel message. + +## Arguments + +Pass the following arguments to the `ably channels annotations delete` command: + +### `` + +The name of the channel containing the message. + +### `` + +The serial of the message to delete the annotation from. + +### `` + +The annotation type to delete. + +## Flags + +You can optionally pass the following flags to the `ably channels annotations delete` command: + +### `--name | -n` + +The annotation name to delete. Use this to target a specific annotation when multiple annotations of the same type exist. + +### `--client-id` + +A client ID to use when deleting the annotation. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Delete a receipt annotation: + + +```shell +ably channels annotations delete my-channel "01a2b3c4d5@1234567890000-0" "receipts:unique.v1" +``` + + +Delete a reaction by name: + + +```shell +ably channels annotations delete my-channel "01a2b3c4d5@1234567890000-0" "reactions:unique.v1" --name thumbsup +``` + + +## See also + +* [Channels annotations](/docs/cli/channels/annotations) — Explore all `ably channels annotations` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/channels/annotations/get.mdx b/src/pages/docs/cli/channels/annotations/get.mdx new file mode 100644 index 0000000000..7a09032706 --- /dev/null +++ b/src/pages/docs/cli/channels/annotations/get.mdx @@ -0,0 +1,64 @@ +--- +title: "ably channels annotations get" +meta_description: "Get annotations for an Ably Pub/Sub channel message using the CLI." +meta_keywords: "ably cli, cli, channels, annotations, get, reactions, ably channels annotations get" +--- + + +```shell +ably channels annotations get [flags] +``` + + +Use the `ably channels annotations get` command to get annotations for a channel message. + +## Arguments + +Pass the following arguments to the `ably channels annotations get` command: + +### `` + +The name of the channel containing the message. + +### `` + +The serial of the message to get annotations for. + +## Flags + +You can optionally pass the following flags to the `ably channels annotations get` command: + +### `--limit` + +The maximum number of annotations to return. Defaults to `100`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Get annotations for a message: + + +```shell +ably channels annotations get my-channel "01a2b3c4d5@1234567890000-0" +``` + + +Get annotations with a limit: + + +```shell +ably channels annotations get my-channel "01a2b3c4d5@1234567890000-0" --limit 10 +``` + + +## See also + +* [Channels annotations](/docs/cli/channels/annotations) — Explore all `ably channels annotations` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/channels/annotations/index.mdx b/src/pages/docs/cli/channels/annotations/index.mdx new file mode 100644 index 0000000000..c052db3725 --- /dev/null +++ b/src/pages/docs/cli/channels/annotations/index.mdx @@ -0,0 +1,21 @@ +--- +title: "ably channels annotations" +meta_description: "Manage annotations on Ably Pub/Sub channel messages using the CLI." +meta_keywords: "ably cli, cli, channels, annotations, reactions, metrics, ably channels annotations" +--- + +Use the `ably channels annotations` command group to manage annotations on Ably Pub/Sub channel messages. These commands enable you to publish, subscribe to, get, and delete annotations. + +## Subcommands + +| Command | Description | +| ------- | ----------- | +| [`ably channels annotations publish`](/docs/cli/channels/annotations/publish) | Publish an annotation on a channel message. | +| [`ably channels annotations subscribe`](/docs/cli/channels/annotations/subscribe) | Subscribe to annotations on a channel. | +| [`ably channels annotations get`](/docs/cli/channels/annotations/get) | Get annotations for a channel message. | +| [`ably channels annotations delete`](/docs/cli/channels/annotations/delete) | Delete an annotation from a channel message. | + +## See also + +* [Channels](/docs/cli/channels) — Explore all `ably channels` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/channels/annotations/publish.mdx b/src/pages/docs/cli/channels/annotations/publish.mdx new file mode 100644 index 0000000000..1e04b14698 --- /dev/null +++ b/src/pages/docs/cli/channels/annotations/publish.mdx @@ -0,0 +1,92 @@ +--- +title: "ably channels annotations publish" +meta_description: "Publish an annotation on an Ably Pub/Sub channel message using the CLI." +meta_keywords: "ably cli, cli, channels, annotations, publish, reactions, ably channels annotations publish" +--- + + +```shell +ably channels annotations publish [flags] +``` + + +Use the `ably channels annotations publish` command to publish an annotation on a channel message. + +## Arguments + +Pass the following arguments to the `ably channels annotations publish` command: + +### `` + +The name of the channel containing the message. + +### `` + +The serial of the message to annotate. + +### `` + +The annotation type. For example, `reactions:unique.v1` or `metrics:total.v1`. + +## Flags + +You can optionally pass the following flags to the `ably channels annotations publish` command: + +### `--name | -n` + +The annotation name. For example, an emoji name such as `thumbsup`. + +### `--count` + +The count value for the annotation. Used with `multiple.v1` type annotations. + +### `--data` + +A JSON payload to include with the annotation. + +### `--encoding | -e` + +The encoding of the annotation data. + +### `--client-id` + +A client ID to use when publishing the annotation. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Publish a simple annotation: + + +```shell +ably channels annotations publish my-channel "01a2b3c4d5@1234567890000-0" "reactions:unique.v1" +``` + + +Publish a reaction with a name: + + +```shell +ably channels annotations publish my-channel "01a2b3c4d5@1234567890000-0" "reactions:unique.v1" --name thumbsup +``` + + +Publish an annotation with a count: + + +```shell +ably channels annotations publish my-channel "01a2b3c4d5@1234567890000-0" "metrics:multiple.v1" --name views --count 5 +``` + + +## See also + +* [Channels annotations](/docs/cli/channels/annotations) — Explore all `ably channels annotations` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/channels/annotations/subscribe.mdx b/src/pages/docs/cli/channels/annotations/subscribe.mdx new file mode 100644 index 0000000000..1cebca46f2 --- /dev/null +++ b/src/pages/docs/cli/channels/annotations/subscribe.mdx @@ -0,0 +1,80 @@ +--- +title: "ably channels annotations subscribe" +meta_description: "Subscribe to annotations on an Ably Pub/Sub channel using the CLI." +meta_keywords: "ably cli, cli, channels, annotations, subscribe, reactions, ably channels annotations subscribe" +--- + + +```shell +ably channels annotations subscribe [flags] +``` + + +Use the `ably channels annotations subscribe` command to subscribe to annotations on an Ably Pub/Sub channel. + +## Arguments + +Pass the following arguments to the `ably channels annotations subscribe` command: + +### `` + +The name of the channel to subscribe to annotations on. + +## Flags + +You can optionally pass the following flags to the `ably channels annotations subscribe` command: + +### `--type` + +Filter annotations by type. + +### `--duration | -D` + +The duration in seconds to subscribe for before automatically unsubscribing. + +### `--rewind` + +The number of annotations to rewind when subscribing. Defaults to `0`. + +### `--client-id` + +A client ID to use when subscribing. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Subscribe to all annotations on a channel: + + +```shell +ably channels annotations subscribe my-channel +``` + + +Subscribe to annotations filtered by type: + + +```shell +ably channels annotations subscribe my-channel --type "reactions:unique.v1" +``` + + +Subscribe for a specific duration: + + +```shell +ably channels annotations subscribe my-channel --duration 60 +``` + + +## See also + +* [Channels annotations](/docs/cli/channels/annotations) — Explore all `ably channels annotations` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/channels/append.mdx b/src/pages/docs/cli/channels/append.mdx new file mode 100644 index 0000000000..d43f722314 --- /dev/null +++ b/src/pages/docs/cli/channels/append.mdx @@ -0,0 +1,88 @@ +--- +title: "ably channels append" +meta_description: "Append data to a message on an Ably Pub/Sub channel using the CLI." +meta_keywords: "ably cli, cli, channels, append, message, pub/sub, ably channels append" +--- + + +```shell +ably channels append [flags] +``` + + +Use the `ably channels append` command to append data to a message on an Ably Pub/Sub channel. + +## Arguments + +Pass the following arguments to the `ably channels append` command: + +### `` + +The name of the channel containing the message. + +### `` + +The serial of the message to append data to. + +### `` + +The data to append. This can be plain text or JSON. + +## Flags + +You can optionally pass the following flags to the `ably channels append` command: + +### `--description` + +A description for the appended data. + +### `--encoding | -e` + +The encoding of the message, such as `json/utf-8`. + +### `--name | -n` + +The event name for the appended message. + +### `--client-id` + +A client ID to use when appending the message. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Append data to a message: + + +```shell +ably channels append my-channel "01a2b3c4d5@1234567890000-0" '{"extra": "data"}' +``` + + +Append with an event name: + + +```shell +ably channels append my-channel "01a2b3c4d5@1234567890000-0" "additional info" --name update +``` + + +Append with a description: + + +```shell +ably channels append my-channel "01a2b3c4d5@1234567890000-0" '{"note": "correction"}' --description "Added correction" +``` + + +## See also + +* [Channels](/docs/cli/channels) — Explore all `ably channels` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/channels/batch-publish.mdx b/src/pages/docs/cli/channels/batch-publish.mdx new file mode 100644 index 0000000000..eb3a42d2b6 --- /dev/null +++ b/src/pages/docs/cli/channels/batch-publish.mdx @@ -0,0 +1,84 @@ +--- +title: "ably channels batch-publish" +meta_description: "Publish a message to multiple Ably Pub/Sub channels at once using the CLI." +meta_keywords: "ably cli, cli, channels, batch-publish, batch, publish, pub/sub, ably channels batch-publish" +--- + + +```shell +ably channels batch-publish [message] [flags] +``` + + +Use the `ably channels batch-publish` command to publish a message to multiple Ably Pub/Sub channels at once. + +## Arguments + +Pass the following arguments to the `ably channels batch-publish` command: + +### `[message]` + +The message to publish. This is optional when using the `--spec` flag. + +## Flags + +You can optionally pass the following flags to the `ably channels batch-publish` command: + +### `--channels` + +A comma-separated list of channel names to publish to. This flag is mutually exclusive with `--channels-json` and `--spec`. + +### `--channels-json` + +A JSON array of channel names to publish to. This flag is mutually exclusive with `--channels` and `--spec`. + +### `--spec` + +A complete batch spec as a JSON string. This flag is mutually exclusive with `--channels` and `--channels-json`. + +### `--encoding | -e` + +The encoding of the message, such as `json/utf-8`. + +### `--name | -n` + +The event name for the message. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Publish to multiple channels: + + +```shell +ably channels batch-publish "Hello, everyone!" --channels "channel-1,channel-2,channel-3" +``` + + +Publish using a JSON array of channels: + + +```shell +ably channels batch-publish "Hello!" --channels-json '["channel-1", "channel-2"]' +``` + + +Publish using a complete batch spec: + + +```shell +ably channels batch-publish --spec '{"channels": ["channel-1", "channel-2"], "messages": [{"data": "Hello!"}]}' +``` + + +## See also + +* [Channels](/docs/cli/channels) — Explore all `ably channels` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/channels/delete.mdx b/src/pages/docs/cli/channels/delete.mdx new file mode 100644 index 0000000000..6921557788 --- /dev/null +++ b/src/pages/docs/cli/channels/delete.mdx @@ -0,0 +1,68 @@ +--- +title: "ably channels delete" +meta_description: "Delete a message on an Ably Pub/Sub channel using the CLI." +meta_keywords: "ably cli, cli, channels, delete, message, pub/sub, ably channels delete" +--- + + +```shell +ably channels delete [flags] +``` + + +Use the `ably channels delete` command to delete a message on an Ably Pub/Sub channel. + +## Arguments + +Pass the following arguments to the `ably channels delete` command: + +### `` + +The name of the channel containing the message. + +### `` + +The serial of the message to delete. + +## Flags + +You can optionally pass the following flags to the `ably channels delete` command: + +### `--description` + +A description for the deletion. + +### `--client-id` + +A client ID to use when deleting the message. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Delete a message: + + +```shell +ably channels delete my-channel "01a2b3c4d5@1234567890000-0" +``` + + +Delete a message with a description: + + +```shell +ably channels delete my-channel "01a2b3c4d5@1234567890000-0" --description "Removed inappropriate content" +``` + + +## See also + +* [Channels](/docs/cli/channels) — Explore all `ably channels` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/channels/history.mdx b/src/pages/docs/cli/channels/history.mdx new file mode 100644 index 0000000000..ae2a330675 --- /dev/null +++ b/src/pages/docs/cli/channels/history.mdx @@ -0,0 +1,92 @@ +--- +title: "ably channels history" +meta_description: "Retrieve message history for an Ably Pub/Sub channel using the CLI." +meta_keywords: "ably cli, cli, channels, history, messages, pub/sub, ably channels history" +--- + + +```shell +ably channels history [flags] +``` + + +Use the `ably channels history` command to retrieve message history for an Ably Pub/Sub channel. + +## Arguments + +Pass the following arguments to the `ably channels history` command: + +### `` + +The name of the channel to retrieve history for. + +## Flags + +You can optionally pass the following flags to the `ably channels history` command: + +### `--cipher` + +A decryption key to use for decrypting messages in the history. + +### `--direction` + +The direction to retrieve messages in. Options are `backwards` or `forwards`. Defaults to `backwards`. + +### `--start` + +The start of the time range to retrieve messages from. Accepts ISO 8601, Unix milliseconds, or relative time formats. + +### `--end` + +The end of the time range to retrieve messages from. Accepts ISO 8601, Unix milliseconds, or relative time formats. + +### `--limit` + +The maximum number of messages to retrieve. Defaults to `50`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Retrieve message history for a channel: + + +```shell +ably channels history my-channel +``` + + +Retrieve history within a time range: + + +```shell +ably channels history my-channel --start "2025-01-01T00:00:00Z" --end "2025-01-02T00:00:00Z" +``` + + +Retrieve a limited number of messages: + + +```shell +ably channels history my-channel --limit 10 +``` + + +Retrieve history in forwards direction: + + +```shell +ably channels history my-channel --direction forwards +``` + + +## See also + +* [Channels](/docs/cli/channels) — Explore all `ably channels` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/channels/index.mdx b/src/pages/docs/cli/channels/index.mdx new file mode 100644 index 0000000000..c6164b28dd --- /dev/null +++ b/src/pages/docs/cli/channels/index.mdx @@ -0,0 +1,57 @@ +--- +title: "ably channels" +meta_description: "Interact with Ably Pub/Sub channels using the CLI." +meta_keywords: "ably cli, cli, channels, pub/sub, publish, subscribe, presence, occupancy, ably channels" +--- + +Use the `ably channels` command group to interact with Ably Pub/Sub channels. These commands enable you to publish and subscribe to messages, manage presence, monitor occupancy, and work with annotations. + +## Publishing and subscribing + +| Command | Description | +| ------- | ----------- | +| [`ably channels subscribe`](/docs/cli/channels/subscribe) | Subscribe to messages on one or more channels. | +| [`ably channels publish`](/docs/cli/channels/publish) | Publish a message to a channel. | +| [`ably channels batch-publish`](/docs/cli/channels/batch-publish) | Publish a message to multiple channels at once. | +| [`ably channels history`](/docs/cli/channels/history) | Retrieve message history for a channel. | +| [`ably channels append`](/docs/cli/channels/append) | Append data to a message on a channel. | +| [`ably channels update`](/docs/cli/channels/update) | Update a message on a channel. | +| [`ably channels delete`](/docs/cli/channels/delete) | Delete a message on a channel. | + +## Annotations + +| Command | Description | +| ------- | ----------- | +| [`ably channels annotations`](/docs/cli/channels/annotations) | Manage annotations on channel messages. | +| [`ably channels annotations publish`](/docs/cli/channels/annotations/publish) | Publish an annotation on a channel message. | +| [`ably channels annotations subscribe`](/docs/cli/channels/annotations/subscribe) | Subscribe to annotations on a channel. | +| [`ably channels annotations get`](/docs/cli/channels/annotations/get) | Get annotations for a channel message. | +| [`ably channels annotations delete`](/docs/cli/channels/annotations/delete) | Delete an annotation from a channel message. | + +## Presence + +| Command | Description | +| ------- | ----------- | +| [`ably channels presence`](/docs/cli/channels/presence) | Manage presence on channels. | +| [`ably channels presence enter`](/docs/cli/channels/presence/enter) | Enter presence on a channel. | +| [`ably channels presence get`](/docs/cli/channels/presence/get) | Get current presence members on a channel. | +| [`ably channels presence subscribe`](/docs/cli/channels/presence/subscribe) | Subscribe to presence events on a channel. | + +## Occupancy + +| Command | Description | +| ------- | ----------- | +| [`ably channels occupancy`](/docs/cli/channels/occupancy) | Monitor channel occupancy. | +| [`ably channels occupancy get`](/docs/cli/channels/occupancy/get) | Get current occupancy for a channel. | +| [`ably channels occupancy subscribe`](/docs/cli/channels/occupancy/subscribe) | Subscribe to occupancy updates on a channel. | + +## Channel management + +| Command | Description | +| ------- | ----------- | +| [`ably channels list`](/docs/cli/channels/list) | List active channels. | +| [`ably channels inspect`](/docs/cli/channels/inspect) | Open the Ably dashboard to inspect a channel. | + +## See also + +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/channels/inspect.mdx b/src/pages/docs/cli/channels/inspect.mdx new file mode 100644 index 0000000000..ac76645309 --- /dev/null +++ b/src/pages/docs/cli/channels/inspect.mdx @@ -0,0 +1,52 @@ +--- +title: "ably channels inspect" +meta_description: "Open the Ably dashboard to inspect a specific channel using the CLI." +meta_keywords: "ably cli, cli, channels, inspect, dashboard, pub/sub, ably channels inspect" +--- + + +```shell +ably channels inspect [flags] +``` + + +Use the `ably channels inspect` command to open the Ably dashboard to inspect a specific channel. + +## Arguments + +Pass the following arguments to the `ably channels inspect` command: + +### `` + +The name of the channel to inspect. + +## Flags + +You can optionally pass the following flags to the `ably channels inspect` command: + +### `--app` + +The app ID or name to inspect the channel for. Overrides the currently selected app. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Inspect a channel in the Ably dashboard: + + +```shell +ably channels inspect my-channel +``` + + +## See also + +* [Channels](/docs/cli/channels) — Explore all `ably channels` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/channels/list.mdx b/src/pages/docs/cli/channels/list.mdx new file mode 100644 index 0000000000..09da4cfdbd --- /dev/null +++ b/src/pages/docs/cli/channels/list.mdx @@ -0,0 +1,64 @@ +--- +title: "ably channels list" +meta_description: "List active channels using the Ably CLI." +meta_keywords: "ably cli, cli, channels, list, active channels, enumeration, ably channels list" +--- + + +```shell +ably channels list [flags] +``` + + +Use the `ably channels list` command to list active channels using the channel enumeration API. + +## Flags + +You can optionally pass the following flags to the `ably channels list` command: + +### `--limit` + +The maximum number of channels to return. Defaults to `100`. + +### `--prefix | -p` + +Filter channels by a name prefix. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +List all active channels: + + +```shell +ably channels list +``` + + +List channels with a specific prefix: + + +```shell +ably channels list --prefix "chat:" +``` + + +List channels with a limit: + + +```shell +ably channels list --limit 10 +``` + + +## See also + +* [Channels](/docs/cli/channels) — Explore all `ably channels` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/channels/occupancy/get.mdx b/src/pages/docs/cli/channels/occupancy/get.mdx new file mode 100644 index 0000000000..96f63e7ac1 --- /dev/null +++ b/src/pages/docs/cli/channels/occupancy/get.mdx @@ -0,0 +1,56 @@ +--- +title: "ably channels occupancy get" +meta_description: "Get current occupancy for an Ably Pub/Sub channel using the CLI." +meta_keywords: "ably cli, cli, channels, occupancy, get, connections, subscribers, ably channels occupancy get" +--- + + +```shell +ably channels occupancy get [flags] +``` + + +Use the `ably channels occupancy get` command to get the current occupancy for an Ably Pub/Sub channel. + +## Arguments + +Pass the following arguments to the `ably channels occupancy get` command: + +### `` + +The name of the channel to get occupancy for. + +## Flags + +You can optionally pass the following flags to the `ably channels occupancy get` command: + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Get the current occupancy for a channel: + + +```shell +ably channels occupancy get my-channel +``` + + +Get occupancy in JSON format: + + +```shell +ably channels occupancy get my-channel --json +``` + + +## See also + +* [Channels occupancy](/docs/cli/channels/occupancy) — Explore all `ably channels occupancy` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/channels/occupancy/index.mdx b/src/pages/docs/cli/channels/occupancy/index.mdx new file mode 100644 index 0000000000..a699751e47 --- /dev/null +++ b/src/pages/docs/cli/channels/occupancy/index.mdx @@ -0,0 +1,19 @@ +--- +title: "ably channels occupancy" +meta_description: "Monitor channel occupancy using the Ably CLI." +meta_keywords: "ably cli, cli, channels, occupancy, connections, subscribers, ably channels occupancy" +--- + +Use the `ably channels occupancy` command group to monitor occupancy on Ably Pub/Sub channels. + +## Subcommands + +| Command | Description | +| ------- | ----------- | +| [`ably channels occupancy get`](/docs/cli/channels/occupancy/get) | Get current occupancy for a channel. | +| [`ably channels occupancy subscribe`](/docs/cli/channels/occupancy/subscribe) | Subscribe to occupancy updates on a channel. | + +## See also + +* [Channels](/docs/cli/channels) — Explore all `ably channels` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/channels/occupancy/subscribe.mdx b/src/pages/docs/cli/channels/occupancy/subscribe.mdx new file mode 100644 index 0000000000..19c041ceea --- /dev/null +++ b/src/pages/docs/cli/channels/occupancy/subscribe.mdx @@ -0,0 +1,64 @@ +--- +title: "ably channels occupancy subscribe" +meta_description: "Subscribe to occupancy updates on an Ably Pub/Sub channel using the CLI." +meta_keywords: "ably cli, cli, channels, occupancy, subscribe, connections, subscribers, ably channels occupancy subscribe" +--- + + +```shell +ably channels occupancy subscribe [flags] +``` + + +Use the `ably channels occupancy subscribe` command to subscribe to occupancy updates on an Ably Pub/Sub channel. + +## Arguments + +Pass the following arguments to the `ably channels occupancy subscribe` command: + +### `` + +The name of the channel to subscribe to occupancy updates on. + +## Flags + +You can optionally pass the following flags to the `ably channels occupancy subscribe` command: + +### `--duration | -D` + +The duration in seconds to subscribe for before automatically unsubscribing. + +### `--client-id` + +A client ID to use when subscribing. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Subscribe to occupancy updates: + + +```shell +ably channels occupancy subscribe my-channel +``` + + +Subscribe for a specific duration: + + +```shell +ably channels occupancy subscribe my-channel --duration 60 +``` + + +## See also + +* [Channels occupancy](/docs/cli/channels/occupancy) — Explore all `ably channels occupancy` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/channels/presence/enter.mdx b/src/pages/docs/cli/channels/presence/enter.mdx new file mode 100644 index 0000000000..bbc8d5d215 --- /dev/null +++ b/src/pages/docs/cli/channels/presence/enter.mdx @@ -0,0 +1,84 @@ +--- +title: "ably channels presence enter" +meta_description: "Enter presence on an Ably Pub/Sub channel using the CLI." +meta_keywords: "ably cli, cli, channels, presence, enter, members, ably channels presence enter" +--- + + +```shell +ably channels presence enter [flags] +``` + + +Use the `ably channels presence enter` command to enter presence on a channel and remain present until terminated. + +## Arguments + +Pass the following arguments to the `ably channels presence enter` command: + +### `` + +The name of the channel to enter presence on. + +## Flags + +You can optionally pass the following flags to the `ably channels presence enter` command: + +### `--data` + +JSON data to associate with the presence member. + +### `--show-others` + +Display presence events from other members on the channel. Defaults to `false`. + +### `--sequence-numbers` + +Display sequence numbers for presence events. Defaults to `false`. + +### `--duration | -D` + +The duration in seconds to remain present before automatically leaving. + +### `--client-id` + +A client ID to use when entering presence. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Enter presence on a channel: + + +```shell +ably channels presence enter my-channel +``` + + +Enter presence with data: + + +```shell +ably channels presence enter my-channel --data '{"status": "online"}' +``` + + +Enter presence and show other members' events: + + +```shell +ably channels presence enter my-channel --show-others +``` + + +## See also + +* [Channels presence](/docs/cli/channels/presence) — Explore all `ably channels presence` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/channels/presence/get.mdx b/src/pages/docs/cli/channels/presence/get.mdx new file mode 100644 index 0000000000..67025d15fd --- /dev/null +++ b/src/pages/docs/cli/channels/presence/get.mdx @@ -0,0 +1,60 @@ +--- +title: "ably channels presence get" +meta_description: "Get all current presence members on an Ably Pub/Sub channel using the CLI." +meta_keywords: "ably cli, cli, channels, presence, get, members, ably channels presence get" +--- + + +```shell +ably channels presence get [flags] +``` + + +Use the `ably channels presence get` command to get all current presence members on a channel. + +## Arguments + +Pass the following arguments to the `ably channels presence get` command: + +### `` + +The name of the channel to get presence members for. + +## Flags + +You can optionally pass the following flags to the `ably channels presence get` command: + +### `--limit` + +The maximum number of presence members to return. Defaults to `100`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Get all presence members on a channel: + + +```shell +ably channels presence get my-channel +``` + + +Get presence members with a limit: + + +```shell +ably channels presence get my-channel --limit 10 +``` + + +## See also + +* [Channels presence](/docs/cli/channels/presence) — Explore all `ably channels presence` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/channels/presence/index.mdx b/src/pages/docs/cli/channels/presence/index.mdx new file mode 100644 index 0000000000..e63c010eca --- /dev/null +++ b/src/pages/docs/cli/channels/presence/index.mdx @@ -0,0 +1,20 @@ +--- +title: "ably channels presence" +meta_description: "Manage presence on Ably Pub/Sub channels using the CLI." +meta_keywords: "ably cli, cli, channels, presence, members, ably channels presence" +--- + +Use the `ably channels presence` command group to manage presence on Ably Pub/Sub channels. + +## Subcommands + +| Command | Description | +| ------- | ----------- | +| [`ably channels presence enter`](/docs/cli/channels/presence/enter) | Enter presence on a channel. | +| [`ably channels presence get`](/docs/cli/channels/presence/get) | Get current presence members on a channel. | +| [`ably channels presence subscribe`](/docs/cli/channels/presence/subscribe) | Subscribe to presence events on a channel. | + +## See also + +* [Channels](/docs/cli/channels) — Explore all `ably channels` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/channels/presence/subscribe.mdx b/src/pages/docs/cli/channels/presence/subscribe.mdx new file mode 100644 index 0000000000..15dd63ea42 --- /dev/null +++ b/src/pages/docs/cli/channels/presence/subscribe.mdx @@ -0,0 +1,64 @@ +--- +title: "ably channels presence subscribe" +meta_description: "Subscribe to presence events on an Ably Pub/Sub channel using the CLI." +meta_keywords: "ably cli, cli, channels, presence, subscribe, events, members, ably channels presence subscribe" +--- + + +```shell +ably channels presence subscribe [flags] +``` + + +Use the `ably channels presence subscribe` command to subscribe to presence events on a channel. + +## Arguments + +Pass the following arguments to the `ably channels presence subscribe` command: + +### `` + +The name of the channel to subscribe to presence events on. + +## Flags + +You can optionally pass the following flags to the `ably channels presence subscribe` command: + +### `--duration | -D` + +The duration in seconds to subscribe for before automatically unsubscribing. + +### `--client-id` + +A client ID to use when subscribing. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Subscribe to presence events: + + +```shell +ably channels presence subscribe my-channel +``` + + +Subscribe for a specific duration: + + +```shell +ably channels presence subscribe my-channel --duration 60 +``` + + +## See also + +* [Channels presence](/docs/cli/channels/presence) — Explore all `ably channels presence` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/channels/publish.mdx b/src/pages/docs/cli/channels/publish.mdx new file mode 100644 index 0000000000..b635225e58 --- /dev/null +++ b/src/pages/docs/cli/channels/publish.mdx @@ -0,0 +1,108 @@ +--- +title: "ably channels publish" +meta_description: "Publish a message to an Ably Pub/Sub channel using the CLI." +meta_keywords: "ably cli, cli, channels, publish, message, pub/sub, ably channels publish" +--- + + +```shell +ably channels publish [flags] +``` + + +Use the `ably channels publish` command to publish a message to an Ably Pub/Sub channel. + +## Arguments + +Pass the following arguments to the `ably channels publish` command: + +### `` + +The name of the channel to publish to. + +### `` + +The message to publish. This can be plain text or JSON. Supports `{{.Count}}` and `{{.Timestamp}}` interpolation when publishing multiple messages. + +## Flags + +You can optionally pass the following flags to the `ably channels publish` command: + +### `--count | -c` + +The number of messages to publish. Defaults to `1`. + +### `--delay | -d` + +The delay between messages in milliseconds when publishing multiple messages. Defaults to `40`. + +### `--encoding | -e` + +The encoding of the message, such as `json/utf-8`. + +### `--name | -n` + +The event name for the message. + +### `--transport` + +The transport to use for publishing. Options are `rest` or `realtime`. + +### `--client-id` + +A client ID to use when publishing the message. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Publish a plain text message: + + +```shell +ably channels publish my-channel "Hello, world!" +``` + + +Publish a JSON message: + + +```shell +ably channels publish my-channel '{"key": "value"}' +``` + + +Publish multiple messages with interpolation: + + +```shell +ably channels publish my-channel "Message {{.Count}} at {{.Timestamp}}" --count 10 +``` + + +Publish with an event name: + + +```shell +ably channels publish my-channel "Hello" --name greeting +``` + + +Publish using the realtime transport: + + +```shell +ably channels publish my-channel "Hello" --transport realtime +``` + + +## See also + +* [Channels](/docs/cli/channels) — Explore all `ably channels` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/channels/subscribe.mdx b/src/pages/docs/cli/channels/subscribe.mdx new file mode 100644 index 0000000000..6d0022333a --- /dev/null +++ b/src/pages/docs/cli/channels/subscribe.mdx @@ -0,0 +1,104 @@ +--- +title: "ably channels subscribe" +meta_description: "Subscribe to messages on one or more Ably Pub/Sub channels using the CLI." +meta_keywords: "ably cli, cli, channels, subscribe, messages, pub/sub, ably channels subscribe" +--- + + +```shell +ably channels subscribe [flags] +``` + + +Use the `ably channels subscribe` command to subscribe to messages on one or more Ably Pub/Sub channels. + +## Arguments + +Pass the following arguments to the `ably channels subscribe` command: + +### `` + +One or more channel names to subscribe to. + +## Flags + +You can optionally pass the following flags to the `ably channels subscribe` command: + +### `--cipher` + +A decryption key to use for decrypting messages on the channel. + +### `--delta` + +Enable delta compression for messages. Defaults to `false`. + +### `--sequence-numbers` + +Display sequence numbers for messages. Defaults to `false`. + +### `--duration | -D` + +The duration in seconds to subscribe for before automatically unsubscribing. + +### `--rewind` + +The number of messages to rewind when subscribing. Defaults to `0`. + +### `--client-id` + +A client ID to use when subscribing. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Subscribe to a single channel: + + +```shell +ably channels subscribe my-channel +``` + + +Subscribe to multiple channels: + + +```shell +ably channels subscribe my-channel another-channel +``` + + +Subscribe for a specific duration: + + +```shell +ably channels subscribe my-channel --duration 60 +``` + + +Subscribe with rewind to receive recent messages: + + +```shell +ably channels subscribe my-channel --rewind 10 +``` + + +Subscribe with a cipher key for encrypted messages: + + +```shell +ably channels subscribe my-channel --cipher "my-secret-key" +``` + + +## See also + +* [Channels](/docs/cli/channels) — Explore all `ably channels` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/channels/update.mdx b/src/pages/docs/cli/channels/update.mdx new file mode 100644 index 0000000000..4d1a493338 --- /dev/null +++ b/src/pages/docs/cli/channels/update.mdx @@ -0,0 +1,80 @@ +--- +title: "ably channels update" +meta_description: "Update a message on an Ably Pub/Sub channel using the CLI." +meta_keywords: "ably cli, cli, channels, update, message, pub/sub, ably channels update" +--- + + +```shell +ably channels update [flags] +``` + + +Use the `ably channels update` command to update a message on an Ably Pub/Sub channel. + +## Arguments + +Pass the following arguments to the `ably channels update` command: + +### `` + +The name of the channel containing the message. + +### `` + +The serial of the message to update. + +### `` + +The new message content. This can be plain text or JSON. + +## Flags + +You can optionally pass the following flags to the `ably channels update` command: + +### `--description` + +A description for the update. + +### `--encoding | -e` + +The encoding of the message, such as `json/utf-8`. + +### `--name | -n` + +The event name for the updated message. + +### `--client-id` + +A client ID to use when updating the message. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Update a message: + + +```shell +ably channels update my-channel "01a2b3c4d5@1234567890000-0" "Updated message content" +``` + + +Update a message with a description: + + +```shell +ably channels update my-channel "01a2b3c4d5@1234567890000-0" '{"key": "new-value"}' --description "Fixed typo" +``` + + +## See also + +* [Channels](/docs/cli/channels) — Explore all `ably channels` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/config/index.mdx b/src/pages/docs/cli/config/index.mdx new file mode 100644 index 0000000000..40dd8dd4dc --- /dev/null +++ b/src/pages/docs/cli/config/index.mdx @@ -0,0 +1,18 @@ +--- +title: "ably config" +meta_description: "Manage Ably CLI configuration." +meta_keywords: "ably cli, cli, config, configuration, ably config" +--- + +Use the `ably config` command group to manage your Ably CLI configuration. These commands enable you to view and locate the CLI configuration file. + +## Subcommands + +| Command | Description | +| ------- | ----------- | +| [`ably config path`](/docs/cli/config/path) | Print the path to the Ably CLI config file. | +| [`ably config show`](/docs/cli/config/show) | Display the contents of the Ably CLI config file. | + +## See also + +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/config/path.mdx b/src/pages/docs/cli/config/path.mdx new file mode 100644 index 0000000000..f315b79687 --- /dev/null +++ b/src/pages/docs/cli/config/path.mdx @@ -0,0 +1,36 @@ +--- +title: "ably config path" +meta_description: "Print the path to the Ably CLI config file." +meta_keywords: "ably cli, cli, config, path, configuration file, ably config path" +--- + + +```shell +ably config path +``` + + +Use the `ably config path` command to print the path to the Ably CLI config file. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Print the config file path: + + +```shell +ably config path +``` + + +## See also + +* [Config](/docs/cli/config) — Explore all `ably config` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/config/show.mdx b/src/pages/docs/cli/config/show.mdx new file mode 100644 index 0000000000..cb115b34ef --- /dev/null +++ b/src/pages/docs/cli/config/show.mdx @@ -0,0 +1,44 @@ +--- +title: "ably config show" +meta_description: "Display the contents of the Ably CLI config file." +meta_keywords: "ably cli, cli, config, show, configuration, ably config show" +--- + + +```shell +ably config show +``` + + +Use the `ably config show` command to display the contents of the Ably CLI config file. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Display the config file contents: + + +```shell +ably config show +``` + + +Display the config file contents in JSON format: + + +```shell +ably config show --json +``` + + +## See also + +* [Config](/docs/cli/config) — Explore all `ably config` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/connections/index.mdx b/src/pages/docs/cli/connections/index.mdx new file mode 100644 index 0000000000..e947e03978 --- /dev/null +++ b/src/pages/docs/cli/connections/index.mdx @@ -0,0 +1,17 @@ +--- +title: "ably connections" +meta_description: "Test connections to Ably." +meta_keywords: "ably cli, cli, connections, test, connectivity, ably connections" +--- + +Use the `ably connections` command group to test connections to Ably. These commands enable you to verify connectivity using different transport protocols. + +## Subcommands + +| Command | Description | +| ------- | ----------- | +| [`ably connections test`](/docs/cli/connections/test) | Test connection to Ably. | + +## See also + +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/connections/test.mdx b/src/pages/docs/cli/connections/test.mdx new file mode 100644 index 0000000000..bb4fb9a946 --- /dev/null +++ b/src/pages/docs/cli/connections/test.mdx @@ -0,0 +1,64 @@ +--- +title: "ably connections test" +meta_description: "Test connection to Ably." +meta_keywords: "ably cli, cli, connections, test, connectivity, transport, ably connections test" +--- + + +```shell +ably connections test [flags] +``` + + +Use the `ably connections test` command to test your connection to Ably using different transport protocols. + +## Flags + +You can optionally pass the following flags to the `ably connections test` command: + +### `--transport` + +The transport protocol to test. Valid options are `ws` (WebSocket), `xhr` (HTTP), or `all`. The default value is `all`. + +### `--client-id` + +The client ID to use for the connection test. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Test all transport protocols: + + +```shell +ably connections test +``` + + +Test WebSocket connectivity only: + + +```shell +ably connections test --transport ws +``` + + +Test HTTP connectivity only: + + +```shell +ably connections test --transport xhr +``` + + +## See also + +* [Connections](/docs/cli/connections) — Explore all `ably connections` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/help.mdx b/src/pages/docs/cli/help.mdx new file mode 100644 index 0000000000..feab1b29fc --- /dev/null +++ b/src/pages/docs/cli/help.mdx @@ -0,0 +1,53 @@ +--- +title: "ably help" +meta_description: "Display help information for Ably CLI commands." +meta_keywords: "ably cli, cli, help, command help, ably help" +--- + + +```shell +ably help [command] +``` + + +Use the `ably help` command to display help information for Ably CLI commands. When run without arguments, it shows the main help with all available command groups. When run with a specific command, it shows detailed help for that command. + +## Arguments + +Pass the following arguments to the `ably help` command: + +### `[command]` + +The command to display help for, for example: `ably help channels publish`. + +If no command is specified, the main help with all available command groups is displayed. + +## Examples + +Display the main help: + + +```shell +ably help +``` + + +Display help for a specific command: + + +```shell +ably help channels publish +``` + + +Display help for a command group: + + +```shell +ably help channels +``` + + +## See also + +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/index.mdx b/src/pages/docs/cli/index.mdx new file mode 100644 index 0000000000..66608954c8 --- /dev/null +++ b/src/pages/docs/cli/index.mdx @@ -0,0 +1,49 @@ +--- +title: "Ably CLI" +meta_description: "Command-line interface for the Ably realtime messaging platform." +meta_keywords: "ably cli, cli, command line, realtime messaging, pub/sub, chat, spaces" +--- + +## Overview + +For an overview of the Ably CLI, including [installation instructions](/docs/platform/tools/cli#installation) and [feature highlights](/docs/platform/tools/cli#feature-set), see the [Ably CLI](/docs/platform/tools/cli) page. + +## Global flags + +The following global flags are available on most CLI commands: + +### `--json` + +Output results in JSON format. + +### `--pretty-json` + +Output results in colorized JSON format. + +### `--verbose | -v` + +Enable verbose logging. + +## Commands + +| Command | Description | +| ------- | ----------- | +| [`ably accounts`](/docs/cli/accounts) | Manage Ably accounts and your configured access tokens | +| [`ably apps`](/docs/cli/apps) | Manage Ably apps | +| [`ably autocomplete`](/docs/cli/autocomplete) | Display autocomplete installation instructions | +| [`ably auth`](/docs/cli/auth) | Manage authentication, keys and tokens | +| [`ably bench`](/docs/cli/bench) | Commands for running benchmark tests | +| [`ably channels`](/docs/cli/channels) | Interact with Ably Pub/Sub channels | +| [`ably config`](/docs/cli/config) | Manage Ably CLI configuration | +| [`ably connections`](/docs/cli/connections) | Interact with Ably Pub/Sub connections | +| [`ably help`](/docs/cli/help) | Display help for ably | +| [`ably integrations`](/docs/cli/integrations) | Manage Ably integrations | +| [`ably login`](/docs/cli/login) | Log in to your Ably account (alias for "ably accounts login") | +| [`ably logs`](/docs/cli/logs) | Streaming and retrieving logs from Ably | +| [`ably push`](/docs/cli/push) | Manage push notifications | +| [`ably queues`](/docs/cli/queues) | Manage Ably Queues | +| [`ably rooms`](/docs/cli/rooms) | Interact with Ably Chat rooms | +| [`ably spaces`](/docs/cli/spaces) | Interact with Ably Spaces | +| [`ably stats`](/docs/cli/stats) | View statistics for your Ably account or apps | +| [`ably status`](/docs/cli/status) | Check the status of the Ably service | +| [`ably support`](/docs/cli/support) | Get support and help from Ably | diff --git a/src/pages/docs/cli/integrations/create.mdx b/src/pages/docs/cli/integrations/create.mdx new file mode 100644 index 0000000000..e2bdb6c80a --- /dev/null +++ b/src/pages/docs/cli/integrations/create.mdx @@ -0,0 +1,84 @@ +--- +title: "ably integrations create" +meta_description: "Create an integration rule using the Ably CLI." +meta_keywords: "ably cli, cli, integrations, create, rule, webhook, ably integrations create" +--- + + +```shell +ably integrations create --rule-type --source-type [flags] +``` + + +Use the `ably integrations create` command to create an integration rule for your Ably application. + +## Flags + +You can pass the following flags to the `ably integrations create` command: + +### `--rule-type` + +The type of integration rule to create. This flag is required. Valid options are `http`, `amqp`, `kinesis`, `firehose`, `pulsar`, `kafka`, `azure`, `azure-functions`, `mqtt`, or `cloudmqtt`. + +### `--source-type` + +The source type for the integration rule. This flag is required. Valid options are `channel.message`, `channel.presence`, `channel.lifecycle`, or `presence.message`. + +### `--app` + +The app ID to create the integration rule for. If not specified, the currently selected app is used. + +### `--channel-filter` + +A channel name filter to apply to the integration rule. + +### `--target-url` + +The target URL for the integration rule. This flag is required for `http` rule types. + +### `--request-mode` + +The request mode for the integration rule. Valid options are `single` or `batch`. The default value is `single`. + +### `--status` + +The initial status of the integration rule. Valid options are `enabled` or `disabled`. The default value is `enabled`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Create an HTTP webhook integration: + + +```shell +ably integrations create --rule-type http --source-type channel.message --target-url https://example.com/webhook +``` + + +Create an AMQP integration with a channel filter: + + +```shell +ably integrations create --rule-type amqp --source-type channel.message --channel-filter "^notifications" +``` + + +Create a disabled integration rule: + + +```shell +ably integrations create --rule-type http --source-type channel.message --target-url https://example.com/webhook --status disabled +``` + + +## See also + +* [Integrations](/docs/cli/integrations) — Explore all `ably integrations` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/integrations/delete.mdx b/src/pages/docs/cli/integrations/delete.mdx new file mode 100644 index 0000000000..9fea9386bb --- /dev/null +++ b/src/pages/docs/cli/integrations/delete.mdx @@ -0,0 +1,64 @@ +--- +title: "ably integrations delete" +meta_description: "Delete an integration rule using the Ably CLI." +meta_keywords: "ably cli, cli, integrations, delete, rule, ably integrations delete" +--- + + +```shell +ably integrations delete [flags] +``` + + +Use the `ably integrations delete` command to delete an integration rule. + +## Arguments + +Pass the following arguments to the `ably integrations delete` command: + +### `` + +The ID of the integration rule to delete. This argument is required. + +## Flags + +You can optionally pass the following flags to the `ably integrations delete` command: + +### `--app` + +The app ID that the integration rule belongs to. If not specified, the currently selected app is used. + +### `--force | -f` + +Skip the confirmation prompt and delete the integration rule immediately. Required when using `--json`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Delete an integration rule by ID: + + +```shell +ably integrations delete aBcDe1 +``` + + +Delete an integration rule without a confirmation prompt: + + +```shell +ably integrations delete aBcDe1 --force +``` + + +## See also + +* [Integrations](/docs/cli/integrations) — Explore all `ably integrations` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/integrations/get.mdx b/src/pages/docs/cli/integrations/get.mdx new file mode 100644 index 0000000000..2e4340d106 --- /dev/null +++ b/src/pages/docs/cli/integrations/get.mdx @@ -0,0 +1,60 @@ +--- +title: "ably integrations get" +meta_description: "Get an integration rule by ID using the Ably CLI." +meta_keywords: "ably cli, cli, integrations, get, rule, ably integrations get" +--- + + +```shell +ably integrations get [flags] +``` + + +Use the `ably integrations get` command to retrieve the details of an integration rule by its ID. + +## Arguments + +Pass the following arguments to the `ably integrations get` command: + +### `` + +The ID of the integration rule to retrieve. This argument is required. + +## Flags + +You can optionally pass the following flags to the `ably integrations get` command: + +### `--app` + +The app ID that the integration rule belongs to. If not specified, the currently selected app is used. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Get an integration rule: + + +```shell +ably integrations get aBcDe1 +``` + + +Get an integration rule in JSON format: + + +```shell +ably integrations get aBcDe1 --json +``` + + +## See also + +* [Integrations](/docs/cli/integrations) — Explore all `ably integrations` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/integrations/index.mdx b/src/pages/docs/cli/integrations/index.mdx new file mode 100644 index 0000000000..3a91515bf4 --- /dev/null +++ b/src/pages/docs/cli/integrations/index.mdx @@ -0,0 +1,21 @@ +--- +title: "ably integrations" +meta_description: "Manage Ably integrations with external services." +meta_keywords: "ably cli, cli, integrations, rules, webhooks, ably integrations" +--- + +Use the `ably integrations` command group to manage your Ably integrations with external services. These commands enable you to create, list, update, and delete integration rules. + +## Subcommands + +| Command | Description | +| ------- | ----------- | +| [`ably integrations create`](/docs/cli/integrations/create) | Create an integration rule. | +| [`ably integrations delete`](/docs/cli/integrations/delete) | Delete an integration rule. | +| [`ably integrations get`](/docs/cli/integrations/get) | Get an integration rule by ID. | +| [`ably integrations list`](/docs/cli/integrations/list) | List all integration rules. | +| [`ably integrations update`](/docs/cli/integrations/update) | Update an integration rule. | + +## See also + +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/integrations/list.mdx b/src/pages/docs/cli/integrations/list.mdx new file mode 100644 index 0000000000..eb76b4f87b --- /dev/null +++ b/src/pages/docs/cli/integrations/list.mdx @@ -0,0 +1,56 @@ +--- +title: "ably integrations list" +meta_description: "List all integration rules using the Ably CLI." +meta_keywords: "ably cli, cli, integrations, list, rules, ably integrations list" +--- + + +```shell +ably integrations list [flags] +``` + + +Use the `ably integrations list` command to list all integration rules for an application. + +## Flags + +You can optionally pass the following flags to the `ably integrations list` command: + +### `--app` + +The app ID to list integration rules for. If not specified, the currently selected app is used. + +### `--limit` + +The maximum number of integration rules to return. The default value is `100`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +List all integration rules: + + +```shell +ably integrations list +``` + + +List integration rules for a specific app: + + +```shell +ably integrations list --app aBcDe1 +``` + + +## See also + +* [Integrations](/docs/cli/integrations) — Explore all `ably integrations` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/integrations/update.mdx b/src/pages/docs/cli/integrations/update.mdx new file mode 100644 index 0000000000..3839fc45a8 --- /dev/null +++ b/src/pages/docs/cli/integrations/update.mdx @@ -0,0 +1,92 @@ +--- +title: "ably integrations update" +meta_description: "Update an integration rule using the Ably CLI." +meta_keywords: "ably cli, cli, integrations, update, rule, ably integrations update" +--- + + +```shell +ably integrations update [flags] +``` + + +Use the `ably integrations update` command to update an existing integration rule. + +## Arguments + +Pass the following arguments to the `ably integrations update` command: + +### `` + +The ID of the integration rule to update. This argument is required. + +## Flags + +You can optionally pass the following flags to the `ably integrations update` command: + +### `--app` + +The app ID that the integration rule belongs to. If not specified, the currently selected app is used. + +### `--channel-filter` + +Update the channel name filter for the integration rule. + +### `--request-mode` + +Update the request mode for the integration rule. Valid options are `single` or `batch`. + +### `--source` + +Update the source type for the integration rule. + +### `--status` + +Update the status of the integration rule. Valid options are `enabled` or `disabled`. + +### `--target` + +Update the target configuration for the integration rule. + +### `--target-url` + +Update the target URL for the integration rule. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Disable an integration rule: + + +```shell +ably integrations update aBcDe1 --status disabled +``` + + +Update the channel filter for an integration rule: + + +```shell +ably integrations update aBcDe1 --channel-filter "^notifications" +``` + + +Update the target URL for an integration rule: + + +```shell +ably integrations update aBcDe1 --target-url https://example.com/new-webhook +``` + + +## See also + +* [Integrations](/docs/cli/integrations) — Explore all `ably integrations` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/interactive.mdx b/src/pages/docs/cli/interactive.mdx new file mode 100644 index 0000000000..badc12b191 --- /dev/null +++ b/src/pages/docs/cli/interactive.mdx @@ -0,0 +1,39 @@ +--- +title: "ably interactive" +meta_description: "Launch an interactive Ably CLI shell." +meta_keywords: "ably cli, cli, interactive, shell, ably interactive" +--- + + +```shell +ably interactive +``` + + +Use the `ably interactive` command to launch an interactive shell for the Ably CLI. This provides a REPL-like experience where you can run Ably CLI commands without prefixing them with `ably`. + + + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Launch the interactive shell: + + +```shell +ably interactive +``` + + +## See also + +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/login.mdx b/src/pages/docs/cli/login.mdx new file mode 100644 index 0000000000..a94d1bff32 --- /dev/null +++ b/src/pages/docs/cli/login.mdx @@ -0,0 +1,69 @@ +--- +title: "ably login" +meta_description: "Log in to your Ably account using the CLI." +meta_keywords: "ably cli, cli, login, authentication, ably login" +--- + + +```shell +ably login [token] [flags] +``` + + +Use the `ably login` command to authenticate with your Ably account. + + + +## Arguments + +Pass the following arguments to the `ably login` command: + +### `[token]` + +The access token for your Ably account. + +If not provided, the CLI will prompt you to enter an access token, or open a browser window for you to obtain one from your Ably account. + +## Flags + +You can optionally pass the following flags to the `ably login` command: + +### `--alias | -a` + +An alias name for this account configuration. If not specified, this becomes the default account. + +### `--no-browser` + +Prevent the CLI from automatically opening a browser for authentication. Use this flag in headless environments. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Log in with interactive authentication: + + +```shell +ably login +``` + + +Log in with an alias for the account: + + +```shell +ably login --alias my-company +``` + + +## See also + +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/logs/channel-lifecycle/index.mdx b/src/pages/docs/cli/logs/channel-lifecycle/index.mdx new file mode 100644 index 0000000000..aa8fda8dc6 --- /dev/null +++ b/src/pages/docs/cli/logs/channel-lifecycle/index.mdx @@ -0,0 +1,18 @@ +--- +title: "ably logs channel-lifecycle" +meta_description: "Stream logs from the channel lifecycle meta channel using the Ably CLI." +meta_keywords: "ably cli, cli, logs, channel lifecycle, meta channel, ably logs channel-lifecycle" +--- + +Use the `ably logs channel-lifecycle` command group to stream logs from the channel lifecycle meta channel. + +## Subcommands + +| Command | Description | +| ------- | ----------- | +| [`ably logs channel-lifecycle subscribe`](/docs/cli/logs/channel-lifecycle/subscribe) | Subscribe to channel lifecycle events. | + +## See also + +* [Logs](/docs/cli/logs) — Explore all `ably logs` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/logs/channel-lifecycle/subscribe.mdx b/src/pages/docs/cli/logs/channel-lifecycle/subscribe.mdx new file mode 100644 index 0000000000..c7a27b319b --- /dev/null +++ b/src/pages/docs/cli/logs/channel-lifecycle/subscribe.mdx @@ -0,0 +1,60 @@ +--- +title: "ably logs channel-lifecycle subscribe" +meta_description: "Stream logs from the channel lifecycle meta channel using the Ably CLI." +meta_keywords: "ably cli, cli, logs, channel lifecycle, subscribe, meta channel, ably logs channel-lifecycle subscribe" +--- + + +```shell +ably logs channel-lifecycle subscribe [flags] +``` + + +Use the `ably logs channel-lifecycle subscribe` command to stream logs from the [meta]channel.lifecycle meta channel. + +## Flags + +You can optionally pass the following flags to the `ably logs channel-lifecycle subscribe` command: + +### `--rewind` + +The number of messages to rewind when subscribing. Defaults to `0`. + +### `--duration | -D` + +The duration in seconds to subscribe for before automatically unsubscribing. + +### `--client-id` + +A client ID to use when subscribing. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Subscribe to channel lifecycle events: + + +```shell +ably logs channel-lifecycle subscribe +``` + + +Subscribe with rewind to receive recent events: + + +```shell +ably logs channel-lifecycle subscribe --rewind 5 +``` + + +## See also + +* [Logs channel-lifecycle](/docs/cli/logs/channel-lifecycle) — Explore all `ably logs channel-lifecycle` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/logs/connection-lifecycle/history.mdx b/src/pages/docs/cli/logs/connection-lifecycle/history.mdx new file mode 100644 index 0000000000..bfd641cca3 --- /dev/null +++ b/src/pages/docs/cli/logs/connection-lifecycle/history.mdx @@ -0,0 +1,64 @@ +--- +title: "ably logs connection-lifecycle history" +meta_description: "Retrieve connection lifecycle log history using the Ably CLI." +meta_keywords: "ably cli, cli, logs, connection lifecycle, history, ably logs connection-lifecycle history" +--- + + +```shell +ably logs connection-lifecycle history [flags] +``` + + +Use the `ably logs connection-lifecycle history` command to retrieve connection lifecycle log history. + +## Flags + +You can optionally pass the following flags to the `ably logs connection-lifecycle history` command: + +### `--direction` + +The direction to retrieve logs in. Options are `backwards` or `forwards`. Defaults to `backwards`. + +### `--limit` + +The maximum number of log entries to retrieve. Defaults to `100`. + +### `--start` + +The start of the time range to retrieve logs from. Accepts ISO 8601, Unix milliseconds, or relative time formats. + +### `--end` + +The end of the time range to retrieve logs from. Accepts ISO 8601, Unix milliseconds, or relative time formats. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Retrieve recent connection lifecycle logs: + + +```shell +ably logs connection-lifecycle history +``` + + +Retrieve logs within a time range: + + +```shell +ably logs connection-lifecycle history --start "2025-01-01T00:00:00Z" --end "2025-01-02T00:00:00Z" +``` + + +## See also + +* [Logs connection-lifecycle](/docs/cli/logs/connection-lifecycle) — Explore all `ably logs connection-lifecycle` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/logs/connection-lifecycle/index.mdx b/src/pages/docs/cli/logs/connection-lifecycle/index.mdx new file mode 100644 index 0000000000..ffdea5c62d --- /dev/null +++ b/src/pages/docs/cli/logs/connection-lifecycle/index.mdx @@ -0,0 +1,19 @@ +--- +title: "ably logs connection-lifecycle" +meta_description: "Stream and retrieve connection lifecycle logs using the Ably CLI." +meta_keywords: "ably cli, cli, logs, connection lifecycle, subscribe, history, ably logs connection-lifecycle" +--- + +Use the `ably logs connection-lifecycle` command group to stream and retrieve connection lifecycle logs. + +## Subcommands + +| Command | Description | +| ------- | ----------- | +| [`ably logs connection-lifecycle subscribe`](/docs/cli/logs/connection-lifecycle/subscribe) | Subscribe to live connection lifecycle logs. | +| [`ably logs connection-lifecycle history`](/docs/cli/logs/connection-lifecycle/history) | Retrieve connection lifecycle log history. | + +## See also + +* [Logs](/docs/cli/logs) — Explore all `ably logs` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/logs/connection-lifecycle/subscribe.mdx b/src/pages/docs/cli/logs/connection-lifecycle/subscribe.mdx new file mode 100644 index 0000000000..9d9a13d461 --- /dev/null +++ b/src/pages/docs/cli/logs/connection-lifecycle/subscribe.mdx @@ -0,0 +1,60 @@ +--- +title: "ably logs connection-lifecycle subscribe" +meta_description: "Subscribe to live connection lifecycle logs using the Ably CLI." +meta_keywords: "ably cli, cli, logs, connection lifecycle, subscribe, ably logs connection-lifecycle subscribe" +--- + + +```shell +ably logs connection-lifecycle subscribe [flags] +``` + + +Use the `ably logs connection-lifecycle subscribe` command to subscribe to live connection lifecycle logs. + +## Flags + +You can optionally pass the following flags to the `ably logs connection-lifecycle subscribe` command: + +### `--rewind` + +The number of messages to rewind when subscribing. Defaults to `0`. + +### `--duration | -D` + +The duration in seconds to subscribe for before automatically unsubscribing. + +### `--client-id` + +A client ID to use when subscribing. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Subscribe to connection lifecycle logs: + + +```shell +ably logs connection-lifecycle subscribe +``` + + +Subscribe with rewind to receive recent logs: + + +```shell +ably logs connection-lifecycle subscribe --rewind 10 +``` + + +## See also + +* [Logs connection-lifecycle](/docs/cli/logs/connection-lifecycle) — Explore all `ably logs connection-lifecycle` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/logs/history.mdx b/src/pages/docs/cli/logs/history.mdx new file mode 100644 index 0000000000..0f6d4ae89a --- /dev/null +++ b/src/pages/docs/cli/logs/history.mdx @@ -0,0 +1,72 @@ +--- +title: "ably logs history" +meta_description: "Retrieve application log history using the Ably CLI." +meta_keywords: "ably cli, cli, logs, history, retrieve, ably logs history" +--- + + +```shell +ably logs history [flags] +``` + + +Use the `ably logs history` command to retrieve application log history. + +## Flags + +You can optionally pass the following flags to the `ably logs history` command: + +### `--direction` + +The direction to retrieve logs in. Options are `backwards` or `forwards`. Defaults to `backwards`. + +### `--limit` + +The maximum number of log entries to retrieve. Defaults to `100`. + +### `--start` + +The start of the time range to retrieve logs from. Accepts ISO 8601, Unix milliseconds, or relative time formats. + +### `--end` + +The end of the time range to retrieve logs from. Accepts ISO 8601, Unix milliseconds, or relative time formats. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Retrieve recent application logs: + + +```shell +ably logs history +``` + + +Retrieve logs within a time range: + + +```shell +ably logs history --start "2025-01-01T00:00:00Z" --end "2025-01-02T00:00:00Z" +``` + + +Retrieve logs in forwards direction: + + +```shell +ably logs history --direction forwards +``` + + +## See also + +* [Logs](/docs/cli/logs) — Explore all `ably logs` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/logs/index.mdx b/src/pages/docs/cli/logs/index.mdx new file mode 100644 index 0000000000..3dabc58a8f --- /dev/null +++ b/src/pages/docs/cli/logs/index.mdx @@ -0,0 +1,41 @@ +--- +title: "ably logs" +meta_description: "Stream and retrieve logs from Ably using the CLI." +meta_keywords: "ably cli, cli, logs, stream, subscribe, history, channel lifecycle, connection lifecycle, push, ably logs" +--- + +Use the `ably logs` command group to stream and retrieve logs from Ably. These commands enable you to subscribe to live logs, retrieve log history, and monitor channel lifecycle, connection lifecycle, and push notification events. + +## General + +| Command | Description | +| ------- | ----------- | +| [`ably logs subscribe`](/docs/cli/logs/subscribe) | Subscribe to live app logs. | +| [`ably logs history`](/docs/cli/logs/history) | Retrieve application log history. | + +## Channel lifecycle + +| Command | Description | +| ------- | ----------- | +| [`ably logs channel-lifecycle`](/docs/cli/logs/channel-lifecycle) | Stream logs from the channel lifecycle meta channel. | +| [`ably logs channel-lifecycle subscribe`](/docs/cli/logs/channel-lifecycle/subscribe) | Subscribe to channel lifecycle events. | + +## Connection lifecycle + +| Command | Description | +| ------- | ----------- | +| [`ably logs connection-lifecycle`](/docs/cli/logs/connection-lifecycle) | Stream and retrieve connection lifecycle logs. | +| [`ably logs connection-lifecycle subscribe`](/docs/cli/logs/connection-lifecycle/subscribe) | Subscribe to live connection lifecycle logs. | +| [`ably logs connection-lifecycle history`](/docs/cli/logs/connection-lifecycle/history) | Retrieve connection lifecycle log history. | + +## Push notifications + +| Command | Description | +| ------- | ----------- | +| [`ably logs push`](/docs/cli/logs/push) | Stream and retrieve push notification logs. | +| [`ably logs push subscribe`](/docs/cli/logs/push/subscribe) | Subscribe to push notification logs. | +| [`ably logs push history`](/docs/cli/logs/push/history) | Retrieve push notification log history. | + +## See also + +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/logs/push/history.mdx b/src/pages/docs/cli/logs/push/history.mdx new file mode 100644 index 0000000000..03c5cf9943 --- /dev/null +++ b/src/pages/docs/cli/logs/push/history.mdx @@ -0,0 +1,64 @@ +--- +title: "ably logs push history" +meta_description: "Retrieve push notification log history using the Ably CLI." +meta_keywords: "ably cli, cli, logs, push, history, notifications, ably logs push history" +--- + + +```shell +ably logs push history [flags] +``` + + +Use the `ably logs push history` command to retrieve push notification log history. + +## Flags + +You can optionally pass the following flags to the `ably logs push history` command: + +### `--direction` + +The direction to retrieve logs in. Options are `backwards` or `forwards`. Defaults to `backwards`. + +### `--limit` + +The maximum number of log entries to retrieve. Defaults to `100`. + +### `--start` + +The start of the time range to retrieve logs from. Accepts ISO 8601, Unix milliseconds, or relative time formats. + +### `--end` + +The end of the time range to retrieve logs from. Accepts ISO 8601, Unix milliseconds, or relative time formats. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Retrieve recent push notification logs: + + +```shell +ably logs push history +``` + + +Retrieve logs within a time range: + + +```shell +ably logs push history --start "2025-01-01T00:00:00Z" --end "2025-01-02T00:00:00Z" +``` + + +## See also + +* [Logs push](/docs/cli/logs/push) — Explore all `ably logs push` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/logs/push/index.mdx b/src/pages/docs/cli/logs/push/index.mdx new file mode 100644 index 0000000000..94b2668abb --- /dev/null +++ b/src/pages/docs/cli/logs/push/index.mdx @@ -0,0 +1,19 @@ +--- +title: "ably logs push" +meta_description: "Stream and retrieve push notification logs using the Ably CLI." +meta_keywords: "ably cli, cli, logs, push, notifications, subscribe, history, ably logs push" +--- + +Use the `ably logs push` command group to stream and retrieve push notification logs. + +## Subcommands + +| Command | Description | +| ------- | ----------- | +| [`ably logs push subscribe`](/docs/cli/logs/push/subscribe) | Subscribe to push notification logs. | +| [`ably logs push history`](/docs/cli/logs/push/history) | Retrieve push notification log history. | + +## See also + +* [Logs](/docs/cli/logs) — Explore all `ably logs` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/logs/push/subscribe.mdx b/src/pages/docs/cli/logs/push/subscribe.mdx new file mode 100644 index 0000000000..52a32e985a --- /dev/null +++ b/src/pages/docs/cli/logs/push/subscribe.mdx @@ -0,0 +1,60 @@ +--- +title: "ably logs push subscribe" +meta_description: "Stream logs from the push notifications meta channel using the Ably CLI." +meta_keywords: "ably cli, cli, logs, push, subscribe, notifications, meta channel, ably logs push subscribe" +--- + + +```shell +ably logs push subscribe [flags] +``` + + +Use the `ably logs push subscribe` command to stream logs from the push notifications meta channel. + +## Flags + +You can optionally pass the following flags to the `ably logs push subscribe` command: + +### `--rewind` + +The number of messages to rewind when subscribing. Defaults to `0`. + +### `--duration | -D` + +The duration in seconds to subscribe for before automatically unsubscribing. + +### `--client-id` + +A client ID to use when subscribing. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Subscribe to push notification logs: + + +```shell +ably logs push subscribe +``` + + +Subscribe with rewind to receive recent logs: + + +```shell +ably logs push subscribe --rewind 5 +``` + + +## See also + +* [Logs push](/docs/cli/logs/push) — Explore all `ably logs push` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/logs/subscribe.mdx b/src/pages/docs/cli/logs/subscribe.mdx new file mode 100644 index 0000000000..67e6ca01b8 --- /dev/null +++ b/src/pages/docs/cli/logs/subscribe.mdx @@ -0,0 +1,72 @@ +--- +title: "ably logs subscribe" +meta_description: "Subscribe to live app logs using the Ably CLI." +meta_keywords: "ably cli, cli, logs, subscribe, stream, live, ably logs subscribe" +--- + + +```shell +ably logs subscribe [flags] +``` + + +Use the `ably logs subscribe` command to subscribe to live app logs. + +## Flags + +You can optionally pass the following flags to the `ably logs subscribe` command: + +### `--type` + +Filter logs by type. Options are `channel.lifecycle`, `channel.occupancy`, `channel.presence`, `connection.lifecycle`, and `push.publish`. + +### `--duration | -D` + +The duration in seconds to subscribe for before automatically unsubscribing. + +### `--rewind` + +The number of messages to rewind when subscribing. Defaults to `0`. + +### `--client-id` + +A client ID to use when subscribing. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Subscribe to all app logs: + + +```shell +ably logs subscribe +``` + + +Filter by log type: + + +```shell +ably logs subscribe --type channel.lifecycle +``` + + +Subscribe with rewind to receive recent logs: + + +```shell +ably logs subscribe --rewind 10 +``` + + +## See also + +* [Logs](/docs/cli/logs) — Explore all `ably logs` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/push/batch-publish.mdx b/src/pages/docs/cli/push/batch-publish.mdx new file mode 100644 index 0000000000..22f584408b --- /dev/null +++ b/src/pages/docs/cli/push/batch-publish.mdx @@ -0,0 +1,68 @@ +--- +title: "ably push batch-publish" +meta_description: "Publish push notifications to multiple recipients in a batch using the Ably CLI." +meta_keywords: "ably cli, cli, push, batch-publish, notifications, batch, ably push batch-publish" +--- + + +```shell +ably push batch-publish [payload] [flags] +``` + + +Use the `ably push batch-publish` command to publish push notifications to multiple recipients in a batch. + +## Arguments + +Pass the following arguments to the `ably push batch-publish` command: + +### `[payload]` + +A JSON array of push notification payloads. This can be provided as an inline JSON string, a file path, or `-` to read from stdin. + +## Flags + +You can optionally pass the following flags to the `ably push batch-publish` command: + +### `--force | -f` + +Skip confirmation when publishing to channels. Required when using `--json`. The default is `false`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Publish with an inline JSON payload: + + +```shell +ably push batch-publish '[{"recipient":{"deviceId":"device1"},"notification":{"title":"Hello"}},{"recipient":{"clientId":"user1"},"notification":{"title":"Hi"}}]' +``` + + +Publish from a file: + + +```shell +ably push batch-publish @notifications.json +``` + + +Publish from stdin: + + +```shell +cat notifications.json | ably push batch-publish - +``` + + +## See also + +* [Push](/docs/cli/push) — Explore all `ably push` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/push/channels/index.mdx b/src/pages/docs/cli/push/channels/index.mdx new file mode 100644 index 0000000000..0a9f031b71 --- /dev/null +++ b/src/pages/docs/cli/push/channels/index.mdx @@ -0,0 +1,22 @@ +--- +title: "ably push channels" +meta_description: "Manage push notification channel subscriptions using the Ably CLI." +meta_keywords: "ably cli, cli, push, channels, subscriptions, ably push channels" +--- + +Use the `ably push channels` command group to manage push notification channel subscriptions. + +## Subcommands + +| Command | Description | +| ------- | ----------- | +| [`ably push channels list`](/docs/cli/push/channels/list) | List push channel subscriptions. | +| [`ably push channels list-channels`](/docs/cli/push/channels/list-channels) | List channels with push subscriptions. | +| [`ably push channels save`](/docs/cli/push/channels/save) | Subscribe a device or client to push notifications on a channel. | +| [`ably push channels remove`](/docs/cli/push/channels/remove) | Remove a push channel subscription. | +| [`ably push channels remove-where`](/docs/cli/push/channels/remove-where) | Remove push channel subscriptions matching filter criteria. | + +## See also + +* [Push](/docs/cli/push) — Explore all `ably push` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/push/channels/list-channels.mdx b/src/pages/docs/cli/push/channels/list-channels.mdx new file mode 100644 index 0000000000..d3d409c7ce --- /dev/null +++ b/src/pages/docs/cli/push/channels/list-channels.mdx @@ -0,0 +1,44 @@ +--- +title: "ably push channels list-channels" +meta_description: "List channels with push subscriptions using the Ably CLI." +meta_keywords: "ably cli, cli, push, channels, list-channels, subscriptions, ably push channels list-channels" +--- + + +```shell +ably push channels list-channels [flags] +``` + + +Use the `ably push channels list-channels` command to list channels with push subscriptions. + +## Flags + +You can optionally pass the following flags to the `ably push channels list-channels` command: + +### `--limit` + +The maximum number of channels to retrieve. Defaults to `100`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +List channels with push subscriptions: + + +```shell +ably push channels list-channels +``` + + +## See also + +* [Push channels](/docs/cli/push/channels) — Explore all `ably push channels` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/push/channels/list.mdx b/src/pages/docs/cli/push/channels/list.mdx new file mode 100644 index 0000000000..a7a6bd51a4 --- /dev/null +++ b/src/pages/docs/cli/push/channels/list.mdx @@ -0,0 +1,64 @@ +--- +title: "ably push channels list" +meta_description: "List push channel subscriptions using the Ably CLI." +meta_keywords: "ably cli, cli, push, channels, list, subscriptions, ably push channels list" +--- + + +```shell +ably push channels list --channel [flags] +``` + + +Use the `ably push channels list` command to list push channel subscriptions. + +## Flags + +You can optionally pass the following flags to the `ably push channels list` command: + +### `--channel` + +The channel to list subscriptions for. Required. + +### `--device-id` + +Filter subscriptions by device ID. + +### `--client-id` + +Filter subscriptions by client ID. + +### `--limit` + +The maximum number of subscriptions to retrieve. Defaults to `100`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +List all subscriptions for a channel: + + +```shell +ably push channels list --channel my-channel +``` + + +Filter subscriptions by device: + + +```shell +ably push channels list --channel my-channel --device-id "device123" +``` + + +## See also + +* [Push channels](/docs/cli/push/channels) — Explore all `ably push channels` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/push/channels/remove-where.mdx b/src/pages/docs/cli/push/channels/remove-where.mdx new file mode 100644 index 0000000000..5fc9ca795b --- /dev/null +++ b/src/pages/docs/cli/push/channels/remove-where.mdx @@ -0,0 +1,64 @@ +--- +title: "ably push channels remove-where" +meta_description: "Remove push channel subscriptions matching filter criteria using the Ably CLI." +meta_keywords: "ably cli, cli, push, channels, remove-where, filter, ably push channels remove-where" +--- + + +```shell +ably push channels remove-where --channel [flags] +``` + + +Use the `ably push channels remove-where` command to remove push channel subscriptions matching filter criteria. + +## Flags + +You can optionally pass the following flags to the `ably push channels remove-where` command: + +### `--channel` + +The channel to remove subscriptions from. Required. + +### `--device-id` + +Filter subscriptions by device ID. + +### `--client-id` + +Filter subscriptions by client ID. + +### `--force | -f` + +Skip confirmation prompt. Required when using `--json`. The default is `false`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Remove all subscriptions for a device on a channel: + + +```shell +ably push channels remove-where --channel my-channel --device-id "device123" +``` + + +Remove all subscriptions for a client on a channel: + + +```shell +ably push channels remove-where --channel my-channel --client-id "user456" +``` + + +## See also + +* [Push channels](/docs/cli/push/channels) — Explore all `ably push channels` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/push/channels/remove.mdx b/src/pages/docs/cli/push/channels/remove.mdx new file mode 100644 index 0000000000..2610f07692 --- /dev/null +++ b/src/pages/docs/cli/push/channels/remove.mdx @@ -0,0 +1,64 @@ +--- +title: "ably push channels remove" +meta_description: "Remove a push channel subscription using the Ably CLI." +meta_keywords: "ably cli, cli, push, channels, remove, unsubscribe, ably push channels remove" +--- + + +```shell +ably push channels remove --channel [flags] +``` + + +Use the `ably push channels remove` command to remove a push channel subscription. + +## Flags + +You can optionally pass the following flags to the `ably push channels remove` command: + +### `--channel` + +The channel to remove the subscription from. Required. + +### `--device-id` + +The device ID to unsubscribe. Exclusive with `--client-id`. + +### `--client-id` + +The client ID to unsubscribe. Exclusive with `--device-id`. + +### `--force | -f` + +Skip confirmation prompt. Required when using `--json`. The default is `false`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Remove a device subscription from a channel: + + +```shell +ably push channels remove --channel my-channel --device-id "device123" +``` + + +Remove a client subscription from a channel: + + +```shell +ably push channels remove --channel my-channel --client-id "user456" +``` + + +## See also + +* [Push channels](/docs/cli/push/channels) — Explore all `ably push channels` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/push/channels/save.mdx b/src/pages/docs/cli/push/channels/save.mdx new file mode 100644 index 0000000000..1a679d49ae --- /dev/null +++ b/src/pages/docs/cli/push/channels/save.mdx @@ -0,0 +1,60 @@ +--- +title: "ably push channels save" +meta_description: "Subscribe a device or client to push notifications on a channel using the Ably CLI." +meta_keywords: "ably cli, cli, push, channels, save, subscribe, device, client, ably push channels save" +--- + + +```shell +ably push channels save --channel [flags] +``` + + +Use the `ably push channels save` command to subscribe a device or client to push notifications on a channel. + +## Flags + +You can optionally pass the following flags to the `ably push channels save` command: + +### `--channel` + +The channel to subscribe to. Required. + +### `--device-id` + +The device ID to subscribe. Exclusive with `--client-id`. + +### `--client-id` + +The client ID to subscribe. Exclusive with `--device-id`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Subscribe a device to push notifications on a channel: + + +```shell +ably push channels save --channel my-channel --device-id "device123" +``` + + +Subscribe a client to push notifications on a channel: + + +```shell +ably push channels save --channel my-channel --client-id "user456" +``` + + +## See also + +* [Push channels](/docs/cli/push/channels) — Explore all `ably push channels` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/push/config/clear-apns.mdx b/src/pages/docs/cli/push/config/clear-apns.mdx new file mode 100644 index 0000000000..63d6ccc23f --- /dev/null +++ b/src/pages/docs/cli/push/config/clear-apns.mdx @@ -0,0 +1,56 @@ +--- +title: "ably push config clear-apns" +meta_description: "Clear APNs push notification configuration for an Ably app using the CLI." +meta_keywords: "ably cli, cli, push, config, clear-apns, apns, apple, ably push config clear-apns" +--- + + +```shell +ably push config clear-apns [flags] +``` + + +Use the `ably push config clear-apns` command to clear APNs push notification configuration for an app. + +## Flags + +You can optionally pass the following flags to the `ably push config clear-apns` command: + +### `--app` + +The app ID to clear configuration for. + +### `--force | -f` + +Skip confirmation prompt. Required when using `--json`. The default is `false`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Clear APNs configuration with confirmation: + + +```shell +ably push config clear-apns +``` + + +Force clear APNs configuration: + + +```shell +ably push config clear-apns --force +``` + + +## See also + +* [Push config](/docs/cli/push/config) — Explore all `ably push config` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/push/config/clear-fcm.mdx b/src/pages/docs/cli/push/config/clear-fcm.mdx new file mode 100644 index 0000000000..08231f1aef --- /dev/null +++ b/src/pages/docs/cli/push/config/clear-fcm.mdx @@ -0,0 +1,56 @@ +--- +title: "ably push config clear-fcm" +meta_description: "Clear FCM push notification configuration for an Ably app using the CLI." +meta_keywords: "ably cli, cli, push, config, clear-fcm, fcm, firebase, ably push config clear-fcm" +--- + + +```shell +ably push config clear-fcm [flags] +``` + + +Use the `ably push config clear-fcm` command to clear FCM push notification configuration for an app. + +## Flags + +You can optionally pass the following flags to the `ably push config clear-fcm` command: + +### `--app` + +The app ID to clear configuration for. + +### `--force | -f` + +Skip confirmation prompt. Required when using `--json`. The default is `false`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Clear FCM configuration with confirmation: + + +```shell +ably push config clear-fcm +``` + + +Force clear FCM configuration: + + +```shell +ably push config clear-fcm --force +``` + + +## See also + +* [Push config](/docs/cli/push/config) — Explore all `ably push config` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/push/config/index.mdx b/src/pages/docs/cli/push/config/index.mdx new file mode 100644 index 0000000000..d8630bef5d --- /dev/null +++ b/src/pages/docs/cli/push/config/index.mdx @@ -0,0 +1,22 @@ +--- +title: "ably push config" +meta_description: "Manage push notification configuration using the Ably CLI." +meta_keywords: "ably cli, cli, push, config, configuration, apns, fcm, ably push config" +--- + +Use the `ably push config` command group to manage push notification configuration. + +## Subcommands + +| Command | Description | +| ------- | ----------- | +| [`ably push config show`](/docs/cli/push/config/show) | Show push notification configuration for an app. | +| [`ably push config set-apns`](/docs/cli/push/config/set-apns) | Configure APNs push notifications for an app. | +| [`ably push config set-fcm`](/docs/cli/push/config/set-fcm) | Configure FCM push notifications for an app. | +| [`ably push config clear-apns`](/docs/cli/push/config/clear-apns) | Clear APNs push notification configuration for an app. | +| [`ably push config clear-fcm`](/docs/cli/push/config/clear-fcm) | Clear FCM push notification configuration for an app. | + +## See also + +* [Push](/docs/cli/push) — Explore all `ably push` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/push/config/set-apns.mdx b/src/pages/docs/cli/push/config/set-apns.mdx new file mode 100644 index 0000000000..eb6d620d65 --- /dev/null +++ b/src/pages/docs/cli/push/config/set-apns.mdx @@ -0,0 +1,80 @@ +--- +title: "ably push config set-apns" +meta_description: "Configure APNs push notifications for an Ably app using the CLI." +meta_keywords: "ably cli, cli, push, config, set-apns, apns, apple, ios, ably push config set-apns" +--- + + +```shell +ably push config set-apns [flags] +``` + + +Use the `ably push config set-apns` command to configure APNs push notifications for an app. + +## Flags + +You can optionally pass the following flags to the `ably push config set-apns` command: + +### `--app` + +The app ID to configure. + +### `--certificate` + +The path to a P12 certificate file. Exclusive with `--key-file`. + +### `--key-file` + +The path to a P8 key file. Exclusive with `--certificate`. + +### `--key-id` + +The key ID for the P8 key. Required when using `--key-file`. + +### `--password` + +The password for the P12 certificate. + +### `--sandbox` + +Use the APNs sandbox environment. Defaults to `false`. + +### `--team-id` + +The Apple Developer team ID. Required when using `--key-file`. + +### `--topic` + +The bundle ID for the app. Required when using `--key-file`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Configure APNs with a P12 certificate: + + +```shell +ably push config set-apns --certificate /path/to/cert.p12 --password "cert-password" +``` + + +Configure APNs with a P8 key: + + +```shell +ably push config set-apns --key-file /path/to/key.p8 --key-id "ABC123" --team-id "TEAM456" --topic "com.example.app" +``` + + +## See also + +* [Push config](/docs/cli/push/config) — Explore all `ably push config` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/push/config/set-fcm.mdx b/src/pages/docs/cli/push/config/set-fcm.mdx new file mode 100644 index 0000000000..8d96567522 --- /dev/null +++ b/src/pages/docs/cli/push/config/set-fcm.mdx @@ -0,0 +1,48 @@ +--- +title: "ably push config set-fcm" +meta_description: "Configure FCM push notifications for an Ably app using the CLI." +meta_keywords: "ably cli, cli, push, config, set-fcm, fcm, firebase, android, ably push config set-fcm" +--- + + +```shell +ably push config set-fcm --service-account [flags] +``` + + +Use the `ably push config set-fcm` command to configure FCM push notifications for an app. + +## Flags + +You can optionally pass the following flags to the `ably push config set-fcm` command: + +### `--app` + +The app ID to configure. + +### `--service-account` + +The path to the FCM service account JSON file. Required. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Configure FCM with a service account: + + +```shell +ably push config set-fcm --service-account /path/to/service-account.json +``` + + +## See also + +* [Push config](/docs/cli/push/config) — Explore all `ably push config` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/push/config/show.mdx b/src/pages/docs/cli/push/config/show.mdx new file mode 100644 index 0000000000..413c3605a9 --- /dev/null +++ b/src/pages/docs/cli/push/config/show.mdx @@ -0,0 +1,52 @@ +--- +title: "ably push config show" +meta_description: "Show push notification configuration for an Ably app using the CLI." +meta_keywords: "ably cli, cli, push, config, show, configuration, ably push config show" +--- + + +```shell +ably push config show [flags] +``` + + +Use the `ably push config show` command to show push notification configuration for an app. + +## Flags + +You can optionally pass the following flags to the `ably push config show` command: + +### `--app` + +The app ID to show configuration for. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Show push configuration for the current app: + + +```shell +ably push config show +``` + + +Show push configuration for a specific app: + + +```shell +ably push config show --app "app-id" +``` + + +## See also + +* [Push config](/docs/cli/push/config) — Explore all `ably push config` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/push/devices/get.mdx b/src/pages/docs/cli/push/devices/get.mdx new file mode 100644 index 0000000000..d579ab8783 --- /dev/null +++ b/src/pages/docs/cli/push/devices/get.mdx @@ -0,0 +1,44 @@ +--- +title: "ably push devices get" +meta_description: "Get details of a push device registration using the Ably CLI." +meta_keywords: "ably cli, cli, push, devices, get, registration, details, ably push devices get" +--- + + +```shell +ably push devices get +``` + + +Use the `ably push devices get` command to get details of a push device registration. + +## Arguments + +Pass the following arguments to the `ably push devices get` command: + +### `` + +The ID of the device to retrieve details for. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Get details of a device registration: + + +```shell +ably push devices get "device123" +``` + + +## See also + +* [Push devices](/docs/cli/push/devices) — Explore all `ably push devices` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/push/devices/index.mdx b/src/pages/docs/cli/push/devices/index.mdx new file mode 100644 index 0000000000..8ef7bcf556 --- /dev/null +++ b/src/pages/docs/cli/push/devices/index.mdx @@ -0,0 +1,22 @@ +--- +title: "ably push devices" +meta_description: "Manage push notification device registrations using the Ably CLI." +meta_keywords: "ably cli, cli, push, devices, registrations, ably push devices" +--- + +Use the `ably push devices` command group to manage push notification device registrations. + +## Subcommands + +| Command | Description | +| ------- | ----------- | +| [`ably push devices list`](/docs/cli/push/devices/list) | List push device registrations. | +| [`ably push devices get`](/docs/cli/push/devices/get) | Get details of a push device registration. | +| [`ably push devices save`](/docs/cli/push/devices/save) | Register or update a push device. | +| [`ably push devices remove`](/docs/cli/push/devices/remove) | Remove a push device registration. | +| [`ably push devices remove-where`](/docs/cli/push/devices/remove-where) | Remove push device registrations matching filter criteria. | + +## See also + +* [Push](/docs/cli/push) — Explore all `ably push` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/push/devices/list.mdx b/src/pages/docs/cli/push/devices/list.mdx new file mode 100644 index 0000000000..d9b43ac7dc --- /dev/null +++ b/src/pages/docs/cli/push/devices/list.mdx @@ -0,0 +1,64 @@ +--- +title: "ably push devices list" +meta_description: "List push device registrations using the Ably CLI." +meta_keywords: "ably cli, cli, push, devices, list, registrations, ably push devices list" +--- + + +```shell +ably push devices list [flags] +``` + + +Use the `ably push devices list` command to list push device registrations. + +## Flags + +You can optionally pass the following flags to the `ably push devices list` command: + +### `--device-id` + +Filter registrations by device ID. + +### `--client-id` + +Filter registrations by client ID. + +### `--state` + +Filter registrations by state. Options are `ACTIVE`, `FAILING`, and `FAILED`. + +### `--limit` + +The maximum number of registrations to retrieve. Defaults to `100`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +List all device registrations: + + +```shell +ably push devices list +``` + + +Filter by state: + + +```shell +ably push devices list --state ACTIVE +``` + + +## See also + +* [Push devices](/docs/cli/push/devices) — Explore all `ably push devices` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/push/devices/remove-where.mdx b/src/pages/docs/cli/push/devices/remove-where.mdx new file mode 100644 index 0000000000..bfda9990aa --- /dev/null +++ b/src/pages/docs/cli/push/devices/remove-where.mdx @@ -0,0 +1,60 @@ +--- +title: "ably push devices remove-where" +meta_description: "Remove push device registrations matching filter criteria using the Ably CLI." +meta_keywords: "ably cli, cli, push, devices, remove-where, filter, ably push devices remove-where" +--- + + +```shell +ably push devices remove-where [flags] +``` + + +Use the `ably push devices remove-where` command to remove push device registrations matching filter criteria. + +## Flags + +You can optionally pass the following flags to the `ably push devices remove-where` command: + +### `--device-id` + +Filter registrations by device ID. + +### `--client-id` + +Filter registrations by client ID. + +### `--force | -f` + +Skip confirmation prompt. Required when using `--json`. The default is `false`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Remove registrations by device ID: + + +```shell +ably push devices remove-where --device-id "device123" +``` + + +Remove registrations by client ID: + + +```shell +ably push devices remove-where --client-id "user456" +``` + + +## See also + +* [Push devices](/docs/cli/push/devices) — Explore all `ably push devices` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/push/devices/remove.mdx b/src/pages/docs/cli/push/devices/remove.mdx new file mode 100644 index 0000000000..ae0d964585 --- /dev/null +++ b/src/pages/docs/cli/push/devices/remove.mdx @@ -0,0 +1,60 @@ +--- +title: "ably push devices remove" +meta_description: "Remove a push device registration using the Ably CLI." +meta_keywords: "ably cli, cli, push, devices, remove, unregister, ably push devices remove" +--- + + +```shell +ably push devices remove [flags] +``` + + +Use the `ably push devices remove` command to remove a push device registration. + +## Arguments + +Pass the following arguments to the `ably push devices remove` command: + +### `` + +The ID of the device to remove. + +## Flags + +You can optionally pass the following flags to the `ably push devices remove` command: + +### `--force | -f` + +Skip confirmation prompt. Required when using `--json`. The default is `false`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Remove a device registration: + + +```shell +ably push devices remove "device123" +``` + + +Force remove without confirmation: + + +```shell +ably push devices remove "device123" --force +``` + + +## See also + +* [Push devices](/docs/cli/push/devices) — Explore all `ably push devices` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/push/devices/save.mdx b/src/pages/docs/cli/push/devices/save.mdx new file mode 100644 index 0000000000..def6c4f724 --- /dev/null +++ b/src/pages/docs/cli/push/devices/save.mdx @@ -0,0 +1,100 @@ +--- +title: "ably push devices save" +meta_description: "Register or update a push device using the Ably CLI." +meta_keywords: "ably cli, cli, push, devices, save, register, update, ably push devices save" +--- + + +```shell +ably push devices save [flags] +``` + + +Use the `ably push devices save` command to register or update a push device. + +## Flags + +You can optionally pass the following flags to the `ably push devices save` command: + +### `--id` + +The device ID. Required unless `--data` is provided. + +### `--platform` + +The device platform. Options are `ios`, `android`, and `browser`. + +### `--form-factor` + +The device form factor. Options are `phone`, `tablet`, `desktop`, `tv`, `watch`, `car`, `embedded`, and `other`. + +### `--transport-type` + +The push transport type. Options are `apns`, `fcm`, and `web`. + +### `--device-token` + +The device token for APNs or FCM. Required when transport type is `apns` or `fcm`. + +### `--target-url` + +The target URL for web push. Required when transport type is `web`. + +### `--p256dh-key` + +The P-256 Diffie-Hellman key for web push. Required when transport type is `web`. + +### `--auth-secret` + +The authentication secret for web push. Required when transport type is `web`. + +### `--client-id` + +The client ID to associate with the device. + +### `--metadata` + +Device metadata as a JSON string. + +### `--data` + +Full device registration JSON, or a file path prefixed with `@`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Register an iOS device: + + +```shell +ably push devices save --id "device-001" --platform ios --form-factor phone --transport-type apns --device-token "token123" --client-id "user456" +``` + + +Register a web push device: + + +```shell +ably push devices save --platform browser --form-factor desktop --transport-type web --target-url "https://example.com/push" --p256dh-key "key123" --auth-secret "secret456" +``` + + +Register a device from a JSON file: + + +```shell +ably push devices save --data @device.json +``` + + +## See also + +* [Push devices](/docs/cli/push/devices) — Explore all `ably push devices` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/push/index.mdx b/src/pages/docs/cli/push/index.mdx new file mode 100644 index 0000000000..04f1e728bb --- /dev/null +++ b/src/pages/docs/cli/push/index.mdx @@ -0,0 +1,51 @@ +--- +title: "ably push" +meta_description: "Manage push notifications using the Ably CLI." +meta_keywords: "ably cli, cli, push, notifications, publish, devices, channels, config, ably push" +--- + +Use the `ably push` command group to manage push notifications. These commands enable you to publish notifications, manage channel subscriptions, configure push services, and manage device registrations. + +## Publishing + +| Command | Description | +| ------- | ----------- | +| [`ably push publish`](/docs/cli/push/publish) | Publish a push notification to a device, client, or channel. | +| [`ably push batch-publish`](/docs/cli/push/batch-publish) | Publish push notifications to multiple recipients in a batch. | + +## Channel subscriptions + +| Command | Description | +| ------- | ----------- | +| [`ably push channels`](/docs/cli/push/channels) | Manage push notification channel subscriptions. | +| [`ably push channels list`](/docs/cli/push/channels/list) | List push channel subscriptions. | +| [`ably push channels list-channels`](/docs/cli/push/channels/list-channels) | List channels with push subscriptions. | +| [`ably push channels save`](/docs/cli/push/channels/save) | Subscribe a device or client to push notifications on a channel. | +| [`ably push channels remove`](/docs/cli/push/channels/remove) | Remove a push channel subscription. | +| [`ably push channels remove-where`](/docs/cli/push/channels/remove-where) | Remove push channel subscriptions matching filter criteria. | + +## Configuration + +| Command | Description | +| ------- | ----------- | +| [`ably push config`](/docs/cli/push/config) | Manage push notification configuration. | +| [`ably push config show`](/docs/cli/push/config/show) | Show push notification configuration for an app. | +| [`ably push config set-apns`](/docs/cli/push/config/set-apns) | Configure APNs push notifications for an app. | +| [`ably push config set-fcm`](/docs/cli/push/config/set-fcm) | Configure FCM push notifications for an app. | +| [`ably push config clear-apns`](/docs/cli/push/config/clear-apns) | Clear APNs push notification configuration for an app. | +| [`ably push config clear-fcm`](/docs/cli/push/config/clear-fcm) | Clear FCM push notification configuration for an app. | + +## Device registrations + +| Command | Description | +| ------- | ----------- | +| [`ably push devices`](/docs/cli/push/devices) | Manage push notification device registrations. | +| [`ably push devices list`](/docs/cli/push/devices/list) | List push device registrations. | +| [`ably push devices get`](/docs/cli/push/devices/get) | Get details of a push device registration. | +| [`ably push devices save`](/docs/cli/push/devices/save) | Register or update a push device. | +| [`ably push devices remove`](/docs/cli/push/devices/remove) | Remove a push device registration. | +| [`ably push devices remove-where`](/docs/cli/push/devices/remove-where) | Remove push device registrations matching filter criteria. | + +## See also + +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/push/publish.mdx b/src/pages/docs/cli/push/publish.mdx new file mode 100644 index 0000000000..1e7b504970 --- /dev/null +++ b/src/pages/docs/cli/push/publish.mdx @@ -0,0 +1,132 @@ +--- +title: "ably push publish" +meta_description: "Publish a push notification to a device, client, or channel using the Ably CLI." +meta_keywords: "ably cli, cli, push, publish, notification, device, client, channel, ably push publish" +--- + + +```shell +ably push publish [flags] +``` + + +Use the `ably push publish` command to publish a push notification to a device, client, or channel. + +## Flags + +You can optionally pass the following flags to the `ably push publish` command: + +### `--device-id` + +The ID of the device to publish to. Exclusive with `--client-id` and `--recipient`. + +### `--client-id` + +The client ID to publish to. Exclusive with `--device-id` and `--recipient`. + +### `--recipient` + +A raw JSON recipient object. Exclusive with `--device-id` and `--client-id`. + +### `--channel` + +The target channel name. Publishes a push notification via the channel using `extras.push`. Ignored if `--device-id`, `--client-id`, or `--recipient` is also provided. + +### `--title` + +The title of the push notification. + +### `--body` + +The body text of the push notification. + +### `--sound` + +The sound to play when the notification is received. + +### `--icon` + +The icon for the push notification. + +### `--badge` + +The badge number to display on the app icon. + +### `--data` + +A JSON payload to include with the push notification. + +### `--collapse-key` + +A collapse key for grouping notifications. + +### `--ttl` + +The time-to-live for the notification in seconds. + +### `--payload` + +A full JSON payload for the push notification, provided as a JSON string or a file path. Overrides convenience flags such as `--title` and `--body`. + +### `--apns` + +APNs-specific JSON configuration. + +### `--fcm` + +FCM-specific JSON configuration. + +### `--web` + +Web push-specific JSON configuration. + +### `--force | -f` + +Skip confirmation prompt. Required when using `--json`. The default is `false`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Publish a push notification to a device: + + +```shell +ably push publish --device-id "device123" --title "Hello" --body "World" +``` + + +Publish a push notification to a client: + + +```shell +ably push publish --client-id "user456" --title "Update" --body "New content available" +``` + + +Publish a push notification to a channel: + + +```shell +ably push publish --channel "announcements" --title "News" --body "Breaking update" --force +``` + + +Publish with a custom payload: + + +```shell +ably push publish --device-id "device123" --payload '{"notification":{"title":"Custom","body":"Payload"},"data":{"key":"value"}}' +``` + + +## See also + +* [Push](/docs/cli/push) — Explore all `ably push` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/queues/create.mdx b/src/pages/docs/cli/queues/create.mdx new file mode 100644 index 0000000000..4317163966 --- /dev/null +++ b/src/pages/docs/cli/queues/create.mdx @@ -0,0 +1,76 @@ +--- +title: "ably queues create" +meta_description: "Create a queue using the Ably CLI." +meta_keywords: "ably cli, cli, queues, create, message queue, ably queues create" +--- + + +```shell +ably queues create --name [flags] +``` + + +Use the `ably queues create` command to create a new queue for your Ably application. + +## Flags + +You can pass the following flags to the `ably queues create` command: + +### `--name` + +The name of the queue to create. This flag is required. + +### `--app` + +The app ID to create the queue for. If not specified, the currently selected app is used. + +### `--max-length` + +The maximum number of messages the queue can hold. The default value is `10000`. + +### `--region` + +The region to create the queue in. The default value is `us-east-1-a`. + +### `--ttl` + +The time-to-live for messages in the queue, in seconds. The default value is `60`. The maximum value is `3600`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Create a queue: + + +```shell +ably queues create --name "my-queue" +``` + + +Create a queue with custom settings: + + +```shell +ably queues create --name "my-queue" --max-length 5000 --ttl 300 +``` + + +Create a queue in a specific region: + + +```shell +ably queues create --name "my-queue" --region eu-west-1-a +``` + + +## See also + +* [Queues](/docs/cli/queues) — Explore all `ably queues` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/queues/delete.mdx b/src/pages/docs/cli/queues/delete.mdx new file mode 100644 index 0000000000..b75f9777e1 --- /dev/null +++ b/src/pages/docs/cli/queues/delete.mdx @@ -0,0 +1,64 @@ +--- +title: "ably queues delete" +meta_description: "Delete a queue using the Ably CLI." +meta_keywords: "ably cli, cli, queues, delete, message queue, ably queues delete" +--- + + +```shell +ably queues delete [flags] +``` + + +Use the `ably queues delete` command to delete a queue. + +## Arguments + +Pass the following arguments to the `ably queues delete` command: + +### `` + +The ID of the queue to delete. This argument is required. + +## Flags + +You can optionally pass the following flags to the `ably queues delete` command: + +### `--app` + +The app ID that the queue belongs to. If not specified, the currently selected app is used. + +### `--force | -f` + +Skip the confirmation prompt and delete the queue immediately. Required when using `--json`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Delete a queue: + + +```shell +ably queues delete aBcDe1 +``` + + +Delete a queue without a confirmation prompt: + + +```shell +ably queues delete aBcDe1 --force +``` + + +## See also + +* [Queues](/docs/cli/queues) — Explore all `ably queues` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/queues/index.mdx b/src/pages/docs/cli/queues/index.mdx new file mode 100644 index 0000000000..835701bb0d --- /dev/null +++ b/src/pages/docs/cli/queues/index.mdx @@ -0,0 +1,19 @@ +--- +title: "ably queues" +meta_description: "Manage Ably queues." +meta_keywords: "ably cli, cli, queues, message queues, ably queues" +--- + +Use the `ably queues` command group to manage your Ably queues. These commands enable you to create, list, and delete queues for your applications. + +## Subcommands + +| Command | Description | +| ------- | ----------- | +| [`ably queues create`](/docs/cli/queues/create) | Create a queue. | +| [`ably queues delete`](/docs/cli/queues/delete) | Delete a queue. | +| [`ably queues list`](/docs/cli/queues/list) | List all queues. | + +## See also + +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/queues/list.mdx b/src/pages/docs/cli/queues/list.mdx new file mode 100644 index 0000000000..ad234f1f4c --- /dev/null +++ b/src/pages/docs/cli/queues/list.mdx @@ -0,0 +1,56 @@ +--- +title: "ably queues list" +meta_description: "List all queues using the Ably CLI." +meta_keywords: "ably cli, cli, queues, list, message queues, ably queues list" +--- + + +```shell +ably queues list [flags] +``` + + +Use the `ably queues list` command to list all queues for an application. + +## Flags + +You can optionally pass the following flags to the `ably queues list` command: + +### `--app` + +The app ID to list queues for. If not specified, the currently selected app is used. + +### `--limit` + +The maximum number of queues to return. The default value is `100`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +List all queues: + + +```shell +ably queues list +``` + + +List all queues in JSON format: + + +```shell +ably queues list --json +``` + + +## See also + +* [Queues](/docs/cli/queues) — Explore all `ably queues` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/rooms/index.mdx b/src/pages/docs/cli/rooms/index.mdx new file mode 100644 index 0000000000..07bff21270 --- /dev/null +++ b/src/pages/docs/cli/rooms/index.mdx @@ -0,0 +1,70 @@ +--- +title: "ably rooms" +meta_description: "Interact with Ably Chat rooms using the CLI." +meta_keywords: "ably cli, cli, rooms, chat, messages, presence, occupancy, reactions, typing, ably rooms" +--- + +Use the `ably rooms` command group to interact with Ably Chat rooms. These commands enable you to manage rooms, send and subscribe to messages, monitor occupancy, manage presence, send reactions, and work with typing indicators. + +## Room management + +| Command | Description | +| ------- | ----------- | +| [`ably rooms list`](/docs/cli/rooms/list) | List active chat rooms. | + +## Messages + +| Command | Description | +| ------- | ----------- | +| [`ably rooms messages`](/docs/cli/rooms/messages) | Commands for working with chat messages in rooms. | +| [`ably rooms messages send`](/docs/cli/rooms/messages/send) | Send a message to a chat room. | +| [`ably rooms messages subscribe`](/docs/cli/rooms/messages/subscribe) | Subscribe to messages in one or more chat rooms. | +| [`ably rooms messages history`](/docs/cli/rooms/messages/history) | Get historical messages from a chat room. | +| [`ably rooms messages update`](/docs/cli/rooms/messages/update) | Update a message in a chat room. | +| [`ably rooms messages delete`](/docs/cli/rooms/messages/delete) | Delete a message in a chat room. | + +## Message reactions + +| Command | Description | +| ------- | ----------- | +| [`ably rooms messages reactions`](/docs/cli/rooms/messages/reactions) | Commands for working with message reactions. | +| [`ably rooms messages reactions send`](/docs/cli/rooms/messages/reactions/send) | Send a reaction to a message. | +| [`ably rooms messages reactions subscribe`](/docs/cli/rooms/messages/reactions/subscribe) | Subscribe to message reactions. | +| [`ably rooms messages reactions remove`](/docs/cli/rooms/messages/reactions/remove) | Remove a reaction from a message. | + +## Occupancy + +| Command | Description | +| ------- | ----------- | +| [`ably rooms occupancy`](/docs/cli/rooms/occupancy) | Commands for monitoring room occupancy. | +| [`ably rooms occupancy get`](/docs/cli/rooms/occupancy/get) | Get current occupancy metrics for a room. | +| [`ably rooms occupancy subscribe`](/docs/cli/rooms/occupancy/subscribe) | Subscribe to real-time occupancy metrics. | + +## Presence + +| Command | Description | +| ------- | ----------- | +| [`ably rooms presence`](/docs/cli/rooms/presence) | Commands for working with presence in chat rooms. | +| [`ably rooms presence enter`](/docs/cli/rooms/presence/enter) | Enter presence in a chat room. | +| [`ably rooms presence get`](/docs/cli/rooms/presence/get) | Get current presence members in a chat room. | +| [`ably rooms presence subscribe`](/docs/cli/rooms/presence/subscribe) | Subscribe to presence events in a chat room. | + +## Room reactions + +| Command | Description | +| ------- | ----------- | +| [`ably rooms reactions`](/docs/cli/rooms/reactions) | Commands for working with room-level reactions. | +| [`ably rooms reactions send`](/docs/cli/rooms/reactions/send) | Send a reaction in a chat room. | +| [`ably rooms reactions subscribe`](/docs/cli/rooms/reactions/subscribe) | Subscribe to reactions in a chat room. | + +## Typing indicators + +| Command | Description | +| ------- | ----------- | +| [`ably rooms typing`](/docs/cli/rooms/typing) | Commands for working with typing indicators. | +| [`ably rooms typing keystroke`](/docs/cli/rooms/typing/keystroke) | Send a typing indicator in a chat room. | +| [`ably rooms typing subscribe`](/docs/cli/rooms/typing/subscribe) | Subscribe to typing indicators in a chat room. | + +## See also + +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/rooms/list.mdx b/src/pages/docs/cli/rooms/list.mdx new file mode 100644 index 0000000000..7442d33a9c --- /dev/null +++ b/src/pages/docs/cli/rooms/list.mdx @@ -0,0 +1,56 @@ +--- +title: "ably rooms list" +meta_description: "List active Ably Chat rooms using the CLI." +meta_keywords: "ably cli, cli, rooms, list, chat, ably rooms list" +--- + + +```shell +ably rooms list [flags] +``` + + +Use the `ably rooms list` command to list active chat rooms. + +## Flags + +You can optionally pass the following flags to the `ably rooms list` command: + +### `--limit` + +The maximum number of rooms to return. Defaults to `100`. + +### `--prefix | -p` + +Filter rooms by a name prefix. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +List all active chat rooms: + + +```shell +ably rooms list +``` + + +Filter rooms by prefix: + + +```shell +ably rooms list --prefix "game-" +``` + + +## See also + +* [Rooms](/docs/cli/rooms) — Explore all `ably rooms` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/rooms/messages/delete.mdx b/src/pages/docs/cli/rooms/messages/delete.mdx new file mode 100644 index 0000000000..554753bfdd --- /dev/null +++ b/src/pages/docs/cli/rooms/messages/delete.mdx @@ -0,0 +1,68 @@ +--- +title: "ably rooms messages delete" +meta_description: "Delete a message in an Ably Chat room using the CLI." +meta_keywords: "ably cli, cli, rooms, messages, delete, chat, ably rooms messages delete" +--- + + +```shell +ably rooms messages delete [flags] +``` + + +Use the `ably rooms messages delete` command to delete a message in an Ably Chat room. + +## Arguments + +Pass the following arguments to the `ably rooms messages delete` command: + +### `` + +The name of the chat room containing the message. + +### `` + +The serial identifier of the message to delete. + +## Flags + +You can optionally pass the following flags to the `ably rooms messages delete` command: + +### `--description` + +A description of the reason for deleting the message. + +### `--client-id` + +A client ID to use when deleting the message. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Delete a message: + + +```shell +ably rooms messages delete my-room "01a2b3c4d5@1234567890000-0" +``` + + +Delete a message with a description: + + +```shell +ably rooms messages delete my-room "01a2b3c4d5@1234567890000-0" --description "Removed inappropriate content" +``` + + +## See also + +* [Rooms messages](/docs/cli/rooms/messages) — Explore all `ably rooms messages` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/rooms/messages/history.mdx b/src/pages/docs/cli/rooms/messages/history.mdx new file mode 100644 index 0000000000..9c25976508 --- /dev/null +++ b/src/pages/docs/cli/rooms/messages/history.mdx @@ -0,0 +1,92 @@ +--- +title: "ably rooms messages history" +meta_description: "Get historical messages from an Ably Chat room using the CLI." +meta_keywords: "ably cli, cli, rooms, messages, history, chat, ably rooms messages history" +--- + + +```shell +ably rooms messages history [flags] +``` + + +Use the `ably rooms messages history` command to get historical messages from an Ably Chat room. + +## Arguments + +Pass the following arguments to the `ably rooms messages history` command: + +### `` + +The name of the chat room to retrieve history from. + +## Flags + +You can optionally pass the following flags to the `ably rooms messages history` command: + +### `--limit | -l` + +The maximum number of messages to return. Defaults to `50`. + +### `--order` + +The order in which to return messages. Options are `newestFirst` or `oldestFirst`. Defaults to `newestFirst`. + +### `--show-metadata` + +Display metadata attached to messages. Defaults to `false`. + +### `--start` + +The start of the time range to query. Accepts ISO 8601, Unix timestamp, or relative time formats. + +### `--end` + +The end of the time range to query. Accepts ISO 8601, Unix timestamp, or relative time formats. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Get recent message history for a room: + + +```shell +ably rooms messages history my-room +``` + + +Get history with a limit: + + +```shell +ably rooms messages history my-room --limit 10 +``` + + +Get history within a time range: + + +```shell +ably rooms messages history my-room --start "2025-01-01T00:00:00Z" --end "2025-01-02T00:00:00Z" +``` + + +Get history in oldest-first order: + + +```shell +ably rooms messages history my-room --order oldestFirst +``` + + +## See also + +* [Rooms messages](/docs/cli/rooms/messages) — Explore all `ably rooms messages` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/rooms/messages/index.mdx b/src/pages/docs/cli/rooms/messages/index.mdx new file mode 100644 index 0000000000..cdeb1d1955 --- /dev/null +++ b/src/pages/docs/cli/rooms/messages/index.mdx @@ -0,0 +1,22 @@ +--- +title: "ably rooms messages" +meta_description: "Commands for working with chat messages in Ably Chat rooms using the CLI." +meta_keywords: "ably cli, cli, rooms, messages, chat, send, subscribe, history, ably rooms messages" +--- + +Use the `ably rooms messages` command group to work with chat messages in rooms. + +## Subcommands + +| Command | Description | +| ------- | ----------- | +| [`ably rooms messages send`](/docs/cli/rooms/messages/send) | Send a message to a chat room. | +| [`ably rooms messages subscribe`](/docs/cli/rooms/messages/subscribe) | Subscribe to messages in one or more chat rooms. | +| [`ably rooms messages history`](/docs/cli/rooms/messages/history) | Get historical messages from a chat room. | +| [`ably rooms messages update`](/docs/cli/rooms/messages/update) | Update a message in a chat room. | +| [`ably rooms messages delete`](/docs/cli/rooms/messages/delete) | Delete a message in a chat room. | + +## See also + +* [Rooms](/docs/cli/rooms) — Explore all `ably rooms` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/rooms/messages/reactions/index.mdx b/src/pages/docs/cli/rooms/messages/reactions/index.mdx new file mode 100644 index 0000000000..76615d5356 --- /dev/null +++ b/src/pages/docs/cli/rooms/messages/reactions/index.mdx @@ -0,0 +1,20 @@ +--- +title: "ably rooms messages reactions" +meta_description: "Commands for working with message reactions in Ably Chat rooms using the CLI." +meta_keywords: "ably cli, cli, rooms, messages, reactions, chat, ably rooms messages reactions" +--- + +Use the `ably rooms messages reactions` command group to work with message reactions in chat rooms. + +## Subcommands + +| Command | Description | +| ------- | ----------- | +| [`ably rooms messages reactions send`](/docs/cli/rooms/messages/reactions/send) | Send a reaction to a message. | +| [`ably rooms messages reactions subscribe`](/docs/cli/rooms/messages/reactions/subscribe) | Subscribe to message reactions. | +| [`ably rooms messages reactions remove`](/docs/cli/rooms/messages/reactions/remove) | Remove a reaction from a message. | + +## See also + +* [Rooms messages](/docs/cli/rooms/messages) — Explore all `ably rooms messages` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/rooms/messages/reactions/remove.mdx b/src/pages/docs/cli/rooms/messages/reactions/remove.mdx new file mode 100644 index 0000000000..01735af531 --- /dev/null +++ b/src/pages/docs/cli/rooms/messages/reactions/remove.mdx @@ -0,0 +1,72 @@ +--- +title: "ably rooms messages reactions remove" +meta_description: "Remove a reaction from a message in an Ably Chat room using the CLI." +meta_keywords: "ably cli, cli, rooms, messages, reactions, remove, chat, ably rooms messages reactions remove" +--- + + +```shell +ably rooms messages reactions remove [flags] +``` + + +Use the `ably rooms messages reactions remove` command to remove a reaction from a message in a chat room. + +## Arguments + +Pass the following arguments to the `ably rooms messages reactions remove` command: + +### `` + +The name of the chat room containing the message. + +### `` + +The serial identifier of the message to remove the reaction from. + +### `` + +The emoji reaction to remove. + +## Flags + +You can optionally pass the following flags to the `ably rooms messages reactions remove` command: + +### `--type` + +The type of reaction to remove. Options are `unique`, `distinct`, or `multiple`. + +### `--client-id` + +A client ID to use when removing the reaction. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Remove a reaction from a message: + + +```shell +ably rooms messages reactions remove my-room "01a2b3c4d5@1234567890000-0" "thumbsup" +``` + + +Remove a reaction with a specific type: + + +```shell +ably rooms messages reactions remove my-room "01a2b3c4d5@1234567890000-0" "heart" --type unique +``` + + +## See also + +* [Rooms messages reactions](/docs/cli/rooms/messages/reactions) — Explore all `ably rooms messages reactions` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/rooms/messages/reactions/send.mdx b/src/pages/docs/cli/rooms/messages/reactions/send.mdx new file mode 100644 index 0000000000..3b3aa94b18 --- /dev/null +++ b/src/pages/docs/cli/rooms/messages/reactions/send.mdx @@ -0,0 +1,84 @@ +--- +title: "ably rooms messages reactions send" +meta_description: "Send a reaction to a message in an Ably Chat room using the CLI." +meta_keywords: "ably cli, cli, rooms, messages, reactions, send, chat, ably rooms messages reactions send" +--- + + +```shell +ably rooms messages reactions send [flags] +``` + + +Use the `ably rooms messages reactions send` command to send a reaction to a message in a chat room. + +## Arguments + +Pass the following arguments to the `ably rooms messages reactions send` command: + +### `` + +The name of the chat room containing the message. + +### `` + +The serial identifier of the message to react to. + +### `` + +The emoji reaction to send. + +## Flags + +You can optionally pass the following flags to the `ably rooms messages reactions send` command: + +### `--type` + +The type of reaction. Options are `unique`, `distinct`, or `multiple`. + +### `--count` + +The number of reactions to send. Only applicable when `--type` is set to `multiple`. + +### `--client-id` + +A client ID to use when sending the reaction. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Send a reaction to a message: + + +```shell +ably rooms messages reactions send my-room "01a2b3c4d5@1234567890000-0" "thumbsup" +``` + + +Send a reaction with a specific type: + + +```shell +ably rooms messages reactions send my-room "01a2b3c4d5@1234567890000-0" "heart" --type unique +``` + + +Send multiple reactions: + + +```shell +ably rooms messages reactions send my-room "01a2b3c4d5@1234567890000-0" "clap" --type multiple --count 5 +``` + + +## See also + +* [Rooms messages reactions](/docs/cli/rooms/messages/reactions) — Explore all `ably rooms messages reactions` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/rooms/messages/reactions/subscribe.mdx b/src/pages/docs/cli/rooms/messages/reactions/subscribe.mdx new file mode 100644 index 0000000000..72fc32ae79 --- /dev/null +++ b/src/pages/docs/cli/rooms/messages/reactions/subscribe.mdx @@ -0,0 +1,68 @@ +--- +title: "ably rooms messages reactions subscribe" +meta_description: "Subscribe to message reactions in an Ably Chat room using the CLI." +meta_keywords: "ably cli, cli, rooms, messages, reactions, subscribe, chat, ably rooms messages reactions subscribe" +--- + + +```shell +ably rooms messages reactions subscribe [flags] +``` + + +Use the `ably rooms messages reactions subscribe` command to subscribe to message reactions in a chat room. + +## Arguments + +Pass the following arguments to the `ably rooms messages reactions subscribe` command: + +### `` + +The name of the chat room to subscribe to message reactions in. + +## Flags + +You can optionally pass the following flags to the `ably rooms messages reactions subscribe` command: + +### `--raw` + +Get raw events instead of summaries. Defaults to `false`. + +### `--duration | -D` + +The duration in seconds to subscribe for before automatically unsubscribing. + +### `--client-id` + +A client ID to use for the subscription. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Subscribe to message reactions in a room: + + +```shell +ably rooms messages reactions subscribe my-room +``` + + +Subscribe and get raw events: + + +```shell +ably rooms messages reactions subscribe my-room --raw +``` + + +## See also + +* [Rooms messages reactions](/docs/cli/rooms/messages/reactions) — Explore all `ably rooms messages reactions` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/rooms/messages/send.mdx b/src/pages/docs/cli/rooms/messages/send.mdx new file mode 100644 index 0000000000..c593492e5c --- /dev/null +++ b/src/pages/docs/cli/rooms/messages/send.mdx @@ -0,0 +1,88 @@ +--- +title: "ably rooms messages send" +meta_description: "Send a message to an Ably Chat room using the CLI." +meta_keywords: "ably cli, cli, rooms, messages, send, chat, ably rooms messages send" +--- + + +```shell +ably rooms messages send [flags] +``` + + +Use the `ably rooms messages send` command to send a message to an Ably Chat room. + + + +## Arguments + +Pass the following arguments to the `ably rooms messages send` command: + +### `` + +The name of the chat room to send the message to. + +### `` + +The text content of the message. + +## Flags + +You can optionally pass the following flags to the `ably rooms messages send` command: + +### `--count | -c` + +The number of messages to send. Defaults to `1`. + +### `--delay | -d` + +The delay between messages in milliseconds when sending multiple messages. Defaults to `40`. + +### `--metadata` + +A JSON string of metadata to attach to the message. + +### `--client-id` + +A client ID to use when sending the message. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Send a message to a chat room: + + +```shell +ably rooms messages send my-room "Hello, world!" +``` + + +Send multiple messages with interpolation: + + +```shell +ably rooms messages send my-room "Message {{.Count}} at {{.Timestamp}}" --count 10 +``` + + +Send a message with metadata: + + +```shell +ably rooms messages send my-room "Hello" --metadata '{"priority": "high"}' +``` + + +## See also + +* [Rooms messages](/docs/cli/rooms/messages) — Explore all `ably rooms messages` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/rooms/messages/subscribe.mdx b/src/pages/docs/cli/rooms/messages/subscribe.mdx new file mode 100644 index 0000000000..4b000d23c3 --- /dev/null +++ b/src/pages/docs/cli/rooms/messages/subscribe.mdx @@ -0,0 +1,80 @@ +--- +title: "ably rooms messages subscribe" +meta_description: "Subscribe to messages in one or more Ably Chat rooms using the CLI." +meta_keywords: "ably cli, cli, rooms, messages, subscribe, chat, ably rooms messages subscribe" +--- + + +```shell +ably rooms messages subscribe [flags] +``` + + +Use the `ably rooms messages subscribe` command to subscribe to messages in one or more Ably Chat rooms. + +## Arguments + +Pass the following arguments to the `ably rooms messages subscribe` command: + +### `` + +The names of the chat rooms to subscribe to. + +## Flags + +You can optionally pass the following flags to the `ably rooms messages subscribe` command: + +### `--show-metadata` + +Display metadata attached to messages. Defaults to `false`. + +### `--duration | -D` + +The duration in seconds to subscribe for before automatically unsubscribing. + +### `--sequence-numbers` + +Display sequence numbers for messages. Defaults to `false`. + +### `--client-id` + +A client ID to use for the subscription. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Subscribe to messages in a single room: + + +```shell +ably rooms messages subscribe my-room +``` + + +Subscribe to messages in multiple rooms: + + +```shell +ably rooms messages subscribe my-room another-room +``` + + +Subscribe and show metadata: + + +```shell +ably rooms messages subscribe my-room --show-metadata +``` + + +## See also + +* [Rooms messages](/docs/cli/rooms/messages) — Explore all `ably rooms messages` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/rooms/messages/update.mdx b/src/pages/docs/cli/rooms/messages/update.mdx new file mode 100644 index 0000000000..4c3aa18a8f --- /dev/null +++ b/src/pages/docs/cli/rooms/messages/update.mdx @@ -0,0 +1,88 @@ +--- +title: "ably rooms messages update" +meta_description: "Update a message in an Ably Chat room using the CLI." +meta_keywords: "ably cli, cli, rooms, messages, update, chat, ably rooms messages update" +--- + + +```shell +ably rooms messages update [flags] +``` + + +Use the `ably rooms messages update` command to update a message in an Ably Chat room. + +## Arguments + +Pass the following arguments to the `ably rooms messages update` command: + +### `` + +The name of the chat room containing the message. + +### `` + +The serial identifier of the message to update. + +### `` + +The new text content for the message. + +## Flags + +You can optionally pass the following flags to the `ably rooms messages update` command: + +### `--description` + +A description of the update. + +### `--headers` + +A JSON string of headers to attach to the update. + +### `--metadata` + +A JSON string of metadata to attach to the updated message. + +### `--client-id` + +A client ID to use when updating the message. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Update a message: + + +```shell +ably rooms messages update my-room "01a2b3c4d5@1234567890000-0" "Updated message text" +``` + + +Update a message with a description: + + +```shell +ably rooms messages update my-room "01a2b3c4d5@1234567890000-0" "Fixed typo" --description "Corrected spelling" +``` + + +Update a message with metadata: + + +```shell +ably rooms messages update my-room "01a2b3c4d5@1234567890000-0" "Edited message" --metadata '{"edited": true}' +``` + + +## See also + +* [Rooms messages](/docs/cli/rooms/messages) — Explore all `ably rooms messages` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/rooms/occupancy/get.mdx b/src/pages/docs/cli/rooms/occupancy/get.mdx new file mode 100644 index 0000000000..78d251a1b6 --- /dev/null +++ b/src/pages/docs/cli/rooms/occupancy/get.mdx @@ -0,0 +1,56 @@ +--- +title: "ably rooms occupancy get" +meta_description: "Get current occupancy metrics for an Ably Chat room using the CLI." +meta_keywords: "ably cli, cli, rooms, occupancy, get, chat, metrics, ably rooms occupancy get" +--- + + +```shell +ably rooms occupancy get [flags] +``` + + +Use the `ably rooms occupancy get` command to get the current occupancy metrics for a chat room. + +## Arguments + +Pass the following arguments to the `ably rooms occupancy get` command: + +### `` + +The name of the chat room to get occupancy for. + +## Flags + +You can optionally pass the following flags to the `ably rooms occupancy get` command: + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Get current occupancy for a room: + + +```shell +ably rooms occupancy get my-room +``` + + +Get occupancy in JSON format: + + +```shell +ably rooms occupancy get my-room --json +``` + + +## See also + +* [Rooms occupancy](/docs/cli/rooms/occupancy) — Explore all `ably rooms occupancy` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/rooms/occupancy/index.mdx b/src/pages/docs/cli/rooms/occupancy/index.mdx new file mode 100644 index 0000000000..8ad35d417a --- /dev/null +++ b/src/pages/docs/cli/rooms/occupancy/index.mdx @@ -0,0 +1,19 @@ +--- +title: "ably rooms occupancy" +meta_description: "Commands for monitoring room occupancy in Ably Chat using the CLI." +meta_keywords: "ably cli, cli, rooms, occupancy, chat, metrics, ably rooms occupancy" +--- + +Use the `ably rooms occupancy` command group to monitor room occupancy in chat rooms. + +## Subcommands + +| Command | Description | +| ------- | ----------- | +| [`ably rooms occupancy get`](/docs/cli/rooms/occupancy/get) | Get current occupancy metrics for a room. | +| [`ably rooms occupancy subscribe`](/docs/cli/rooms/occupancy/subscribe) | Subscribe to real-time occupancy metrics for a room. | + +## See also + +* [Rooms](/docs/cli/rooms) — Explore all `ably rooms` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/rooms/occupancy/subscribe.mdx b/src/pages/docs/cli/rooms/occupancy/subscribe.mdx new file mode 100644 index 0000000000..70af4fd7b8 --- /dev/null +++ b/src/pages/docs/cli/rooms/occupancy/subscribe.mdx @@ -0,0 +1,64 @@ +--- +title: "ably rooms occupancy subscribe" +meta_description: "Subscribe to real-time occupancy metrics for an Ably Chat room using the CLI." +meta_keywords: "ably cli, cli, rooms, occupancy, subscribe, chat, metrics, ably rooms occupancy subscribe" +--- + + +```shell +ably rooms occupancy subscribe [flags] +``` + + +Use the `ably rooms occupancy subscribe` command to subscribe to real-time occupancy metrics for a chat room. + +## Arguments + +Pass the following arguments to the `ably rooms occupancy subscribe` command: + +### `` + +The name of the chat room to subscribe to occupancy metrics for. + +## Flags + +You can optionally pass the following flags to the `ably rooms occupancy subscribe` command: + +### `--duration | -D` + +The duration in seconds to subscribe for before automatically unsubscribing. + +### `--client-id` + +A client ID to use for the subscription. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Subscribe to occupancy metrics for a room: + + +```shell +ably rooms occupancy subscribe my-room +``` + + +Subscribe for a specific duration: + + +```shell +ably rooms occupancy subscribe my-room --duration 60 +``` + + +## See also + +* [Rooms occupancy](/docs/cli/rooms/occupancy) — Explore all `ably rooms occupancy` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/rooms/presence/enter.mdx b/src/pages/docs/cli/rooms/presence/enter.mdx new file mode 100644 index 0000000000..fceed09fff --- /dev/null +++ b/src/pages/docs/cli/rooms/presence/enter.mdx @@ -0,0 +1,84 @@ +--- +title: "ably rooms presence enter" +meta_description: "Enter presence in an Ably Chat room using the CLI." +meta_keywords: "ably cli, cli, rooms, presence, enter, chat, ably rooms presence enter" +--- + + +```shell +ably rooms presence enter [flags] +``` + + +Use the `ably rooms presence enter` command to enter presence in a chat room and remain present until terminated. + +## Arguments + +Pass the following arguments to the `ably rooms presence enter` command: + +### `` + +The name of the chat room to enter presence in. + +## Flags + +You can optionally pass the following flags to the `ably rooms presence enter` command: + +### `--data` + +A JSON string of data to associate with the presence member. + +### `--show-others` + +Display presence events from other members while present. Defaults to `false`. + +### `--duration | -D` + +The duration in seconds to remain present before automatically leaving. + +### `--sequence-numbers` + +Display sequence numbers for presence events. Defaults to `false`. + +### `--client-id` + +A client ID to use when entering presence. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Enter presence in a room: + + +```shell +ably rooms presence enter my-room +``` + + +Enter presence with data: + + +```shell +ably rooms presence enter my-room --data '{"status": "online", "name": "Alice"}' +``` + + +Enter presence and show other members' events: + + +```shell +ably rooms presence enter my-room --show-others +``` + + +## See also + +* [Rooms presence](/docs/cli/rooms/presence) — Explore all `ably rooms presence` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/rooms/presence/get.mdx b/src/pages/docs/cli/rooms/presence/get.mdx new file mode 100644 index 0000000000..d20fe0c6bf --- /dev/null +++ b/src/pages/docs/cli/rooms/presence/get.mdx @@ -0,0 +1,60 @@ +--- +title: "ably rooms presence get" +meta_description: "Get current presence members in an Ably Chat room using the CLI." +meta_keywords: "ably cli, cli, rooms, presence, get, chat, members, ably rooms presence get" +--- + + +```shell +ably rooms presence get [flags] +``` + + +Use the `ably rooms presence get` command to get all current presence members in a chat room. + +## Arguments + +Pass the following arguments to the `ably rooms presence get` command: + +### `` + +The name of the chat room to get presence members for. + +## Flags + +You can optionally pass the following flags to the `ably rooms presence get` command: + +### `--limit` + +The maximum number of presence members to return. Defaults to `100`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Get all presence members in a room: + + +```shell +ably rooms presence get my-room +``` + + +Get presence members with a limit: + + +```shell +ably rooms presence get my-room --limit 10 +``` + + +## See also + +* [Rooms presence](/docs/cli/rooms/presence) — Explore all `ably rooms presence` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/rooms/presence/index.mdx b/src/pages/docs/cli/rooms/presence/index.mdx new file mode 100644 index 0000000000..e3d7b9784d --- /dev/null +++ b/src/pages/docs/cli/rooms/presence/index.mdx @@ -0,0 +1,20 @@ +--- +title: "ably rooms presence" +meta_description: "Commands for working with presence in Ably Chat rooms using the CLI." +meta_keywords: "ably cli, cli, rooms, presence, chat, members, ably rooms presence" +--- + +Use the `ably rooms presence` command group to work with presence in chat rooms. + +## Subcommands + +| Command | Description | +| ------- | ----------- | +| [`ably rooms presence enter`](/docs/cli/rooms/presence/enter) | Enter presence in a chat room. | +| [`ably rooms presence get`](/docs/cli/rooms/presence/get) | Get current presence members in a chat room. | +| [`ably rooms presence subscribe`](/docs/cli/rooms/presence/subscribe) | Subscribe to presence events in a chat room. | + +## See also + +* [Rooms](/docs/cli/rooms) — Explore all `ably rooms` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/rooms/presence/subscribe.mdx b/src/pages/docs/cli/rooms/presence/subscribe.mdx new file mode 100644 index 0000000000..a18ccecb46 --- /dev/null +++ b/src/pages/docs/cli/rooms/presence/subscribe.mdx @@ -0,0 +1,64 @@ +--- +title: "ably rooms presence subscribe" +meta_description: "Subscribe to presence events in an Ably Chat room using the CLI." +meta_keywords: "ably cli, cli, rooms, presence, subscribe, chat, events, ably rooms presence subscribe" +--- + + +```shell +ably rooms presence subscribe [flags] +``` + + +Use the `ably rooms presence subscribe` command to subscribe to presence events in a chat room. + +## Arguments + +Pass the following arguments to the `ably rooms presence subscribe` command: + +### `` + +The name of the chat room to subscribe to presence events in. + +## Flags + +You can optionally pass the following flags to the `ably rooms presence subscribe` command: + +### `--duration | -D` + +The duration in seconds to subscribe for before automatically unsubscribing. + +### `--client-id` + +A client ID to use for the subscription. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Subscribe to presence events in a room: + + +```shell +ably rooms presence subscribe my-room +``` + + +Subscribe for a specific duration: + + +```shell +ably rooms presence subscribe my-room --duration 120 +``` + + +## See also + +* [Rooms presence](/docs/cli/rooms/presence) — Explore all `ably rooms presence` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/rooms/reactions/index.mdx b/src/pages/docs/cli/rooms/reactions/index.mdx new file mode 100644 index 0000000000..b63cdf6857 --- /dev/null +++ b/src/pages/docs/cli/rooms/reactions/index.mdx @@ -0,0 +1,19 @@ +--- +title: "ably rooms reactions" +meta_description: "Commands for working with room-level reactions in Ably Chat using the CLI." +meta_keywords: "ably cli, cli, rooms, reactions, chat, emoji, ably rooms reactions" +--- + +Use the `ably rooms reactions` command group to work with room-level reactions in chat rooms. + +## Subcommands + +| Command | Description | +| ------- | ----------- | +| [`ably rooms reactions send`](/docs/cli/rooms/reactions/send) | Send a reaction in a chat room. | +| [`ably rooms reactions subscribe`](/docs/cli/rooms/reactions/subscribe) | Subscribe to reactions in a chat room. | + +## See also + +* [Rooms](/docs/cli/rooms) — Explore all `ably rooms` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/rooms/reactions/send.mdx b/src/pages/docs/cli/rooms/reactions/send.mdx new file mode 100644 index 0000000000..c5b5002d86 --- /dev/null +++ b/src/pages/docs/cli/rooms/reactions/send.mdx @@ -0,0 +1,68 @@ +--- +title: "ably rooms reactions send" +meta_description: "Send a reaction in an Ably Chat room using the CLI." +meta_keywords: "ably cli, cli, rooms, reactions, send, chat, emoji, ably rooms reactions send" +--- + + +```shell +ably rooms reactions send [flags] +``` + + +Use the `ably rooms reactions send` command to send a reaction in a chat room. + +## Arguments + +Pass the following arguments to the `ably rooms reactions send` command: + +### `` + +The name of the chat room to send the reaction in. + +### `` + +The emoji reaction to send. + +## Flags + +You can optionally pass the following flags to the `ably rooms reactions send` command: + +### `--metadata` + +A JSON string of metadata to attach to the reaction. + +### `--client-id` + +A client ID to use when sending the reaction. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Send a reaction in a room: + + +```shell +ably rooms reactions send my-room "heart" +``` + + +Send a reaction with metadata: + + +```shell +ably rooms reactions send my-room "thumbsup" --metadata '{"context": "great idea"}' +``` + + +## See also + +* [Rooms reactions](/docs/cli/rooms/reactions) — Explore all `ably rooms reactions` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/rooms/reactions/subscribe.mdx b/src/pages/docs/cli/rooms/reactions/subscribe.mdx new file mode 100644 index 0000000000..6fb41539bf --- /dev/null +++ b/src/pages/docs/cli/rooms/reactions/subscribe.mdx @@ -0,0 +1,64 @@ +--- +title: "ably rooms reactions subscribe" +meta_description: "Subscribe to reactions in an Ably Chat room using the CLI." +meta_keywords: "ably cli, cli, rooms, reactions, subscribe, chat, emoji, ably rooms reactions subscribe" +--- + + +```shell +ably rooms reactions subscribe [flags] +``` + + +Use the `ably rooms reactions subscribe` command to subscribe to reactions in a chat room. + +## Arguments + +Pass the following arguments to the `ably rooms reactions subscribe` command: + +### `` + +The name of the chat room to subscribe to reactions in. + +## Flags + +You can optionally pass the following flags to the `ably rooms reactions subscribe` command: + +### `--duration | -D` + +The duration in seconds to subscribe for before automatically unsubscribing. + +### `--client-id` + +A client ID to use for the subscription. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Subscribe to reactions in a room: + + +```shell +ably rooms reactions subscribe my-room +``` + + +Subscribe for a specific duration: + + +```shell +ably rooms reactions subscribe my-room --duration 60 +``` + + +## See also + +* [Rooms reactions](/docs/cli/rooms/reactions) — Explore all `ably rooms reactions` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/rooms/typing/index.mdx b/src/pages/docs/cli/rooms/typing/index.mdx new file mode 100644 index 0000000000..885e184c0f --- /dev/null +++ b/src/pages/docs/cli/rooms/typing/index.mdx @@ -0,0 +1,19 @@ +--- +title: "ably rooms typing" +meta_description: "Commands for working with typing indicators in Ably Chat rooms using the CLI." +meta_keywords: "ably cli, cli, rooms, typing, chat, indicators, ably rooms typing" +--- + +Use the `ably rooms typing` command group to work with typing indicators in chat rooms. + +## Subcommands + +| Command | Description | +| ------- | ----------- | +| [`ably rooms typing keystroke`](/docs/cli/rooms/typing/keystroke) | Send a typing indicator in a chat room. | +| [`ably rooms typing subscribe`](/docs/cli/rooms/typing/subscribe) | Subscribe to typing indicators in a chat room. | + +## See also + +* [Rooms](/docs/cli/rooms) — Explore all `ably rooms` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/rooms/typing/keystroke.mdx b/src/pages/docs/cli/rooms/typing/keystroke.mdx new file mode 100644 index 0000000000..8c9f3e8587 --- /dev/null +++ b/src/pages/docs/cli/rooms/typing/keystroke.mdx @@ -0,0 +1,68 @@ +--- +title: "ably rooms typing keystroke" +meta_description: "Send a typing indicator in an Ably Chat room using the CLI." +meta_keywords: "ably cli, cli, rooms, typing, keystroke, chat, indicator, ably rooms typing keystroke" +--- + + +```shell +ably rooms typing keystroke [flags] +``` + + +Use the `ably rooms typing keystroke` command to send a typing indicator in an Ably Chat room. + +## Arguments + +Pass the following arguments to the `ably rooms typing keystroke` command: + +### `` + +The name of the chat room to send the typing indicator in. + +## Flags + +You can optionally pass the following flags to the `ably rooms typing keystroke` command: + +### `--auto-type` + +Keep the typing indicator active continuously. Defaults to `false`. + +### `--duration | -D` + +The duration in seconds to keep the typing indicator active. + +### `--client-id` + +A client ID to use when sending the typing indicator. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Send a typing indicator: + + +```shell +ably rooms typing keystroke my-room +``` + + +Keep the typing indicator active continuously: + + +```shell +ably rooms typing keystroke my-room --auto-type +``` + + +## See also + +* [Rooms typing](/docs/cli/rooms/typing) — Explore all `ably rooms typing` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/rooms/typing/subscribe.mdx b/src/pages/docs/cli/rooms/typing/subscribe.mdx new file mode 100644 index 0000000000..90b28f633c --- /dev/null +++ b/src/pages/docs/cli/rooms/typing/subscribe.mdx @@ -0,0 +1,64 @@ +--- +title: "ably rooms typing subscribe" +meta_description: "Subscribe to typing indicators in an Ably Chat room using the CLI." +meta_keywords: "ably cli, cli, rooms, typing, subscribe, chat, indicators, ably rooms typing subscribe" +--- + + +```shell +ably rooms typing subscribe [flags] +``` + + +Use the `ably rooms typing subscribe` command to subscribe to typing indicators in an Ably Chat room. + +## Arguments + +Pass the following arguments to the `ably rooms typing subscribe` command: + +### `` + +The name of the chat room to subscribe to typing indicators in. + +## Flags + +You can optionally pass the following flags to the `ably rooms typing subscribe` command: + +### `--duration | -D` + +The duration in seconds to subscribe for before automatically unsubscribing. + +### `--client-id` + +A client ID to use for the subscription. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Subscribe to typing indicators in a room: + + +```shell +ably rooms typing subscribe my-room +``` + + +Subscribe for a specific duration: + + +```shell +ably rooms typing subscribe my-room --duration 60 +``` + + +## See also + +* [Rooms typing](/docs/cli/rooms/typing) — Explore all `ably rooms typing` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/spaces/create.mdx b/src/pages/docs/cli/spaces/create.mdx new file mode 100644 index 0000000000..dae0fe5e05 --- /dev/null +++ b/src/pages/docs/cli/spaces/create.mdx @@ -0,0 +1,60 @@ +--- +title: "ably spaces create" +meta_description: "Initialize an Ably Space without entering it using the CLI." +meta_keywords: "ably cli, cli, spaces, create, initialize, ably spaces create" +--- + + +```shell +ably spaces create [flags] +``` + + +Use the `ably spaces create` command to initialize a space without entering it. + +## Arguments + +Pass the following arguments to the `ably spaces create` command: + +### `` + +The name of the space to create. + +## Flags + +You can optionally pass the following flags to the `ably spaces create` command: + +### `--client-id` + +A client ID to use when creating the space. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Create a space: + + +```shell +ably spaces create my-space +``` + + +Create a space with a specific client ID: + + +```shell +ably spaces create my-space --client-id "user-123" +``` + + +## See also + +* [Spaces](/docs/cli/spaces) — Explore all `ably spaces` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/spaces/cursors/get.mdx b/src/pages/docs/cli/spaces/cursors/get.mdx new file mode 100644 index 0000000000..1e1736ea19 --- /dev/null +++ b/src/pages/docs/cli/spaces/cursors/get.mdx @@ -0,0 +1,56 @@ +--- +title: "ably spaces cursors get" +meta_description: "Get all current cursors in an Ably Space using the CLI." +meta_keywords: "ably cli, cli, spaces, cursors, get, position, ably spaces cursors get" +--- + + +```shell +ably spaces cursors get +``` + + +Use the `ably spaces cursors get` command to get all current cursors in a space. + +## Arguments + +Pass the following arguments to the `ably spaces cursors get` command: + +### `` + +The name of the space to get cursors for. + +## Flags + +You can optionally pass the following flags to the `ably spaces cursors get` command: + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Get all cursors in a space: + + +```shell +ably spaces cursors get my-space +``` + + +Get cursors in JSON format: + + +```shell +ably spaces cursors get my-space --json +``` + + +## See also + +* [Spaces cursors](/docs/cli/spaces/cursors) — Explore all `ably spaces cursors` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/spaces/cursors/index.mdx b/src/pages/docs/cli/spaces/cursors/index.mdx new file mode 100644 index 0000000000..3152daf955 --- /dev/null +++ b/src/pages/docs/cli/spaces/cursors/index.mdx @@ -0,0 +1,20 @@ +--- +title: "ably spaces cursors" +meta_description: "Commands for cursor management in Ably Spaces using the CLI." +meta_keywords: "ably cli, cli, spaces, cursors, position, tracking, ably spaces cursors" +--- + +Use the `ably spaces cursors` command group to manage cursors in Ably Spaces. + +## Subcommands + +| Command | Description | +| ------- | ----------- | +| [`ably spaces cursors get`](/docs/cli/spaces/cursors/get) | Get all current cursors in a space. | +| [`ably spaces cursors set`](/docs/cli/spaces/cursors/set) | Set a cursor with position data in a space. | +| [`ably spaces cursors subscribe`](/docs/cli/spaces/cursors/subscribe) | Subscribe to cursor movements in a space. | + +## See also + +* [Spaces](/docs/cli/spaces) — Explore all `ably spaces` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/spaces/cursors/set.mdx b/src/pages/docs/cli/spaces/cursors/set.mdx new file mode 100644 index 0000000000..572130742d --- /dev/null +++ b/src/pages/docs/cli/spaces/cursors/set.mdx @@ -0,0 +1,88 @@ +--- +title: "ably spaces cursors set" +meta_description: "Set a cursor with position data in an Ably Space using the CLI." +meta_keywords: "ably cli, cli, spaces, cursors, set, position, ably spaces cursors set" +--- + + +```shell +ably spaces cursors set [flags] +``` + + +Use the `ably spaces cursors set` command to set a cursor with position data in a space. + +## Arguments + +Pass the following arguments to the `ably spaces cursors set` command: + +### `` + +The name of the space to set the cursor in. + +## Flags + +You can optionally pass the following flags to the `ably spaces cursors set` command: + +### `--x` + +The x coordinate of the cursor position. + +### `--y` + +The y coordinate of the cursor position. + +### `--data` + +JSON cursor data to associate with the cursor. + +### `--simulate` + +Simulate random cursor movement. Defaults to `false`. + +### `--duration | -D` + +The duration in seconds to maintain the cursor before automatically removing it. + +### `--client-id` + +A client ID to use when setting the cursor. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Set a cursor position: + + +```shell +ably spaces cursors set my-space --x 100 --y 200 +``` + + +Set a cursor with additional data: + + +```shell +ably spaces cursors set my-space --x 100 --y 200 --data '{"color": "red"}' +``` + + +Simulate random cursor movement: + + +```shell +ably spaces cursors set my-space --simulate --duration 30 +``` + + +## See also + +* [Spaces cursors](/docs/cli/spaces/cursors) — Explore all `ably spaces cursors` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/spaces/cursors/subscribe.mdx b/src/pages/docs/cli/spaces/cursors/subscribe.mdx new file mode 100644 index 0000000000..26f44327f6 --- /dev/null +++ b/src/pages/docs/cli/spaces/cursors/subscribe.mdx @@ -0,0 +1,64 @@ +--- +title: "ably spaces cursors subscribe" +meta_description: "Subscribe to cursor movements in an Ably Space using the CLI." +meta_keywords: "ably cli, cli, spaces, cursors, subscribe, movements, ably spaces cursors subscribe" +--- + + +```shell +ably spaces cursors subscribe [flags] +``` + + +Use the `ably spaces cursors subscribe` command to subscribe to cursor movements in a space. + +## Arguments + +Pass the following arguments to the `ably spaces cursors subscribe` command: + +### `` + +The name of the space to subscribe to cursor movements in. + +## Flags + +You can optionally pass the following flags to the `ably spaces cursors subscribe` command: + +### `--duration | -D` + +The duration in seconds to subscribe for before automatically unsubscribing. + +### `--client-id` + +A client ID to use when subscribing. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Subscribe to cursor movements in a space: + + +```shell +ably spaces cursors subscribe my-space +``` + + +Subscribe for a specific duration: + + +```shell +ably spaces cursors subscribe my-space --duration 60 +``` + + +## See also + +* [Spaces cursors](/docs/cli/spaces/cursors) — Explore all `ably spaces cursors` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/spaces/get.mdx b/src/pages/docs/cli/spaces/get.mdx new file mode 100644 index 0000000000..8c8aa0a994 --- /dev/null +++ b/src/pages/docs/cli/spaces/get.mdx @@ -0,0 +1,56 @@ +--- +title: "ably spaces get" +meta_description: "Get the current state of an Ably Space using the CLI." +meta_keywords: "ably cli, cli, spaces, get, state, ably spaces get" +--- + + +```shell +ably spaces get +``` + + +Use the `ably spaces get` command to get the current state of a space. + +## Arguments + +Pass the following arguments to the `ably spaces get` command: + +### `` + +The name of the space to get. + +## Flags + +You can optionally pass the following flags to the `ably spaces get` command: + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Get the current state of a space: + + +```shell +ably spaces get my-space +``` + + +Get the state of a space in JSON format: + + +```shell +ably spaces get my-space --json +``` + + +## See also + +* [Spaces](/docs/cli/spaces) — Explore all `ably spaces` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/spaces/index.mdx b/src/pages/docs/cli/spaces/index.mdx new file mode 100644 index 0000000000..6dc39e59a6 --- /dev/null +++ b/src/pages/docs/cli/spaces/index.mdx @@ -0,0 +1,64 @@ +--- +title: "ably spaces" +meta_description: "Interact with Ably Spaces using the CLI." +meta_keywords: "ably cli, cli, spaces, cursors, locations, locks, members, occupancy, ably spaces" +--- + +Use the `ably spaces` command group to interact with Ably Spaces. These commands enable you to create and manage spaces, track cursors, locations, locks, members, and occupancy. + +## Space management + +| Command | Description | +| ------- | ----------- | +| [`ably spaces create`](/docs/cli/spaces/create) | Initialize a space without entering it. | +| [`ably spaces get`](/docs/cli/spaces/get) | Get the current state of a space. | +| [`ably spaces list`](/docs/cli/spaces/list) | List active spaces. | +| [`ably spaces subscribe`](/docs/cli/spaces/subscribe) | Subscribe to member and location update events in a space. | + +## Cursors + +| Command | Description | +| ------- | ----------- | +| [`ably spaces cursors`](/docs/cli/spaces/cursors) | Commands for cursor management in Ably Spaces. | +| [`ably spaces cursors get`](/docs/cli/spaces/cursors/get) | Get all current cursors in a space. | +| [`ably spaces cursors set`](/docs/cli/spaces/cursors/set) | Set a cursor with position data in a space. | +| [`ably spaces cursors subscribe`](/docs/cli/spaces/cursors/subscribe) | Subscribe to cursor movements in a space. | + +## Locations + +| Command | Description | +| ------- | ----------- | +| [`ably spaces locations`](/docs/cli/spaces/locations) | Commands for location management in Ably Spaces. | +| [`ably spaces locations get`](/docs/cli/spaces/locations/get) | Get all current locations in a space. | +| [`ably spaces locations set`](/docs/cli/spaces/locations/set) | Set location in a space. | +| [`ably spaces locations subscribe`](/docs/cli/spaces/locations/subscribe) | Subscribe to location updates for members in a space. | + +## Locks + +| Command | Description | +| ------- | ----------- | +| [`ably spaces locks`](/docs/cli/spaces/locks) | Commands for component locking in Ably Spaces. | +| [`ably spaces locks acquire`](/docs/cli/spaces/locks/acquire) | Acquire a lock in a space. | +| [`ably spaces locks get`](/docs/cli/spaces/locks/get) | Get a lock or all locks in a space. | +| [`ably spaces locks subscribe`](/docs/cli/spaces/locks/subscribe) | Subscribe to lock events in a space. | + +## Members + +| Command | Description | +| ------- | ----------- | +| [`ably spaces members`](/docs/cli/spaces/members) | Commands for managing members in Ably Spaces. | +| [`ably spaces members enter`](/docs/cli/spaces/members/enter) | Enter a space and remain present until terminated. | +| [`ably spaces members get`](/docs/cli/spaces/members/get) | Get all members in a space. | +| [`ably spaces members subscribe`](/docs/cli/spaces/members/subscribe) | Subscribe to member presence events in a space. | + +## Occupancy + +| Command | Description | +| ------- | ----------- | +| [`ably spaces occupancy`](/docs/cli/spaces/occupancy) | Commands for working with occupancy in Ably Spaces. | +| [`ably spaces occupancy get`](/docs/cli/spaces/occupancy/get) | Get current occupancy metrics for a space. | +| [`ably spaces occupancy subscribe`](/docs/cli/spaces/occupancy/subscribe) | Subscribe to occupancy events on a space. | + +## See also + +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/spaces/list.mdx b/src/pages/docs/cli/spaces/list.mdx new file mode 100644 index 0000000000..cfa5591cc9 --- /dev/null +++ b/src/pages/docs/cli/spaces/list.mdx @@ -0,0 +1,64 @@ +--- +title: "ably spaces list" +meta_description: "List active Ably Spaces using the CLI." +meta_keywords: "ably cli, cli, spaces, list, active, ably spaces list" +--- + + +```shell +ably spaces list [flags] +``` + + +Use the `ably spaces list` command to list active spaces. + +## Flags + +You can optionally pass the following flags to the `ably spaces list` command: + +### `--limit` + +The maximum number of spaces to return. Defaults to `100`. + +### `--prefix | -p` + +A prefix to filter spaces by name. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +List all active spaces: + + +```shell +ably spaces list +``` + + +List spaces with a prefix: + + +```shell +ably spaces list --prefix "project-" +``` + + +List spaces with a custom limit: + + +```shell +ably spaces list --limit 50 +``` + + +## See also + +* [Spaces](/docs/cli/spaces) — Explore all `ably spaces` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/spaces/locations/get.mdx b/src/pages/docs/cli/spaces/locations/get.mdx new file mode 100644 index 0000000000..05d2025ee4 --- /dev/null +++ b/src/pages/docs/cli/spaces/locations/get.mdx @@ -0,0 +1,56 @@ +--- +title: "ably spaces locations get" +meta_description: "Get all current locations in an Ably Space using the CLI." +meta_keywords: "ably cli, cli, spaces, locations, get, ably spaces locations get" +--- + + +```shell +ably spaces locations get +``` + + +Use the `ably spaces locations get` command to get all current locations in a space. + +## Arguments + +Pass the following arguments to the `ably spaces locations get` command: + +### `` + +The name of the space to get locations for. + +## Flags + +You can optionally pass the following flags to the `ably spaces locations get` command: + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Get all current locations in a space: + + +```shell +ably spaces locations get my-space +``` + + +Get locations in JSON format: + + +```shell +ably spaces locations get my-space --json +``` + + +## See also + +* [Spaces locations](/docs/cli/spaces/locations) — Explore all `ably spaces locations` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/spaces/locations/index.mdx b/src/pages/docs/cli/spaces/locations/index.mdx new file mode 100644 index 0000000000..062965f576 --- /dev/null +++ b/src/pages/docs/cli/spaces/locations/index.mdx @@ -0,0 +1,20 @@ +--- +title: "ably spaces locations" +meta_description: "Commands for location management in Ably Spaces using the CLI." +meta_keywords: "ably cli, cli, spaces, locations, tracking, ably spaces locations" +--- + +Use the `ably spaces locations` command group to manage locations in Ably Spaces. + +## Subcommands + +| Command | Description | +| ------- | ----------- | +| [`ably spaces locations get`](/docs/cli/spaces/locations/get) | Get all current locations in a space. | +| [`ably spaces locations set`](/docs/cli/spaces/locations/set) | Set location in a space. | +| [`ably spaces locations subscribe`](/docs/cli/spaces/locations/subscribe) | Subscribe to location updates for members in a space. | + +## See also + +* [Spaces](/docs/cli/spaces) — Explore all `ably spaces` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/spaces/locations/set.mdx b/src/pages/docs/cli/spaces/locations/set.mdx new file mode 100644 index 0000000000..33bd672971 --- /dev/null +++ b/src/pages/docs/cli/spaces/locations/set.mdx @@ -0,0 +1,68 @@ +--- +title: "ably spaces locations set" +meta_description: "Set location in an Ably Space using the CLI." +meta_keywords: "ably cli, cli, spaces, locations, set, ably spaces locations set" +--- + + +```shell +ably spaces locations set --location [flags] +``` + + +Use the `ably spaces locations set` command to set location in a space. + +## Arguments + +Pass the following arguments to the `ably spaces locations set` command: + +### `` + +The name of the space to set the location in. + +## Flags + +You can optionally pass the following flags to the `ably spaces locations set` command: + +### `--location` + +JSON location data to set. This flag is required. + +### `--duration | -D` + +The duration in seconds to maintain the location before automatically removing it. + +### `--client-id` + +A client ID to use when setting the location. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Set a location in a space: + + +```shell +ably spaces locations set my-space --location '{"page": "sheet-1", "cell": "A1"}' +``` + + +Set a location with a specific duration: + + +```shell +ably spaces locations set my-space --location '{"slide": 5}' --duration 120 +``` + + +## See also + +* [Spaces locations](/docs/cli/spaces/locations) — Explore all `ably spaces locations` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/spaces/locations/subscribe.mdx b/src/pages/docs/cli/spaces/locations/subscribe.mdx new file mode 100644 index 0000000000..9aeb8699ae --- /dev/null +++ b/src/pages/docs/cli/spaces/locations/subscribe.mdx @@ -0,0 +1,64 @@ +--- +title: "ably spaces locations subscribe" +meta_description: "Subscribe to location updates for members in an Ably Space using the CLI." +meta_keywords: "ably cli, cli, spaces, locations, subscribe, updates, ably spaces locations subscribe" +--- + + +```shell +ably spaces locations subscribe [flags] +``` + + +Use the `ably spaces locations subscribe` command to subscribe to location updates for members in a space. + +## Arguments + +Pass the following arguments to the `ably spaces locations subscribe` command: + +### `` + +The name of the space to subscribe to location updates in. + +## Flags + +You can optionally pass the following flags to the `ably spaces locations subscribe` command: + +### `--duration | -D` + +The duration in seconds to subscribe for before automatically unsubscribing. + +### `--client-id` + +A client ID to use when subscribing. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Subscribe to location updates in a space: + + +```shell +ably spaces locations subscribe my-space +``` + + +Subscribe for a specific duration: + + +```shell +ably spaces locations subscribe my-space --duration 60 +``` + + +## See also + +* [Spaces locations](/docs/cli/spaces/locations) — Explore all `ably spaces locations` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/spaces/locks/acquire.mdx b/src/pages/docs/cli/spaces/locks/acquire.mdx new file mode 100644 index 0000000000..d353e6499c --- /dev/null +++ b/src/pages/docs/cli/spaces/locks/acquire.mdx @@ -0,0 +1,80 @@ +--- +title: "ably spaces locks acquire" +meta_description: "Acquire a lock in an Ably Space using the CLI." +meta_keywords: "ably cli, cli, spaces, locks, acquire, locking, ably spaces locks acquire" +--- + + +```shell +ably spaces locks acquire [flags] +``` + + +Use the `ably spaces locks acquire` command to acquire a lock in a space. + +## Arguments + +Pass the following arguments to the `ably spaces locks acquire` command: + +### `` + +The name of the space to acquire the lock in. + +### `` + +The identifier of the lock to acquire. + +## Flags + +You can optionally pass the following flags to the `ably spaces locks acquire` command: + +### `--data` + +JSON data to associate with the lock. + +### `--duration | -D` + +The duration in seconds to hold the lock before automatically releasing it. + +### `--client-id` + +A client ID to use when acquiring the lock. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Acquire a lock in a space: + + +```shell +ably spaces locks acquire my-space my-lock +``` + + +Acquire a lock with associated data: + + +```shell +ably spaces locks acquire my-space my-lock --data '{"component": "editor"}' +``` + + +Acquire a lock for a specific duration: + + +```shell +ably spaces locks acquire my-space my-lock --duration 300 +``` + + +## See also + +* [Spaces locks](/docs/cli/spaces/locks) — Explore all `ably spaces locks` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/spaces/locks/get.mdx b/src/pages/docs/cli/spaces/locks/get.mdx new file mode 100644 index 0000000000..c89096b8d5 --- /dev/null +++ b/src/pages/docs/cli/spaces/locks/get.mdx @@ -0,0 +1,60 @@ +--- +title: "ably spaces locks get" +meta_description: "Get a lock or all locks in an Ably Space using the CLI." +meta_keywords: "ably cli, cli, spaces, locks, get, ably spaces locks get" +--- + + +```shell +ably spaces locks get [lock-id] +``` + + +Use the `ably spaces locks get` command to get a lock or all locks in a space. + +## Arguments + +Pass the following arguments to the `ably spaces locks get` command: + +### `` + +The name of the space to get locks for. + +### `[lock-id]` + +The identifier of a specific lock to get. Omit to get all locks in the space. + +## Flags + +You can optionally pass the following flags to the `ably spaces locks get` command: + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Get all locks in a space: + + +```shell +ably spaces locks get my-space +``` + + +Get a specific lock: + + +```shell +ably spaces locks get my-space my-lock +``` + + +## See also + +* [Spaces locks](/docs/cli/spaces/locks) — Explore all `ably spaces locks` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/spaces/locks/index.mdx b/src/pages/docs/cli/spaces/locks/index.mdx new file mode 100644 index 0000000000..12c3b8fc46 --- /dev/null +++ b/src/pages/docs/cli/spaces/locks/index.mdx @@ -0,0 +1,20 @@ +--- +title: "ably spaces locks" +meta_description: "Commands for component locking in Ably Spaces using the CLI." +meta_keywords: "ably cli, cli, spaces, locks, locking, components, ably spaces locks" +--- + +Use the `ably spaces locks` command group to manage component locking in Ably Spaces. + +## Subcommands + +| Command | Description | +| ------- | ----------- | +| [`ably spaces locks acquire`](/docs/cli/spaces/locks/acquire) | Acquire a lock in a space. | +| [`ably spaces locks get`](/docs/cli/spaces/locks/get) | Get a lock or all locks in a space. | +| [`ably spaces locks subscribe`](/docs/cli/spaces/locks/subscribe) | Subscribe to lock events in a space. | + +## See also + +* [Spaces](/docs/cli/spaces) — Explore all `ably spaces` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/spaces/locks/subscribe.mdx b/src/pages/docs/cli/spaces/locks/subscribe.mdx new file mode 100644 index 0000000000..72fbeb4b5e --- /dev/null +++ b/src/pages/docs/cli/spaces/locks/subscribe.mdx @@ -0,0 +1,64 @@ +--- +title: "ably spaces locks subscribe" +meta_description: "Subscribe to lock events in an Ably Space using the CLI." +meta_keywords: "ably cli, cli, spaces, locks, subscribe, events, ably spaces locks subscribe" +--- + + +```shell +ably spaces locks subscribe [flags] +``` + + +Use the `ably spaces locks subscribe` command to subscribe to lock events in a space. + +## Arguments + +Pass the following arguments to the `ably spaces locks subscribe` command: + +### `` + +The name of the space to subscribe to lock events in. + +## Flags + +You can optionally pass the following flags to the `ably spaces locks subscribe` command: + +### `--duration | -D` + +The duration in seconds to subscribe for before automatically unsubscribing. + +### `--client-id` + +A client ID to use when subscribing. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Subscribe to lock events in a space: + + +```shell +ably spaces locks subscribe my-space +``` + + +Subscribe for a specific duration: + + +```shell +ably spaces locks subscribe my-space --duration 60 +``` + + +## See also + +* [Spaces locks](/docs/cli/spaces/locks) — Explore all `ably spaces locks` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/spaces/members/enter.mdx b/src/pages/docs/cli/spaces/members/enter.mdx new file mode 100644 index 0000000000..cf1fbbe935 --- /dev/null +++ b/src/pages/docs/cli/spaces/members/enter.mdx @@ -0,0 +1,76 @@ +--- +title: "ably spaces members enter" +meta_description: "Enter an Ably Space and remain present until terminated using the CLI." +meta_keywords: "ably cli, cli, spaces, members, enter, presence, ably spaces members enter" +--- + + +```shell +ably spaces members enter [flags] +``` + + +Use the `ably spaces members enter` command to enter a space and remain present until terminated. + +## Arguments + +Pass the following arguments to the `ably spaces members enter` command: + +### `` + +The name of the space to enter. + +## Flags + +You can optionally pass the following flags to the `ably spaces members enter` command: + +### `--profile` + +JSON profile data to associate with the member. + +### `--duration | -D` + +The duration in seconds to remain present before automatically leaving. + +### `--client-id` + +A client ID to use when entering the space. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Enter a space: + + +```shell +ably spaces members enter my-space +``` + + +Enter a space with profile data: + + +```shell +ably spaces members enter my-space --profile '{"name": "Alice", "avatar": "avatar-1"}' +``` + + +Enter a space for a specific duration: + + +```shell +ably spaces members enter my-space --duration 120 +``` + + +## See also + +* [Spaces members](/docs/cli/spaces/members) — Explore all `ably spaces members` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/spaces/members/get.mdx b/src/pages/docs/cli/spaces/members/get.mdx new file mode 100644 index 0000000000..b5a56fc3fc --- /dev/null +++ b/src/pages/docs/cli/spaces/members/get.mdx @@ -0,0 +1,56 @@ +--- +title: "ably spaces members get" +meta_description: "Get all members in an Ably Space using the CLI." +meta_keywords: "ably cli, cli, spaces, members, get, presence, ably spaces members get" +--- + + +```shell +ably spaces members get +``` + + +Use the `ably spaces members get` command to get all members in a space. + +## Arguments + +Pass the following arguments to the `ably spaces members get` command: + +### `` + +The name of the space to get members for. + +## Flags + +You can optionally pass the following flags to the `ably spaces members get` command: + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Get all members in a space: + + +```shell +ably spaces members get my-space +``` + + +Get members in JSON format: + + +```shell +ably spaces members get my-space --json +``` + + +## See also + +* [Spaces members](/docs/cli/spaces/members) — Explore all `ably spaces members` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/spaces/members/index.mdx b/src/pages/docs/cli/spaces/members/index.mdx new file mode 100644 index 0000000000..36cec46f72 --- /dev/null +++ b/src/pages/docs/cli/spaces/members/index.mdx @@ -0,0 +1,20 @@ +--- +title: "ably spaces members" +meta_description: "Commands for managing members in Ably Spaces using the CLI." +meta_keywords: "ably cli, cli, spaces, members, presence, ably spaces members" +--- + +Use the `ably spaces members` command group to manage members in Ably Spaces. + +## Subcommands + +| Command | Description | +| ------- | ----------- | +| [`ably spaces members enter`](/docs/cli/spaces/members/enter) | Enter a space and remain present until terminated. | +| [`ably spaces members get`](/docs/cli/spaces/members/get) | Get all members in a space. | +| [`ably spaces members subscribe`](/docs/cli/spaces/members/subscribe) | Subscribe to member presence events in a space. | + +## See also + +* [Spaces](/docs/cli/spaces) — Explore all `ably spaces` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/spaces/members/subscribe.mdx b/src/pages/docs/cli/spaces/members/subscribe.mdx new file mode 100644 index 0000000000..ed2da943b1 --- /dev/null +++ b/src/pages/docs/cli/spaces/members/subscribe.mdx @@ -0,0 +1,64 @@ +--- +title: "ably spaces members subscribe" +meta_description: "Subscribe to member presence events in an Ably Space using the CLI." +meta_keywords: "ably cli, cli, spaces, members, subscribe, presence, events, ably spaces members subscribe" +--- + + +```shell +ably spaces members subscribe [flags] +``` + + +Use the `ably spaces members subscribe` command to subscribe to member presence events in a space. + +## Arguments + +Pass the following arguments to the `ably spaces members subscribe` command: + +### `` + +The name of the space to subscribe to member events in. + +## Flags + +You can optionally pass the following flags to the `ably spaces members subscribe` command: + +### `--duration | -D` + +The duration in seconds to subscribe for before automatically unsubscribing. + +### `--client-id` + +A client ID to use when subscribing. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Subscribe to member presence events in a space: + + +```shell +ably spaces members subscribe my-space +``` + + +Subscribe for a specific duration: + + +```shell +ably spaces members subscribe my-space --duration 60 +``` + + +## See also + +* [Spaces members](/docs/cli/spaces/members) — Explore all `ably spaces members` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/spaces/occupancy/get.mdx b/src/pages/docs/cli/spaces/occupancy/get.mdx new file mode 100644 index 0000000000..873c3ad2dc --- /dev/null +++ b/src/pages/docs/cli/spaces/occupancy/get.mdx @@ -0,0 +1,56 @@ +--- +title: "ably spaces occupancy get" +meta_description: "Get current occupancy metrics for an Ably Space using the CLI." +meta_keywords: "ably cli, cli, spaces, occupancy, get, metrics, ably spaces occupancy get" +--- + + +```shell +ably spaces occupancy get +``` + + +Use the `ably spaces occupancy get` command to get current occupancy metrics for a space. + +## Arguments + +Pass the following arguments to the `ably spaces occupancy get` command: + +### `` + +The name of the space to get occupancy metrics for. + +## Flags + +You can optionally pass the following flags to the `ably spaces occupancy get` command: + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Get current occupancy metrics for a space: + + +```shell +ably spaces occupancy get my-space +``` + + +Get occupancy in JSON format: + + +```shell +ably spaces occupancy get my-space --json +``` + + +## See also + +* [Spaces occupancy](/docs/cli/spaces/occupancy) — Explore all `ably spaces occupancy` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/spaces/occupancy/index.mdx b/src/pages/docs/cli/spaces/occupancy/index.mdx new file mode 100644 index 0000000000..6d10ebfbab --- /dev/null +++ b/src/pages/docs/cli/spaces/occupancy/index.mdx @@ -0,0 +1,19 @@ +--- +title: "ably spaces occupancy" +meta_description: "Commands for working with occupancy in Ably Spaces using the CLI." +meta_keywords: "ably cli, cli, spaces, occupancy, metrics, ably spaces occupancy" +--- + +Use the `ably spaces occupancy` command group to work with occupancy in Ably Spaces. + +## Subcommands + +| Command | Description | +| ------- | ----------- | +| [`ably spaces occupancy get`](/docs/cli/spaces/occupancy/get) | Get current occupancy metrics for a space. | +| [`ably spaces occupancy subscribe`](/docs/cli/spaces/occupancy/subscribe) | Subscribe to occupancy events on a space. | + +## See also + +* [Spaces](/docs/cli/spaces) — Explore all `ably spaces` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/spaces/occupancy/subscribe.mdx b/src/pages/docs/cli/spaces/occupancy/subscribe.mdx new file mode 100644 index 0000000000..9fc940a937 --- /dev/null +++ b/src/pages/docs/cli/spaces/occupancy/subscribe.mdx @@ -0,0 +1,64 @@ +--- +title: "ably spaces occupancy subscribe" +meta_description: "Subscribe to occupancy events on an Ably Space using the CLI." +meta_keywords: "ably cli, cli, spaces, occupancy, subscribe, events, ably spaces occupancy subscribe" +--- + + +```shell +ably spaces occupancy subscribe [flags] +``` + + +Use the `ably spaces occupancy subscribe` command to subscribe to occupancy events on a space. + +## Arguments + +Pass the following arguments to the `ably spaces occupancy subscribe` command: + +### `` + +The name of the space to subscribe to occupancy events on. + +## Flags + +You can optionally pass the following flags to the `ably spaces occupancy subscribe` command: + +### `--duration | -D` + +The duration in seconds to subscribe for before automatically unsubscribing. + +### `--client-id` + +A client ID to use when subscribing. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Subscribe to occupancy events on a space: + + +```shell +ably spaces occupancy subscribe my-space +``` + + +Subscribe for a specific duration: + + +```shell +ably spaces occupancy subscribe my-space --duration 60 +``` + + +## See also + +* [Spaces occupancy](/docs/cli/spaces/occupancy) — Explore all `ably spaces occupancy` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/spaces/subscribe.mdx b/src/pages/docs/cli/spaces/subscribe.mdx new file mode 100644 index 0000000000..12d775399a --- /dev/null +++ b/src/pages/docs/cli/spaces/subscribe.mdx @@ -0,0 +1,64 @@ +--- +title: "ably spaces subscribe" +meta_description: "Subscribe to member and location update events in an Ably Space using the CLI." +meta_keywords: "ably cli, cli, spaces, subscribe, events, members, locations, ably spaces subscribe" +--- + + +```shell +ably spaces subscribe [flags] +``` + + +Use the `ably spaces subscribe` command to subscribe to member and location update events in a space. + +## Arguments + +Pass the following arguments to the `ably spaces subscribe` command: + +### `` + +The name of the space to subscribe to. + +## Flags + +You can optionally pass the following flags to the `ably spaces subscribe` command: + +### `--duration | -D` + +The duration in seconds to subscribe for before automatically unsubscribing. + +### `--client-id` + +A client ID to use when subscribing. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Subscribe to events in a space: + + +```shell +ably spaces subscribe my-space +``` + + +Subscribe for a specific duration: + + +```shell +ably spaces subscribe my-space --duration 60 +``` + + +## See also + +* [Spaces](/docs/cli/spaces) — Explore all `ably spaces` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/stats/account.mdx b/src/pages/docs/cli/stats/account.mdx new file mode 100644 index 0000000000..bf706a71fc --- /dev/null +++ b/src/pages/docs/cli/stats/account.mdx @@ -0,0 +1,100 @@ +--- +title: "ably stats account" +meta_description: "Get account-level statistics with optional live updates using the CLI." +meta_keywords: "ably cli, cli, stats, statistics, account, live, ably stats account" +--- + + +```shell +ably stats account [flags] +``` + + +Use the `ably stats account` command to get account-level statistics with optional live updates. + +## Flags + +You can optionally pass the following flags to the `ably stats account` command: + +### `--start` + +The start of the time range to retrieve stats from. Accepts ISO 8601, Unix milliseconds, or relative time formats. + +### `--end` + +The end of the time range to retrieve stats from. Accepts ISO 8601, Unix milliseconds, or relative time formats. + +### `--unit` + +The unit of time for the stats interval. Options are `minute`, `hour`, `day`, or `month`. Defaults to `minute`. + +### `--limit` + +The maximum number of stats records to retrieve. Defaults to `10`. + +### `--live` + +Subscribe to live stats updates at minute intervals. Defaults to `false`. + +### `--interval` + +The polling interval in seconds for live mode. Defaults to `6`. + +### `--debug` + +Show debug information for live polling. Defaults to `false`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Retrieve recent account stats: + + +```shell +ably stats account +``` + + +Retrieve hourly stats: + + +```shell +ably stats account --unit hour +``` + + +Retrieve stats within a time range: + + +```shell +ably stats account --start "2025-01-01T00:00:00Z" --end "2025-01-02T00:00:00Z" +``` + + +Subscribe to live stats updates: + + +```shell +ably stats account --live +``` + + +Subscribe to live stats with a custom polling interval: + + +```shell +ably stats account --live --interval 10 +``` + + +## See also + +* [Stats](/docs/cli/stats) — Explore all `ably stats` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/stats/app.mdx b/src/pages/docs/cli/stats/app.mdx new file mode 100644 index 0000000000..e643119741 --- /dev/null +++ b/src/pages/docs/cli/stats/app.mdx @@ -0,0 +1,100 @@ +--- +title: "ably stats app" +meta_description: "Get app-level statistics with optional live updates using the CLI." +meta_keywords: "ably cli, cli, stats, statistics, app, live, ably stats app" +--- + + +```shell +ably stats app [id] [flags] +``` + + +Use the `ably stats app` command to get app-level statistics with optional live updates. + +## Arguments + +Pass the following arguments to the `ably stats app` command: + +### `[id]` + +The ID of the app to retrieve stats for. If not provided, the currently selected app is used. + +## Flags + +You can optionally pass the following flags to the `ably stats app` command: + +### `--start` + +The start of the time range to retrieve stats from. Accepts ISO 8601, Unix milliseconds, or relative time formats. + +### `--end` + +The end of the time range to retrieve stats from. Accepts ISO 8601, Unix milliseconds, or relative time formats. + +### `--unit` + +The unit of time for the stats interval. Options are `minute`, `hour`, `day`, or `month`. Defaults to `minute`. + +### `--limit` + +The maximum number of stats records to retrieve. Defaults to `10`. + +### `--live` + +Subscribe to live stats updates at minute intervals. Defaults to `false`. + +### `--interval` + +The polling interval in seconds for live mode. Defaults to `6`. + +### `--debug` + +Show debug information for live polling. Defaults to `false`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Retrieve stats for the current app: + + +```shell +ably stats app +``` + + +Retrieve stats for a specific app: + + +```shell +ably stats app abc123 +``` + + +Retrieve hourly stats: + + +```shell +ably stats app --unit hour +``` + + +Subscribe to live stats updates: + + +```shell +ably stats app --live +``` + + +## See also + +* [Stats](/docs/cli/stats) — Explore all `ably stats` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/stats/index.mdx b/src/pages/docs/cli/stats/index.mdx new file mode 100644 index 0000000000..610881f14e --- /dev/null +++ b/src/pages/docs/cli/stats/index.mdx @@ -0,0 +1,18 @@ +--- +title: "ably stats" +meta_description: "View statistics for your Ably account or apps." +meta_keywords: "ably cli, cli, stats, statistics, account, app, ably stats" +--- + +Use the `ably stats` command group to view statistics for your Ably account or apps. These commands enable you to retrieve usage metrics and subscribe to live stats updates. + +## Subcommands + +| Command | Description | +| ------- | ----------- | +| [`ably stats account`](/docs/cli/stats/account) | Get account-level statistics. | +| [`ably stats app`](/docs/cli/stats/app) | Get app-level statistics. | + +## See also + +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/status.mdx b/src/pages/docs/cli/status.mdx new file mode 100644 index 0000000000..e8538529a4 --- /dev/null +++ b/src/pages/docs/cli/status.mdx @@ -0,0 +1,51 @@ +--- +title: "ably status" +meta_description: "Check the status of Ably services using the CLI." +meta_keywords: "ably cli, cli, status, service status, ably status" +--- + + +```shell +ably status [flags] +``` + + +Use the `ably status` command to check the current status of Ably services. + +## Flags + +You can optionally pass the following flags to the `ably status` command: + +### `--open | -o` + +Open the Ably status page in a browser. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Check the status of Ably services: + + +```shell +ably status +``` + + +Check status with JSON output: + + +```shell +ably status --json +``` + + +## See also + +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/support/ask.mdx b/src/pages/docs/cli/support/ask.mdx new file mode 100644 index 0000000000..d79742f0a2 --- /dev/null +++ b/src/pages/docs/cli/support/ask.mdx @@ -0,0 +1,68 @@ +--- +title: "ably support ask" +meta_description: "Ask a question to the Ably AI agent for help using the CLI." +meta_keywords: "ably cli, cli, support, ask, ai, question, ably support ask" +--- + + +```shell +ably support ask [flags] +``` + + +Use the `ably support ask` command to ask a question to the Ably AI agent for help. + +## Arguments + +Pass the following arguments to the `ably support ask` command: + +### `` + +The question to ask the Ably AI agent. + +## Flags + +You can optionally pass the following flags to the `ably support ask` command: + +### `--continue` + +Continue a previous conversation with the AI agent. Defaults to `false`. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Ask a basic question: + + +```shell +ably support ask "How do I create an app?" +``` + + +Ask a technical question: + + +```shell +ably support ask "How do I authenticate with token auth?" +``` + + +Continue a previous conversation: + + +```shell +ably support ask "Can you give me more details?" --continue +``` + + +## See also + +* [Support](/docs/cli/support) — Explore all `ably support` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/support/contact.mdx b/src/pages/docs/cli/support/contact.mdx new file mode 100644 index 0000000000..bf56f7d4fe --- /dev/null +++ b/src/pages/docs/cli/support/contact.mdx @@ -0,0 +1,28 @@ +--- +title: "ably support contact" +meta_description: "Contact Ably for assistance using the CLI." +meta_keywords: "ably cli, cli, support, contact, help, ably support contact" +--- + + +```shell +ably support contact +``` + + +Use the `ably support contact` command to contact Ably for assistance. This opens the Ably contact page in your default browser. + +## Examples + +Open the Ably contact page: + + +```shell +ably support contact +``` + + +## See also + +* [Support](/docs/cli/support) — Explore all `ably support` commands. +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/support/index.mdx b/src/pages/docs/cli/support/index.mdx new file mode 100644 index 0000000000..47eb9b1871 --- /dev/null +++ b/src/pages/docs/cli/support/index.mdx @@ -0,0 +1,18 @@ +--- +title: "ably support" +meta_description: "Get support and help from Ably." +meta_keywords: "ably cli, cli, support, help, ask, contact, ably support" +--- + +Use the `ably support` command group to get support and help from Ably. These commands enable you to ask questions to an AI agent or contact Ably directly for assistance. + +## Subcommands + +| Command | Description | +| ------- | ----------- | +| [`ably support ask`](/docs/cli/support/ask) | Ask a question to the Ably AI agent. | +| [`ably support contact`](/docs/cli/support/contact) | Open the Ably contact page. | + +## See also + +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/cli/version.mdx b/src/pages/docs/cli/version.mdx new file mode 100644 index 0000000000..205eb81b73 --- /dev/null +++ b/src/pages/docs/cli/version.mdx @@ -0,0 +1,35 @@ +--- +title: "ably version" +meta_description: "Display the version of the Ably CLI." +meta_keywords: "ably cli, cli, version, ably version" +--- + + +```shell +ably version +``` + + +Use the `ably version` command to display version information for the Ably CLI, including the CLI version, platform architecture, and Node.js version. + +## Global flags + +The following [global flags](/docs/cli#global-flags) are also available: + +* [`--json`](/docs/cli#json) +* [`--pretty-json`](/docs/cli#pretty-json) +* [`--verbose`](/docs/cli#verbose) + +## Examples + +Display the CLI version: + + +```shell +ably version +``` + + +## See also + +* [CLI reference](/docs/cli) — Full list of available commands. diff --git a/src/pages/docs/platform/tools/cli.mdx b/src/pages/docs/platform/tools/cli.mdx index e0c02644ef..b3a8d483a2 100644 --- a/src/pages/docs/platform/tools/cli.mdx +++ b/src/pages/docs/platform/tools/cli.mdx @@ -4,11 +4,7 @@ meta_description: "The Ably CLI is a command-line interface for managing Ably re meta_keywords: "Ably CLI, command line, terminal, developer tools" --- - - -The Ably CLI brings the full power of Ably to your terminal. You can use it to manage your Ably account and its resources, and to explore Ably's APIs and features. +The [Ably CLI](https://github.com/ably/ably-cli) brings the full power of Ably to your terminal. You can use it to manage your Ably account and its resources, and to explore Ably's APIs and features. It's a quick and easy way to simulate additional clients when testing how Ably works. @@ -82,40 +78,42 @@ You can use the Ably CLI for undertaking operations such as: | Operation | Description | | --------- | ----------- | | **Ably Accounts** || -| List accounts | List the accounts you have access to. | -| Switch accounts | Switch between multiple Ably accounts. | -| Account statistics | Query your account statistics. | +| [List accounts](/docs/cli/accounts/list) | List the accounts you have access to. | +| [Switch accounts](/docs/cli/accounts/switch) | Switch between multiple Ably accounts. | +| [Account statistics](/docs/cli/stats/account) | Query your account statistics. | | **Ably Apps** || -| List apps | List all apps in your account. | -| Switch apps | Switch between multiple apps. | -| Manage apps | Create and delete apps. | -| Manage API keys | Create, update and revoke API keys in an app. | -| App statistics | Query app statistics. | -| Manage rules | Create, update and delete rules in an app. | -| Logs | Query and subscribe to logs. | +| [List apps](/docs/cli/apps/list) | List all apps in your account. | +| [Switch apps](/docs/cli/apps/switch) | Switch between multiple apps. | +| [Manage apps](/docs/cli/apps) | Create and delete apps. | +| [Manage API keys](/docs/cli/auth/keys) | Create, update and revoke API keys in an app. | +| [App statistics](/docs/cli/stats/app) | Query app statistics. | +| [Manage rules](/docs/cli/apps/rules) | Create, update and delete rules in an app. | +| [Logs](/docs/cli/logs) | Query and subscribe to logs. | | **Integrations and Queues** || -| Manage integrations | List, create and delete integrations. | -| Manage queues | List, create and delete queues. | +| [Manage integrations](/docs/cli/integrations) | List, create and delete integrations. | +| [Manage queues](/docs/cli/queues) | List, create and delete queues. | | **Pub/Sub** || -| List channels | List active channels in an app. | -| Publish | Publish and batch publish messages. | -| Subscribe | Subscribe to messages on channels. | -| Presence | Enter and subscribe to the presence set of channels. | -| History | Query message history. | -| Occupancy | Fetch and subscribe to channel occupancy. | +| [List channels](/docs/cli/channels/list) | List active channels in an app. | +| [Publish](/docs/cli/channels/publish) | Publish and batch publish messages. | +| [Subscribe](/docs/cli/channels/subscribe) | Subscribe to messages on channels. | +| [Presence](/docs/cli/channels/presence) | Enter and subscribe to the presence set of channels. | +| [History](/docs/cli/channels/history) | Query message history. | +| [Occupancy](/docs/cli/channels/occupancy) | Fetch and subscribe to channel occupancy. | | **Chat** || -| List rooms | List chat rooms in an app. | -| Messages | Send and subscribe to messages. | -| Presence | Enter and subscribe to the presence set of chat rooms. | -| History | Query chat message history. | -| Occupancy | Fetch and subscribe to chat room occupancy. | -| Reactions | Send and subscribe to message-level and room-level reactions. | -| Typing indicators | Send and subscribe to typing indicators. | +| [List rooms](/docs/cli/rooms/list) | List chat rooms in an app. | +| [Messages](/docs/cli/rooms/messages) | Send and subscribe to messages. | +| [Presence](/docs/cli/rooms/presence) | Enter and subscribe to the presence set of chat rooms. | +| [History](/docs/cli/rooms/messages/history) | Query chat message history. | +| [Occupancy](/docs/cli/rooms/occupancy) | Fetch and subscribe to chat room occupancy. | +| [Reactions](/docs/cli/rooms/reactions) | Send and subscribe to message-level and room-level reactions. | +| [Typing indicators](/docs/cli/rooms/typing) | Send and subscribe to typing indicators. | | **Spaces** || -| List spaces | List spaces in an app. | -| Members | Enter and subscribe the list of members. | -| Locations | Set and subscribe to member locations. | -| Cursors | Set and subscribe to member cursors. | -| Locks | Acquire and subscribe to locks. | +| [List spaces](/docs/cli/spaces/list) | List spaces in an app. | +| [Members](/docs/cli/spaces/members) | Enter and subscribe the list of members. | +| [Locations](/docs/cli/spaces/locations) | Set and subscribe to member locations. | +| [Cursors](/docs/cli/spaces/cursors) | Set and subscribe to member cursors. | +| [Locks](/docs/cli/spaces/locks) | Acquire and subscribe to locks. | +## CLI reference +For detailed documentation on every CLI command, including flags, arguments, and usage examples, see the [CLI reference](/docs/cli).