diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index 9e78324c..b0e3bfe7 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -115,6 +115,87 @@ pnpm dev โ””โ”€โ”€ package.json # Scripts defined here ``` +## ๐Ÿ—๏ธ Flag Architecture + +Flags are NOT global. Each command explicitly declares only the flags it needs via composable flag sets defined in `src/flags.ts`: + +- **`coreGlobalFlags`** โ€” `--verbose`, `--json`, `--pretty-json`, `--web-cli-help` (hidden) (on every command via `AblyBaseCommand.globalFlags`) +- **`productApiFlags`** โ€” core + hidden product API flags (`port`, `tlsPort`, `tls`). Use for commands that talk to the Ably product API. +- **`controlApiFlags`** โ€” core + hidden control API flags (`control-host`, `dashboard-host`). Use for commands that talk to the Control API. +- **`clientIdFlag`** โ€” `--client-id`. Add only to commands that create a realtime connection where client identity matters (presence, spaces members, cursors, locks, publish, etc.). Do NOT add globally. +- **`endpointFlag`** โ€” `--endpoint`. Hidden, only on `accounts login` and `accounts switch`. + +**When creating a new command:** +```typescript +// Product API command (channels, spaces, rooms, etc.) +import { productApiFlags, clientIdFlag } from "../../flags.js"; +static override flags = { + ...productApiFlags, + ...clientIdFlag, // Only if command needs client identity + // command-specific flags... +}; + +// Control API command (apps, keys, queues, etc.) +import { controlApiFlags } from "../../flags.js"; +static override flags = { + ...controlApiFlags, + // command-specific flags... +}; +``` + +**Auth** is managed via `ably login` (stored config). Environment variables override stored config for CI, scripting, or testing: +- `ABLY_API_KEY`, `ABLY_TOKEN`, `ABLY_ACCESS_TOKEN` + +Do NOT add `--api-key`, `--token`, or `--access-token` flags to commands. + +## ๐Ÿงช Writing Tests + +**Auth in tests โ€” do NOT use CLI flags (`--api-key`, `--token`, `--access-token`):** +**Unit tests** โ€” Auth is provided automatically by `MockConfigManager` (see `test/helpers/mock-config-manager.ts`). No env vars needed. Only set `ABLY_API_KEY` when specifically testing env var override behavior. +```typescript +// โŒ WRONG โ€” don't pass auth flags +runCommand(["channels", "publish", "my-channel", "hello", "--api-key", key]); + +// โœ… CORRECT โ€” MockConfigManager provides auth automatically +runCommand(["channels", "publish", "my-channel", "hello"]); + +// โœ… CORRECT โ€” use getMockConfigManager() to access test auth values +import { getMockConfigManager } from "../../helpers/mock-config-manager.js"; +const mockConfig = getMockConfigManager(); +const apiKey = mockConfig.getApiKey()!; +const appId = mockConfig.getCurrentAppId()!; +``` + +**E2E tests** โ€” Commands run as real subprocesses, so auth must be passed via env vars: +```typescript +// โœ… CORRECT โ€” pass auth via env vars for E2E +runCommand(["channels", "publish", "my-channel", "hello"], { + env: { ABLY_API_KEY: key }, +}); + +// โœ… CORRECT โ€” spawn with env vars +spawn("node", [cliPath, "channels", "subscribe", "my-channel"], { + env: { ...process.env, ABLY_API_KEY: key }, +}); + +// โœ… Control API commands use ABLY_ACCESS_TOKEN +runCommand(["stats", "account"], { + env: { ABLY_ACCESS_TOKEN: token }, +}); +``` + +**Test structure:** +- `test/unit/` โ€” Fast, mocked tests. Auth via `MockConfigManager` (automatic). Only set `ABLY_API_KEY` env var when testing env var override behavior. +- `test/e2e/` โ€” Full scenarios against real Ably. Auth via env vars (`ABLY_API_KEY`, `ABLY_ACCESS_TOKEN`). +- Helpers in `test/helpers/` โ€” `runCommand()`, `runLongRunningBackgroundProcess()`, `e2e-test-helper.ts`, `mock-config-manager.ts`. + +**Running tests:** +```bash +pnpm test:unit # All unit tests +pnpm test:e2e # All E2E tests +pnpm test test/unit/commands/foo.test.ts # Specific test +``` + ## ๐Ÿ” Related Projects If this is part of a workspace, there may be: diff --git a/README.md b/README.md index fd59a43a..252f88e0 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ * [CLI Usage](#cli-usage) * [Commands](#commands) * [Contributing](#contributing) +* [or](#or) # CLI Usage @@ -24,7 +25,7 @@ $ npm install -g @ably/cli $ ably COMMAND running command... $ ably (--version) -@ably/cli/0.15.0 darwin-arm64 node-v22.14.0 +@ably/cli/0.16.0 darwin-arm64 node-v24.4.1 $ ably --help [COMMAND] USAGE $ ably COMMAND @@ -108,6 +109,7 @@ $ ably-interactive * [`ably channels`](#ably-channels) * [`ably channels batch-publish [MESSAGE]`](#ably-channels-batch-publish-message) * [`ably channels history CHANNEL`](#ably-channels-history-channel) +* [`ably channels inspect CHANNEL`](#ably-channels-inspect-channel) * [`ably channels list`](#ably-channels-list) * [`ably channels occupancy`](#ably-channels-occupancy) * [`ably channels occupancy get CHANNEL`](#ably-channels-occupancy-get-channel) @@ -141,8 +143,6 @@ $ ably-interactive * [`ably logs push history`](#ably-logs-push-history) * [`ably logs push subscribe`](#ably-logs-push-subscribe) * [`ably logs subscribe`](#ably-logs-subscribe) -* [`ably mcp`](#ably-mcp) -* [`ably mcp start-server`](#ably-mcp-start-server) * [`ably queues`](#ably-queues) * [`ably queues create`](#ably-queues-create) * [`ably queues delete QUEUEID`](#ably-queues-delete-queueid) @@ -225,7 +225,7 @@ COMMANDS ably accounts switch Switch to a different Ably account ``` -_See code: [src/commands/accounts/index.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/accounts/index.ts)_ +_See code: [src/commands/accounts/index.ts](https://github.com/ably/ably-cli/blob/v0.16.0/src/commands/accounts/index.ts)_ ## `ably accounts current` @@ -233,21 +233,12 @@ Show the current Ably account ``` USAGE - $ ably accounts current [--access-token ] [--api-key ] [--client-id ] [--env ] - [--endpoint ] [--host ] [--json | --pretty-json] [--token ] [-v] + $ ably accounts current [-v] [--json | --pretty-json] FLAGS - -v, --verbose Output verbose logs - --access-token= Overrides any configured access token used for the Control API - --api-key= Overrides any configured API key used for the product APIs - --client-id= Overrides any default client ID when using API authentication. Use "none" to explicitly - set no client ID. Not applicable when using token authentication. - --endpoint= Override the endpoint for all product API calls - --env= Override the environment for all product API calls - --host= Override the host endpoint for all product API calls - --json Output in JSON format - --pretty-json Output in colorized JSON format - --token= Authenticate using an Ably Token or JWT Token instead of an API key + -v, --verbose Output verbose logs + --json Output in JSON format + --pretty-json Output in colorized JSON format DESCRIPTION Show the current Ably account @@ -260,7 +251,7 @@ EXAMPLES $ ably accounts current --pretty-json ``` -_See code: [src/commands/accounts/current.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/accounts/current.ts)_ +_See code: [src/commands/accounts/current.ts](https://github.com/ably/ably-cli/blob/v0.16.0/src/commands/accounts/current.ts)_ ## `ably accounts list` @@ -268,21 +259,12 @@ List locally configured Ably accounts ``` USAGE - $ ably accounts list [--access-token ] [--api-key ] [--client-id ] [--env ] - [--endpoint ] [--host ] [--json | --pretty-json] [--token ] [-v] + $ ably accounts list [-v] [--json | --pretty-json] FLAGS - -v, --verbose Output verbose logs - --access-token= Overrides any configured access token used for the Control API - --api-key= Overrides any configured API key used for the product APIs - --client-id= Overrides any default client ID when using API authentication. Use "none" to explicitly - set no client ID. Not applicable when using token authentication. - --endpoint= Override the endpoint for all product API calls - --env= Override the environment for all product API calls - --host= Override the host endpoint for all product API calls - --json Output in JSON format - --pretty-json Output in colorized JSON format - --token= Authenticate using an Ably Token or JWT Token instead of an API key + -v, --verbose Output verbose logs + --json Output in JSON format + --pretty-json Output in colorized JSON format DESCRIPTION List locally configured Ably accounts @@ -295,7 +277,7 @@ EXAMPLES $ ably accounts list --pretty-json ``` -_See code: [src/commands/accounts/list.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/accounts/list.ts)_ +_See code: [src/commands/accounts/list.ts](https://github.com/ably/ably-cli/blob/v0.16.0/src/commands/accounts/list.ts)_ ## `ably accounts login [TOKEN]` @@ -303,26 +285,17 @@ Log in to your Ably account ``` USAGE - $ ably accounts login [TOKEN] [--access-token ] [--api-key ] [--client-id ] [--env ] - [--endpoint ] [--host ] [--json | --pretty-json] [--token ] [-v] [-a ] [--no-browser] + $ ably accounts login [TOKEN] [-v] [--json | --pretty-json] [-a ] [--no-browser] ARGUMENTS TOKEN Access token (if not provided, will prompt for it) FLAGS - -a, --alias= Alias for this account (default account if not specified) - -v, --verbose Output verbose logs - --access-token= Overrides any configured access token used for the Control API - --api-key= Overrides any configured API key used for the product APIs - --client-id= Overrides any default client ID when using API authentication. Use "none" to explicitly - set no client ID. Not applicable when using token authentication. - --endpoint= Override the endpoint for all product API calls - --env= Override the environment for all product API calls - --host= Override the host endpoint for all product API calls - --json Output in JSON format - --no-browser Do not open a browser - --pretty-json Output in colorized JSON format - --token= Authenticate using an Ably Token or JWT Token instead of an API key + -a, --alias= Alias for this account (default account if not specified) + -v, --verbose Output verbose logs + --json Output in JSON format + --no-browser Do not open a browser + --pretty-json Output in colorized JSON format DESCRIPTION Log in to your Ably account @@ -337,7 +310,7 @@ EXAMPLES $ ably accounts login --pretty-json ``` -_See code: [src/commands/accounts/login.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/accounts/login.ts)_ +_See code: [src/commands/accounts/login.ts](https://github.com/ably/ably-cli/blob/v0.16.0/src/commands/accounts/login.ts)_ ## `ably accounts logout [ALIAS]` @@ -345,25 +318,16 @@ Log out from an Ably account ``` USAGE - $ ably accounts logout [ALIAS] [--access-token ] [--api-key ] [--client-id ] [--env ] - [--endpoint ] [--host ] [--json | --pretty-json] [--token ] [-v] [-f] + $ ably accounts logout [ALIAS] [-v] [--json | --pretty-json] [-f] ARGUMENTS ALIAS Alias of the account to log out from (defaults to current account) FLAGS - -f, --force Force logout without confirmation - -v, --verbose Output verbose logs - --access-token= Overrides any configured access token used for the Control API - --api-key= Overrides any configured API key used for the product APIs - --client-id= Overrides any default client ID when using API authentication. Use "none" to explicitly - set no client ID. Not applicable when using token authentication. - --endpoint= Override the endpoint for all product API calls - --env= Override the environment for all product API calls - --host= Override the host endpoint for all product API calls - --json Output in JSON format - --pretty-json Output in colorized JSON format - --token= Authenticate using an Ably Token or JWT Token instead of an API key + -f, --force Force logout without confirmation + -v, --verbose Output verbose logs + --json Output in JSON format + --pretty-json Output in colorized JSON format DESCRIPTION Log out from an Ably account @@ -378,7 +342,7 @@ EXAMPLES $ ably accounts logout --pretty-json ``` -_See code: [src/commands/accounts/logout.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/accounts/logout.ts)_ +_See code: [src/commands/accounts/logout.ts](https://github.com/ably/ably-cli/blob/v0.16.0/src/commands/accounts/logout.ts)_ ## `ably accounts switch [ALIAS]` @@ -386,24 +350,15 @@ Switch to a different Ably account ``` USAGE - $ ably accounts switch [ALIAS] [--access-token ] [--api-key ] [--client-id ] [--env ] - [--endpoint ] [--host ] [--json | --pretty-json] [--token ] [-v] + $ ably accounts switch [ALIAS] [-v] [--json | --pretty-json] ARGUMENTS ALIAS Alias of the account to switch to FLAGS - -v, --verbose Output verbose logs - --access-token= Overrides any configured access token used for the Control API - --api-key= Overrides any configured API key used for the product APIs - --client-id= Overrides any default client ID when using API authentication. Use "none" to explicitly - set no client ID. Not applicable when using token authentication. - --endpoint= Override the endpoint for all product API calls - --env= Override the environment for all product API calls - --host= Override the host endpoint for all product API calls - --json Output in JSON format - --pretty-json Output in colorized JSON format - --token= Authenticate using an Ably Token or JWT Token instead of an API key + -v, --verbose Output verbose logs + --json Output in JSON format + --pretty-json Output in colorized JSON format DESCRIPTION Switch to a different Ably account @@ -418,7 +373,7 @@ EXAMPLES $ ably accounts switch --pretty-json ``` -_See code: [src/commands/accounts/switch.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/accounts/switch.ts)_ +_See code: [src/commands/accounts/switch.ts](https://github.com/ably/ably-cli/blob/v0.16.0/src/commands/accounts/switch.ts)_ ## `ably apps` @@ -457,7 +412,7 @@ COMMANDS ably apps update Update an app ``` -_See code: [src/commands/apps/index.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/apps/index.ts)_ +_See code: [src/commands/apps/index.ts](https://github.com/ably/ably-cli/blob/v0.16.0/src/commands/apps/index.ts)_ ## `ably apps channel-rules` @@ -480,7 +435,7 @@ EXAMPLES $ ably apps channel-rules delete chat ``` -_See code: [src/commands/apps/channel-rules/index.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/apps/channel-rules/index.ts)_ +_See code: [src/commands/apps/channel-rules/index.ts](https://github.com/ably/ably-cli/blob/v0.16.0/src/commands/apps/channel-rules/index.ts)_ ## `ably apps channel-rules create` @@ -488,29 +443,21 @@ Create a channel rule ``` USAGE - $ ably apps channel-rules create --name [--access-token ] [--api-key ] [--client-id ] [--env - ] [--endpoint ] [--host ] [--json | --pretty-json] [--token ] [-v] [--app ] - [--authenticated] [--batching-enabled] [--batching-interval ] [--conflation-enabled] [--conflation-interval - ] [--conflation-key ] [--expose-time-serial] [--persist-last] [--persisted] - [--populate-channel-registry] [--push-enabled] [--tls-only] + $ ably apps channel-rules create --name [-v] [--json | --pretty-json] [--app ] [--authenticated] + [--batching-enabled] [--batching-interval ] [--conflation-enabled] [--conflation-interval ] + [--conflation-key ] [--expose-time-serial] [--persist-last] [--persisted] [--populate-channel-registry] + [--push-enabled] [--tls-only] FLAGS -v, --verbose Output verbose logs - --access-token= Overrides any configured access token used for the Control API - --api-key= Overrides any configured API key used for the product APIs --app= App ID or name to create the channel rule in --authenticated Whether channels matching this rule require clients to be authenticated --batching-enabled Whether to enable batching for messages on channels matching this rule --batching-interval= The batching interval for messages on channels matching this rule - --client-id= Overrides any default client ID when using API authentication. Use "none" to - explicitly set no client ID. Not applicable when using token authentication. --conflation-enabled Whether to enable conflation for messages on channels matching this rule --conflation-interval= The conflation interval for messages on channels matching this rule --conflation-key= The conflation key for messages on channels matching this rule - --endpoint= Override the endpoint for all product API calls - --env= Override the environment for all product API calls --expose-time-serial Whether to expose the time serial for messages on channels matching this rule - --host= Override the host endpoint for all product API calls --json Output in JSON format --name= (required) Name of the channel rule --persist-last Whether to persist only the last message on channels matching this rule @@ -519,7 +466,6 @@ FLAGS --pretty-json Output in colorized JSON format --push-enabled Whether push notifications should be enabled for channels matching this rule --tls-only Whether to enforce TLS for channels matching this rule - --token= Authenticate using an Ably Token or JWT Token instead of an API key DESCRIPTION Create a channel rule @@ -532,7 +478,7 @@ EXAMPLES $ ably apps channel-rules create --name "notifications" --persisted --push-enabled --app "My App" ``` -_See code: [src/commands/apps/channel-rules/create.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/apps/channel-rules/create.ts)_ +_See code: [src/commands/apps/channel-rules/create.ts](https://github.com/ably/ably-cli/blob/v0.16.0/src/commands/apps/channel-rules/create.ts)_ ## `ably apps channel-rules delete NAMEORID` @@ -540,26 +486,17 @@ Delete a channel rule ``` USAGE - $ ably apps channel-rules delete NAMEORID [--access-token ] [--api-key ] [--client-id ] [--env ] - [--endpoint ] [--host ] [--json | --pretty-json] [--token ] [-v] [--app ] [-f] + $ ably apps channel-rules delete NAMEORID [-v] [--json | --pretty-json] [--app ] [-f] ARGUMENTS NAMEORID Name or ID of the channel rule to delete FLAGS - -f, --force Force deletion without confirmation - -v, --verbose Output verbose logs - --access-token= Overrides any configured access token used for the Control API - --api-key= Overrides any configured API key used for the product APIs - --app= App ID or name to delete the channel rule from - --client-id= Overrides any default client ID when using API authentication. Use "none" to explicitly - set no client ID. Not applicable when using token authentication. - --endpoint= Override the endpoint for all product API calls - --env= Override the environment for all product API calls - --host= Override the host endpoint for all product API calls - --json Output in JSON format - --pretty-json Output in colorized JSON format - --token= Authenticate using an Ably Token or JWT Token instead of an API key + -f, --force Force deletion without confirmation + -v, --verbose Output verbose logs + --app= App ID or name to delete the channel rule from + --json Output in JSON format + --pretty-json Output in colorized JSON format DESCRIPTION Delete a channel rule @@ -576,7 +513,7 @@ EXAMPLES $ ably apps channel-rules delete chat --pretty-json ``` -_See code: [src/commands/apps/channel-rules/delete.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/apps/channel-rules/delete.ts)_ +_See code: [src/commands/apps/channel-rules/delete.ts](https://github.com/ably/ably-cli/blob/v0.16.0/src/commands/apps/channel-rules/delete.ts)_ ## `ably apps channel-rules list` @@ -599,7 +536,7 @@ EXAMPLES $ ably apps:channel-rules:list --pretty-json ``` -_See code: [src/commands/apps/channel-rules/list.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/apps/channel-rules/list.ts)_ +_See code: [src/commands/apps/channel-rules/list.ts](https://github.com/ably/ably-cli/blob/v0.16.0/src/commands/apps/channel-rules/list.ts)_ ## `ably apps channel-rules update NAMEORID` @@ -607,32 +544,24 @@ Update a channel rule ``` USAGE - $ ably apps channel-rules update NAMEORID [--access-token ] [--api-key ] [--client-id ] [--env ] - [--endpoint ] [--host ] [--json | --pretty-json] [--token ] [-v] [--app ] - [--authenticated] [--batching-enabled] [--batching-interval ] [--conflation-enabled] [--conflation-interval - ] [--conflation-key ] [--expose-time-serial] [--persist-last] [--persisted] - [--populate-channel-registry] [--push-enabled] [--tls-only] + $ ably apps channel-rules update NAMEORID [-v] [--json | --pretty-json] [--app ] [--authenticated] + [--batching-enabled] [--batching-interval ] [--conflation-enabled] [--conflation-interval ] + [--conflation-key ] [--expose-time-serial] [--persist-last] [--persisted] [--populate-channel-registry] + [--push-enabled] [--tls-only] ARGUMENTS NAMEORID Name or ID of the channel rule to update FLAGS -v, --verbose Output verbose logs - --access-token= Overrides any configured access token used for the Control API - --api-key= Overrides any configured API key used for the product APIs --app= App ID or name to update the channel rule in --[no-]authenticated Whether channels matching this rule require clients to be authenticated --[no-]batching-enabled Whether to enable batching for messages on channels matching this rule --batching-interval= The batching interval for messages on channels matching this rule - --client-id= Overrides any default client ID when using API authentication. Use "none" to - explicitly set no client ID. Not applicable when using token authentication. --[no-]conflation-enabled Whether to enable conflation for messages on channels matching this rule --conflation-interval= The conflation interval for messages on channels matching this rule --conflation-key= The conflation key for messages on channels matching this rule - --endpoint= Override the endpoint for all product API calls - --env= Override the environment for all product API calls --[no-]expose-time-serial Whether to expose the time serial for messages on channels matching this rule - --host= Override the host endpoint for all product API calls --json Output in JSON format --[no-]persist-last Whether to persist only the last message on channels matching this rule --[no-]persisted Whether messages on channels matching this rule should be persisted @@ -640,7 +569,6 @@ FLAGS --pretty-json Output in colorized JSON format --[no-]push-enabled Whether push notifications should be enabled for channels matching this rule --[no-]tls-only Whether to enforce TLS for channels matching this rule - --token= Authenticate using an Ably Token or JWT Token instead of an API key DESCRIPTION Update a channel rule @@ -653,7 +581,7 @@ EXAMPLES $ ably apps channel-rules update notifications --persisted --push-enabled --app "My App" ``` -_See code: [src/commands/apps/channel-rules/update.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/apps/channel-rules/update.ts)_ +_See code: [src/commands/apps/channel-rules/update.ts](https://github.com/ably/ably-cli/blob/v0.16.0/src/commands/apps/channel-rules/update.ts)_ ## `ably apps create` @@ -661,23 +589,14 @@ Create a new app ``` USAGE - $ ably apps create --name [--access-token ] [--api-key ] [--client-id ] [--env - ] [--endpoint ] [--host ] [--json | --pretty-json] [--token ] [-v] [--tls-only] + $ ably apps create --name [-v] [--json | --pretty-json] [--tls-only] FLAGS - -v, --verbose Output verbose logs - --access-token= Overrides any configured access token used for the Control API - --api-key= Overrides any configured API key used for the product APIs - --client-id= Overrides any default client ID when using API authentication. Use "none" to explicitly - set no client ID. Not applicable when using token authentication. - --endpoint= Override the endpoint for all product API calls - --env= Override the environment for all product API calls - --host= Override the host endpoint for all product API calls - --json Output in JSON format - --name= (required) Name of the app - --pretty-json Output in colorized JSON format - --tls-only Whether the app should accept TLS connections only - --token= Authenticate using an Ably Token or JWT Token instead of an API key + -v, --verbose Output verbose logs + --json Output in JSON format + --name= (required) Name of the app + --pretty-json Output in colorized JSON format + --tls-only Whether the app should accept TLS connections only DESCRIPTION Create a new app @@ -687,10 +606,10 @@ EXAMPLES $ ably apps create --name "My New App" --tls-only - $ ably apps create --name "My New App" --access-token "YOUR_ACCESS_TOKEN" + $ ABLY_ACCESS_TOKEN="YOUR_ACCESS_TOKEN" ably apps create --name "My New App" ``` -_See code: [src/commands/apps/create.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/apps/create.ts)_ +_See code: [src/commands/apps/create.ts](https://github.com/ably/ably-cli/blob/v0.16.0/src/commands/apps/create.ts)_ ## `ably apps current` @@ -698,21 +617,12 @@ Show the currently selected app ``` USAGE - $ ably apps current [--access-token ] [--api-key ] [--client-id ] [--env ] - [--endpoint ] [--host ] [--json | --pretty-json] [--token ] [-v] + $ ably apps current [-v] [--json | --pretty-json] FLAGS - -v, --verbose Output verbose logs - --access-token= Overrides any configured access token used for the Control API - --api-key= Overrides any configured API key used for the product APIs - --client-id= Overrides any default client ID when using API authentication. Use "none" to explicitly - set no client ID. Not applicable when using token authentication. - --endpoint= Override the endpoint for all product API calls - --env= Override the environment for all product API calls - --host= Override the host endpoint for all product API calls - --json Output in JSON format - --pretty-json Output in colorized JSON format - --token= Authenticate using an Ably Token or JWT Token instead of an API key + -v, --verbose Output verbose logs + --json Output in JSON format + --pretty-json Output in colorized JSON format DESCRIPTION Show the currently selected app @@ -725,7 +635,7 @@ EXAMPLES $ ably apps current --pretty-json ``` -_See code: [src/commands/apps/current.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/apps/current.ts)_ +_See code: [src/commands/apps/current.ts](https://github.com/ably/ably-cli/blob/v0.16.0/src/commands/apps/current.ts)_ ## `ably apps delete [APPID]` @@ -733,26 +643,17 @@ Delete an app ``` USAGE - $ ably apps delete [APPID] [--access-token ] [--api-key ] [--client-id ] [--env ] - [--endpoint ] [--host ] [--json | --pretty-json] [--token ] [-v] [-f] [--app ] + $ ably apps delete [APPID] [-v] [--json | --pretty-json] [-f] [--app ] ARGUMENTS APPID App ID to delete (uses current app if not specified) FLAGS - -f, --force Skip confirmation prompt - -v, --verbose Output verbose logs - --access-token= Overrides any configured access token used for the Control API - --api-key= Overrides any configured API key used for the product APIs - --app= App ID to delete (overrides argument and current app) - --client-id= Overrides any default client ID when using API authentication. Use "none" to explicitly - set no client ID. Not applicable when using token authentication. - --endpoint= Override the endpoint for all product API calls - --env= Override the environment for all product API calls - --host= Override the host endpoint for all product API calls - --json Output in JSON format - --pretty-json Output in colorized JSON format - --token= Authenticate using an Ably Token or JWT Token instead of an API key + -f, --force Skip confirmation prompt + -v, --verbose Output verbose logs + --app= App ID to delete (overrides argument and current app) + --json Output in JSON format + --pretty-json Output in colorized JSON format DESCRIPTION Delete an app @@ -764,7 +665,7 @@ EXAMPLES $ ably apps delete --app app-id - $ ably apps delete app-id --access-token "YOUR_ACCESS_TOKEN" + $ ABLY_ACCESS_TOKEN="YOUR_ACCESS_TOKEN" ably apps delete app-id $ ably apps delete app-id --force @@ -773,7 +674,7 @@ EXAMPLES $ ably apps delete app-id --pretty-json ``` -_See code: [src/commands/apps/delete.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/apps/delete.ts)_ +_See code: [src/commands/apps/delete.ts](https://github.com/ably/ably-cli/blob/v0.16.0/src/commands/apps/delete.ts)_ ## `ably apps list` @@ -781,21 +682,12 @@ List all apps in the current account ``` USAGE - $ ably apps list [--access-token ] [--api-key ] [--client-id ] [--env ] - [--endpoint ] [--host ] [--json | --pretty-json] [--token ] [-v] + $ ably apps list [-v] [--json | --pretty-json] FLAGS - -v, --verbose Output verbose logs - --access-token= Overrides any configured access token used for the Control API - --api-key= Overrides any configured API key used for the product APIs - --client-id= Overrides any default client ID when using API authentication. Use "none" to explicitly - set no client ID. Not applicable when using token authentication. - --endpoint= Override the endpoint for all product API calls - --env= Override the environment for all product API calls - --host= Override the host endpoint for all product API calls - --json Output in JSON format - --pretty-json Output in colorized JSON format - --token= Authenticate using an Ably Token or JWT Token instead of an API key + -v, --verbose Output verbose logs + --json Output in JSON format + --pretty-json Output in colorized JSON format DESCRIPTION List all apps in the current account @@ -808,7 +700,7 @@ EXAMPLES $ ably apps list --pretty-json ``` -_See code: [src/commands/apps/list.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/apps/list.ts)_ +_See code: [src/commands/apps/list.ts](https://github.com/ably/ably-cli/blob/v0.16.0/src/commands/apps/list.ts)_ ## `ably apps set-apns-p12 ID` @@ -816,28 +708,19 @@ Upload Apple Push Notification Service P12 certificate for an app ``` USAGE - $ ably apps set-apns-p12 ID --certificate [--access-token ] [--api-key ] [--client-id ] - [--env ] [--endpoint ] [--host ] [--json | --pretty-json] [--token ] [-v] [--password - ] [--use-for-sandbox] + $ ably apps set-apns-p12 ID --certificate [-v] [--json | --pretty-json] [--password ] + [--use-for-sandbox] ARGUMENTS ID App ID to set the APNS certificate for FLAGS - -v, --verbose Output verbose logs - --access-token= Overrides any configured access token used for the Control API - --api-key= Overrides any configured API key used for the product APIs - --certificate= (required) Path to the P12 certificate file - --client-id= Overrides any default client ID when using API authentication. Use "none" to explicitly - set no client ID. Not applicable when using token authentication. - --endpoint= Override the endpoint for all product API calls - --env= Override the environment for all product API calls - --host= Override the host endpoint for all product API calls - --json Output in JSON format - --password= Password for the P12 certificate - --pretty-json Output in colorized JSON format - --token= Authenticate using an Ably Token or JWT Token instead of an API key - --use-for-sandbox Whether to use this certificate for the APNS sandbox environment + -v, --verbose Output verbose logs + --certificate= (required) Path to the P12 certificate file + --json Output in JSON format + --password= Password for the P12 certificate + --pretty-json Output in colorized JSON format + --use-for-sandbox Whether to use this certificate for the APNS sandbox environment DESCRIPTION Upload Apple Push Notification Service P12 certificate for an app @@ -850,7 +733,7 @@ EXAMPLES $ ably apps set-apns-p12 app-id --certificate /path/to/certificate.p12 --use-for-sandbox ``` -_See code: [src/commands/apps/set-apns-p12.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/apps/set-apns-p12.ts)_ +_See code: [src/commands/apps/set-apns-p12.ts](https://github.com/ably/ably-cli/blob/v0.16.0/src/commands/apps/set-apns-p12.ts)_ ## `ably apps switch [APPID]` @@ -858,24 +741,15 @@ Switch to a different Ably app ``` USAGE - $ ably apps switch [APPID] [--access-token ] [--api-key ] [--client-id ] [--env ] - [--endpoint ] [--host ] [--json | --pretty-json] [--token ] [-v] + $ ably apps switch [APPID] [-v] [--json | --pretty-json] ARGUMENTS APPID ID of the app to switch to FLAGS - -v, --verbose Output verbose logs - --access-token= Overrides any configured access token used for the Control API - --api-key= Overrides any configured API key used for the product APIs - --client-id= Overrides any default client ID when using API authentication. Use "none" to explicitly - set no client ID. Not applicable when using token authentication. - --endpoint= Override the endpoint for all product API calls - --env= Override the environment for all product API calls - --host= Override the host endpoint for all product API calls - --json Output in JSON format - --pretty-json Output in colorized JSON format - --token= Authenticate using an Ably Token or JWT Token instead of an API key + -v, --verbose Output verbose logs + --json Output in JSON format + --pretty-json Output in colorized JSON format DESCRIPTION Switch to a different Ably app @@ -886,7 +760,7 @@ EXAMPLES $ ably apps switch ``` -_See code: [src/commands/apps/switch.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/apps/switch.ts)_ +_See code: [src/commands/apps/switch.ts](https://github.com/ably/ably-cli/blob/v0.16.0/src/commands/apps/switch.ts)_ ## `ably apps update ID` @@ -894,26 +768,17 @@ Update an app ``` USAGE - $ ably apps update ID [--access-token ] [--api-key ] [--client-id ] [--env ] - [--endpoint ] [--host ] [--json | --pretty-json] [--token ] [-v] [--name ] [--tls-only] + $ ably apps update ID [-v] [--json | --pretty-json] [--name ] [--tls-only] ARGUMENTS ID App ID to update FLAGS - -v, --verbose Output verbose logs - --access-token= Overrides any configured access token used for the Control API - --api-key= Overrides any configured API key used for the product APIs - --client-id= Overrides any default client ID when using API authentication. Use "none" to explicitly - set no client ID. Not applicable when using token authentication. - --endpoint= Override the endpoint for all product API calls - --env= Override the environment for all product API calls - --host= Override the host endpoint for all product API calls - --json Output in JSON format - --name= New name for the app - --pretty-json Output in colorized JSON format - --tls-only Whether the app should accept TLS connections only - --token= Authenticate using an Ably Token or JWT Token instead of an API key + -v, --verbose Output verbose logs + --json Output in JSON format + --name= New name for the app + --pretty-json Output in colorized JSON format + --tls-only Whether the app should accept TLS connections only DESCRIPTION Update an app @@ -925,10 +790,10 @@ EXAMPLES $ ably apps update app-id --name "Updated App Name" --tls-only - $ ably apps update app-id --name "Updated App Name" --access-token "YOUR_ACCESS_TOKEN" + $ ABLY_ACCESS_TOKEN="YOUR_ACCESS_TOKEN" ably apps update app-id --name "Updated App Name" ``` -_See code: [src/commands/apps/update.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/apps/update.ts)_ +_See code: [src/commands/apps/update.ts](https://github.com/ably/ably-cli/blob/v0.16.0/src/commands/apps/update.ts)_ ## `ably auth` @@ -955,7 +820,7 @@ COMMANDS ably auth revoke-token Revokes the token provided ``` -_See code: [src/commands/auth/index.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/auth/index.ts)_ +_See code: [src/commands/auth/index.ts](https://github.com/ably/ably-cli/blob/v0.16.0/src/commands/auth/index.ts)_ ## `ably auth issue-ably-token` @@ -963,26 +828,19 @@ Creates an Ably Token with capabilities ``` USAGE - $ ably auth issue-ably-token [--access-token ] [--api-key ] [--client-id ] [--env ] - [--endpoint ] [--host ] [--json | --pretty-json] [--token ] [-v] [--app ] [--capability - ] [--token-only] [--ttl ] + $ ably auth issue-ably-token [-v] [--json | --pretty-json] [--app ] [--capability ] [--client-id ] + [--token-only] [--ttl ] FLAGS - -v, --verbose Output verbose logs - --access-token= Overrides any configured access token used for the Control API - --api-key= Overrides any configured API key used for the product APIs - --app= App ID to use (uses current app if not specified) - --capability= [default: {"*":["*"]}] Capabilities JSON string (e.g. {"channel":["publish","subscribe"]}) - --client-id= Client ID to associate with the token. Use "none" to explicitly issue a token with no - client ID, otherwise a default will be generated. - --endpoint= Override the endpoint for all product API calls - --env= Override the environment for all product API calls - --host= Override the host endpoint for all product API calls - --json Output in JSON format - --pretty-json Output in colorized JSON format - --token= Authenticate using an Ably Token or JWT Token instead of an API key - --token-only Output only the token string without any formatting or additional information - --ttl= [default: 3600] Time to live in seconds (default: 3600, 1 hour) + -v, --verbose Output verbose logs + --app= App ID to use (uses current app if not specified) + --capability= [default: {"*":["*"]}] Capabilities JSON string (e.g. {"channel":["publish","subscribe"]}) + --client-id= Client ID to associate with the token. Use "none" to explicitly issue a token with no client + ID, otherwise a default will be generated. + --json Output in JSON format + --pretty-json Output in colorized JSON format + --token-only Output only the token string without any formatting or additional information + --ttl= [default: 3600] Time to live in seconds (default: 3600, 1 hour) DESCRIPTION Creates an Ably Token with capabilities @@ -1004,10 +862,10 @@ EXAMPLES $ ably auth issue-ably-token --token-only - $ ably channels publish --token "$(ably auth issue-ably-token --token-only)" my-channel "Hello" + $ ABLY_TOKEN="$(ably auth issue-ably-token --token-only)" ably channels publish my-channel "Hello" ``` -_See code: [src/commands/auth/issue-ably-token.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/auth/issue-ably-token.ts)_ +_See code: [src/commands/auth/issue-ably-token.ts](https://github.com/ably/ably-cli/blob/v0.16.0/src/commands/auth/issue-ably-token.ts)_ ## `ably auth issue-jwt-token` @@ -1015,26 +873,19 @@ Creates an Ably JWT token with capabilities ``` USAGE - $ ably auth issue-jwt-token [--access-token ] [--api-key ] [--client-id ] [--env ] - [--endpoint ] [--host ] [--json | --pretty-json] [--token ] [-v] [--app ] [--capability - ] [--token-only] [--ttl ] + $ ably auth issue-jwt-token [-v] [--json | --pretty-json] [--app ] [--capability ] [--client-id ] + [--token-only] [--ttl ] FLAGS - -v, --verbose Output verbose logs - --access-token= Overrides any configured access token used for the Control API - --api-key= Overrides any configured API key used for the product APIs - --app= App ID to use (uses current app if not specified) - --capability= [default: {"*":["*"]}] Capabilities JSON string (e.g. {"channel":["publish","subscribe"]}) - --client-id= Client ID to associate with the token. Use "none" to explicitly issue a token with no - client ID, otherwise a default will be generated. - --endpoint= Override the endpoint for all product API calls - --env= Override the environment for all product API calls - --host= Override the host endpoint for all product API calls - --json Output in JSON format - --pretty-json Output in colorized JSON format - --token= Authenticate using an Ably Token or JWT Token instead of an API key - --token-only Output only the token string without any formatting or additional information - --ttl= [default: 3600] Time to live in seconds (default: 3600, 1 hour) + -v, --verbose Output verbose logs + --app= App ID to use (uses current app if not specified) + --capability= [default: {"*":["*"]}] Capabilities JSON string (e.g. {"channel":["publish","subscribe"]}) + --client-id= Client ID to associate with the token. Use "none" to explicitly issue a token with no client + ID, otherwise a default will be generated. + --json Output in JSON format + --pretty-json Output in colorized JSON format + --token-only Output only the token string without any formatting or additional information + --ttl= [default: 3600] Time to live in seconds (default: 3600, 1 hour) DESCRIPTION Creates an Ably JWT token with capabilities @@ -1054,10 +905,10 @@ EXAMPLES $ ably auth issue-jwt-token --token-only - $ ably channels publish --token "$(ably auth issue-jwt-token --token-only)" my-channel "Hello" + $ ABLY_TOKEN="$(ably auth issue-jwt-token --token-only)" ably channels publish my-channel "Hello" ``` -_See code: [src/commands/auth/issue-jwt-token.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/auth/issue-jwt-token.ts)_ +_See code: [src/commands/auth/issue-jwt-token.ts](https://github.com/ably/ably-cli/blob/v0.16.0/src/commands/auth/issue-jwt-token.ts)_ ## `ably auth keys` @@ -1084,7 +935,7 @@ EXAMPLES $ ably auth keys switch KEY_ID ``` -_See code: [src/commands/auth/keys/index.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/auth/keys/index.ts)_ +_See code: [src/commands/auth/keys/index.ts](https://github.com/ably/ably-cli/blob/v0.16.0/src/commands/auth/keys/index.ts)_ ## `ably auth keys create` @@ -1092,26 +943,16 @@ Create a new API key for an app ``` USAGE - $ ably auth keys create --name [--access-token ] [--api-key ] [--client-id ] [--env - ] [--endpoint ] [--host ] [--json | --pretty-json] [--token ] [-v] [--app ] - [--capabilities ] + $ ably auth keys create --name [-v] [--json | --pretty-json] [--app ] [--capabilities ] FLAGS -v, --verbose Output verbose logs - --access-token= Overrides any configured access token used for the Control API - --api-key= Overrides any configured API key used for the product APIs --app= App ID the key belongs to (uses current app if not specified) --capabilities= [default: {"*":["*"]}] Capability object as a JSON string. Example: '{"channel:*":["publish"]}' - --client-id= Overrides any default client ID when using API authentication. Use "none" to explicitly - set no client ID. Not applicable when using token authentication. - --endpoint= Override the endpoint for all product API calls - --env= Override the environment for all product API calls - --host= Override the host endpoint for all product API calls --json Output in JSON format --name= (required) Name of the key --pretty-json Output in colorized JSON format - --token= Authenticate using an Ably Token or JWT Token instead of an API key DESCRIPTION Create a new API key for an app @@ -1136,7 +977,7 @@ EXAMPLES $ ably auth keys create --name "My New Key" --capabilities '{"channel1":["publish","subscribe"],"channel2":["history"]}' ``` -_See code: [src/commands/auth/keys/create.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/auth/keys/create.ts)_ +_See code: [src/commands/auth/keys/create.ts](https://github.com/ably/ably-cli/blob/v0.16.0/src/commands/auth/keys/create.ts)_ ## `ably auth keys current` @@ -1144,22 +985,13 @@ Show the current API key for the selected app ``` USAGE - $ ably auth keys current [--access-token ] [--api-key ] [--client-id ] [--env ] - [--endpoint ] [--host ] [--json | --pretty-json] [--token ] [-v] [--app ] + $ ably auth keys current [-v] [--json | --pretty-json] [--app ] FLAGS - -v, --verbose Output verbose logs - --access-token= Overrides any configured access token used for the Control API - --api-key= Overrides any configured API key used for the product APIs - --app= App ID to check key for (uses current app if not specified) - --client-id= Overrides any default client ID when using API authentication. Use "none" to explicitly - set no client ID. Not applicable when using token authentication. - --endpoint= Override the endpoint for all product API calls - --env= Override the environment for all product API calls - --host= Override the host endpoint for all product API calls - --json Output in JSON format - --pretty-json Output in colorized JSON format - --token= Authenticate using an Ably Token or JWT Token instead of an API key + -v, --verbose Output verbose logs + --app= App ID to check key for (uses current app if not specified) + --json Output in JSON format + --pretty-json Output in colorized JSON format DESCRIPTION Show the current API key for the selected app @@ -1174,7 +1006,7 @@ EXAMPLES $ ably auth keys current --pretty-json ``` -_See code: [src/commands/auth/keys/current.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/auth/keys/current.ts)_ +_See code: [src/commands/auth/keys/current.ts](https://github.com/ably/ably-cli/blob/v0.16.0/src/commands/auth/keys/current.ts)_ ## `ably auth keys get KEYNAMEORVALUE` @@ -1182,25 +1014,16 @@ Get details for a specific key ``` USAGE - $ ably auth keys get KEYNAMEORVALUE [--access-token ] [--api-key ] [--client-id ] [--env - ] [--endpoint ] [--host ] [--json | --pretty-json] [--token ] [-v] [--app ] + $ ably auth keys get KEYNAMEORVALUE [-v] [--json | --pretty-json] [--app ] ARGUMENTS KEYNAMEORVALUE Key name (APP_ID.KEY_ID) or full value of the key to get details for FLAGS - -v, --verbose Output verbose logs - --access-token= Overrides any configured access token used for the Control API - --api-key= Overrides any configured API key used for the product APIs - --app= App ID the key belongs to (uses current app if not specified) - --client-id= Overrides any default client ID when using API authentication. Use "none" to explicitly - set no client ID. Not applicable when using token authentication. - --endpoint= Override the endpoint for all product API calls - --env= Override the environment for all product API calls - --host= Override the host endpoint for all product API calls - --json Output in JSON format - --pretty-json Output in colorized JSON format - --token= Authenticate using an Ably Token or JWT Token instead of an API key + -v, --verbose Output verbose logs + --app= App ID the key belongs to (uses current app if not specified) + --json Output in JSON format + --pretty-json Output in colorized JSON format DESCRIPTION Get details for a specific key @@ -1215,7 +1038,7 @@ EXAMPLES $ ably auth keys get APP_ID.KEY_ID --pretty-json ``` -_See code: [src/commands/auth/keys/get.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/auth/keys/get.ts)_ +_See code: [src/commands/auth/keys/get.ts](https://github.com/ably/ably-cli/blob/v0.16.0/src/commands/auth/keys/get.ts)_ ## `ably auth keys list` @@ -1223,22 +1046,13 @@ List all keys in the app ``` USAGE - $ ably auth keys list [--access-token ] [--api-key ] [--client-id ] [--env ] - [--endpoint ] [--host ] [--json | --pretty-json] [--token ] [-v] [--app ] + $ ably auth keys list [-v] [--json | --pretty-json] [--app ] FLAGS - -v, --verbose Output verbose logs - --access-token= Overrides any configured access token used for the Control API - --api-key= Overrides any configured API key used for the product APIs - --app= App ID to list keys for (uses current app if not specified) - --client-id= Overrides any default client ID when using API authentication. Use "none" to explicitly - set no client ID. Not applicable when using token authentication. - --endpoint= Override the endpoint for all product API calls - --env= Override the environment for all product API calls - --host= Override the host endpoint for all product API calls - --json Output in JSON format - --pretty-json Output in colorized JSON format - --token= Authenticate using an Ably Token or JWT Token instead of an API key + -v, --verbose Output verbose logs + --app= App ID to list keys for (uses current app if not specified) + --json Output in JSON format + --pretty-json Output in colorized JSON format DESCRIPTION List all keys in the app @@ -1253,7 +1067,7 @@ EXAMPLES $ ably auth keys list --pretty-json ``` -_See code: [src/commands/auth/keys/list.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/auth/keys/list.ts)_ +_See code: [src/commands/auth/keys/list.ts](https://github.com/ably/ably-cli/blob/v0.16.0/src/commands/auth/keys/list.ts)_ ## `ably auth keys revoke KEYNAME` @@ -1261,26 +1075,17 @@ Revoke an API key (permanently disables the key) ``` USAGE - $ ably auth keys revoke KEYNAME [--access-token ] [--api-key ] [--client-id ] [--env ] - [--endpoint ] [--host ] [--json | --pretty-json] [--token ] [-v] [--app ] [--force] + $ ably auth keys revoke KEYNAME [-v] [--json | --pretty-json] [--app ] [--force] ARGUMENTS KEYNAME Key name (APP_ID.KEY_ID) of the key to revoke FLAGS - -v, --verbose Output verbose logs - --access-token= Overrides any configured access token used for the Control API - --api-key= Overrides any configured API key used for the product APIs - --app= App ID the key belongs to (uses current app if not specified) - --client-id= Overrides any default client ID when using API authentication. Use "none" to explicitly - set no client ID. Not applicable when using token authentication. - --endpoint= Override the endpoint for all product API calls - --env= Override the environment for all product API calls - --force Skip confirmation prompt - --host= Override the host endpoint for all product API calls - --json Output in JSON format - --pretty-json Output in colorized JSON format - --token= Authenticate using an Ably Token or JWT Token instead of an API key + -v, --verbose Output verbose logs + --app= App ID the key belongs to (uses current app if not specified) + --force Skip confirmation prompt + --json Output in JSON format + --pretty-json Output in colorized JSON format DESCRIPTION Revoke an API key (permanently disables the key) @@ -1297,7 +1102,7 @@ EXAMPLES $ ably auth keys revoke APP_ID.KEY_ID --pretty-json ``` -_See code: [src/commands/auth/keys/revoke.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/auth/keys/revoke.ts)_ +_See code: [src/commands/auth/keys/revoke.ts](https://github.com/ably/ably-cli/blob/v0.16.0/src/commands/auth/keys/revoke.ts)_ ## `ably auth keys switch [KEYNAMEORVALUE]` @@ -1305,25 +1110,16 @@ Switch to a different API key for the current app ``` USAGE - $ ably auth keys switch [KEYNAMEORVALUE] [--access-token ] [--api-key ] [--client-id ] [--env - ] [--endpoint ] [--host ] [--json | --pretty-json] [--token ] [-v] [--app ] + $ ably auth keys switch [KEYNAMEORVALUE] [-v] [--json | --pretty-json] [--app ] ARGUMENTS KEYNAMEORVALUE Key name (APP_ID.KEY_ID) or full value of the key to switch to FLAGS - -v, --verbose Output verbose logs - --access-token= Overrides any configured access token used for the Control API - --api-key= Overrides any configured API key used for the product APIs - --app= App ID to switch keys for (uses current app if not specified) - --client-id= Overrides any default client ID when using API authentication. Use "none" to explicitly - set no client ID. Not applicable when using token authentication. - --endpoint= Override the endpoint for all product API calls - --env= Override the environment for all product API calls - --host= Override the host endpoint for all product API calls - --json Output in JSON format - --pretty-json Output in colorized JSON format - --token= Authenticate using an Ably Token or JWT Token instead of an API key + -v, --verbose Output verbose logs + --app= App ID to switch keys for (uses current app if not specified) + --json Output in JSON format + --pretty-json Output in colorized JSON format DESCRIPTION Switch to a different API key for the current app @@ -1336,7 +1132,7 @@ EXAMPLES $ ably auth keys switch KEY_ID --app APP_ID ``` -_See code: [src/commands/auth/keys/switch.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/auth/keys/switch.ts)_ +_See code: [src/commands/auth/keys/switch.ts](https://github.com/ably/ably-cli/blob/v0.16.0/src/commands/auth/keys/switch.ts)_ ## `ably auth keys update KEYNAME` @@ -1344,28 +1140,19 @@ Update a key's properties ``` USAGE - $ ably auth keys update KEYNAME [--access-token ] [--api-key ] [--client-id ] [--env ] - [--endpoint ] [--host ] [--json | --pretty-json] [--token ] [-v] [--app ] - [--capabilities ] [--name ] + $ ably auth keys update KEYNAME [-v] [--json | --pretty-json] [--app ] [--capabilities ] [--name + ] ARGUMENTS KEYNAME Key name (APP_ID.KEY_ID) of the key to update FLAGS -v, --verbose Output verbose logs - --access-token= Overrides any configured access token used for the Control API - --api-key= Overrides any configured API key used for the product APIs --app= App ID the key belongs to (uses current app if not specified) --capabilities= New capabilities for the key (comma-separated list) - --client-id= Overrides any default client ID when using API authentication. Use "none" to explicitly - set no client ID. Not applicable when using token authentication. - --endpoint= Override the endpoint for all product API calls - --env= Override the environment for all product API calls - --host= Override the host endpoint for all product API calls --json Output in JSON format --name= New name for the key --pretty-json Output in colorized JSON format - --token= Authenticate using an Ably Token or JWT Token instead of an API key DESCRIPTION Update a key's properties @@ -1378,7 +1165,7 @@ EXAMPLES $ ably auth keys update APP_ID.KEY_ID --name "New Name" --capabilities "publish,subscribe" ``` -_See code: [src/commands/auth/keys/update.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/auth/keys/update.ts)_ +_See code: [src/commands/auth/keys/update.ts](https://github.com/ably/ably-cli/blob/v0.16.0/src/commands/auth/keys/update.ts)_ ## `ably auth revoke-token TOKEN` @@ -1386,25 +1173,18 @@ Revokes the token provided ``` USAGE - $ ably auth revoke-token TOKEN [--access-token ] [--api-key ] [-c ] [--env ] [--endpoint - ] [--host ] [--json | --pretty-json] [--token ] [-v] [--app ] [--debug] + $ ably auth revoke-token TOKEN [-v] [--json | --pretty-json] [--app ] [-c ] [--debug] ARGUMENTS TOKEN Token to revoke FLAGS - -c, --client-id= Client ID to revoke tokens for - -v, --verbose Output verbose logs - --access-token= Overrides any configured access token used for the Control API - --api-key= Overrides any configured API key used for the product APIs - --app= App ID to use (uses current app if not specified) - --debug Show debug information - --endpoint= Override the endpoint for all product API calls - --env= Override the environment for all product API calls - --host= Override the host endpoint for all product API calls - --json Output in JSON format - --pretty-json Output in colorized JSON format - --token= Authenticate using an Ably Token or JWT Token instead of an API key + -c, --client-id= Client ID to revoke tokens for + -v, --verbose Output verbose logs + --app= App ID to use (uses current app if not specified) + --debug Show debug information + --json Output in JSON format + --pretty-json Output in colorized JSON format DESCRIPTION Revokes the token provided @@ -1419,7 +1199,7 @@ EXAMPLES $ ably auth revoke-token TOKEN --pretty-json ``` -_See code: [src/commands/auth/revoke-token.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/auth/revoke-token.ts)_ +_See code: [src/commands/auth/revoke-token.ts](https://github.com/ably/ably-cli/blob/v0.16.0/src/commands/auth/revoke-token.ts)_ ## `ably autocomplete [SHELL]` @@ -1473,7 +1253,7 @@ COMMANDS ably bench subscriber Run a subscriber benchmark test ``` -_See code: [src/commands/bench/index.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/bench/index.ts)_ +_See code: [src/commands/bench/index.ts](https://github.com/ably/ably-cli/blob/v0.16.0/src/commands/bench/index.ts)_ ## `ably bench publisher CHANNEL` @@ -1481,9 +1261,8 @@ Run a publisher benchmark test ``` USAGE - $ ably bench publisher CHANNEL [--access-token ] [--api-key ] [--client-id ] [--env ] - [--endpoint ] [--host ] [--json | --pretty-json] [--token ] [-v] [--message-size ] [-m - ] [-r ] [-t rest|realtime] [--wait-for-subscribers] + $ ably bench publisher CHANNEL [-v] [--json | --pretty-json] [--message-size ] [-m ] [-r ] [-t + rest|realtime] [--wait-for-subscribers] ARGUMENTS CHANNEL The channel name to publish to @@ -1494,17 +1273,9 @@ FLAGS -t, --transport=