diff --git a/CHANGELOG.md b/CHANGELOG.md index 08aaf1d4..d1cb6427 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,121 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.16.0] - 2026-01-19 + +### Added + +- Signed config and signature support for HMAC authentication in Web CLI +- ISO8601 UTC timestamps and sequence numbers to long-running commands +- `--show-others` flag to `channels presence enter` command +- Multi-room support to `rooms messages subscribe` command +- Time-based filtering flags to `rooms messages history` command + +### Changed + +- Reorganized logs commands for better discoverability and removed channel-lifecycle duplication +- Standardized naming conventions across commands (BREAKING CHANGE - see migration notes below) +- Standardized success confirmation messages for create operations +- Confirmation prompts now accept both 'y' and 'yes' for better user experience +- History limit defaults now consistent between channels and rooms commands + +### Fixed + +- Web CLI auto-connect detection with signed config in rate limiter +- Web CLI consistent secret priority and domain-scoped credential clearing +- App ID resolution now only matches on name, preventing incorrect matches +- Queues delete command error handling +- channels/presence/enter no longer unnecessarily calls presence.get +- rooms list JSON error handling +- Inconsistent exit codes - now ensures non-zero on all errors +- rooms occupancy get no longer forces process.exit(0) + +### Migration Notes + +#### Breaking Changes: Standardized Command Parameter Naming + +To improve consistency and clarity across the CLI, we've standardized parameter names in several commands. If you have scripts or automation that use these commands, please update them accordingly: + +**Parameter Naming Changes:** +- `apps delete [ID]` → `apps delete [APPID]` - Now explicitly uses `APPID` for clarity +- `integrations delete RULEID` → `integrations delete INTEGRATIONID` - More accurately reflects that integrations are not rules +- `queues delete QUEUENAME` → `queues delete QUEUEID` - Changed to use ID instead of name for consistency + +**Command Changes:** +- `rooms messages subscribe ROOM` → `rooms messages subscribe ROOMS` - Now supports multiple rooms (space-separated) +- Logs commands reorganized: + - `apps logs` commands moved to `logs` top-level + - Removed duplicate channel-lifecycle commands from channels namespace + - All log commands now consistently under `logs` namespace + +**What You Need to Do:** + +If you're using any of these commands in scripts or CI/CD pipelines: +1. Update parameter names to match the new conventions +2. Update command paths for reorganized logs commands +3. Test your scripts to ensure they work with the new naming + +**Example Updates:** + +```bash +# Before (0.15.x) +ably apps delete my-app-123 +ably integrations delete rule-456 +ably queues delete my-queue-name +ably rooms messages subscribe my-room + +# After (0.16.0) +ably apps delete my-app-123 # APPID parameter +ably integrations delete integration-456 # INTEGRATIONID parameter +ably queues delete queue-id-789 # QUEUEID parameter +ably rooms messages subscribe room1 room2 # Multiple rooms supported +``` + +The interactive CLI will continue to guide you through the correct parameter names, but programmatic usage should be updated to match the new conventions. + +### Migration Notes + +#### Breaking Changes: Standardized Command Parameter Naming + +To improve consistency and clarity across the CLI, we've standardized parameter names in several commands. If you have scripts or automation that use these commands, please update them accordingly: + +**Parameter Naming Changes:** +- `apps delete [ID]` → `apps delete [APPID]` - Now explicitly uses `APPID` for clarity +- `integrations delete RULEID` → `integrations delete INTEGRATIONID` - More accurately reflects that integrations are not rules +- `queues delete QUEUENAME` → `queues delete QUEUEID` - Changed to use ID instead of name for consistency + +**Command Changes:** +- `rooms messages subscribe ROOM` → `rooms messages subscribe ROOMS` - Now supports multiple rooms (space-separated) +- Logs commands reorganized: + - `apps logs` commands moved to `logs` top-level + - Removed duplicate channel-lifecycle commands from channels namespace + - All log commands now consistently under `logs` namespace + +**What You Need to Do:** + +If you're using any of these commands in scripts or CI/CD pipelines: +1. Update parameter names to match the new conventions +2. Update command paths for reorganized logs commands +3. Test your scripts to ensure they work with the new naming + +**Example Updates:** + +```bash +# Before (0.15.x) +ably apps delete my-app-123 +ably integrations delete rule-456 +ably queues delete my-queue-name +ably rooms messages subscribe my-room + +# After (0.16.0) +ably apps delete my-app-123 # APPID parameter +ably integrations delete integration-456 # INTEGRATIONID parameter +ably queues delete queue-id-789 # QUEUEID parameter +ably rooms messages subscribe room1 room2 # Multiple rooms supported +``` + +The interactive CLI will continue to guide you through the correct parameter names, but programmatic usage should be updated to match the new conventions. + ## [0.15.0] - 2025-12-03 ### Added diff --git a/README.md b/README.md index d97885b3..835556a3 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,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-v22.14.0 $ ably --help [COMMAND] USAGE $ ably COMMAND @@ -103,11 +103,8 @@ See [MCP Server section](#mcp-server) for more details on how to use the MCP Ser * [`ably apps channel-rules update NAMEORID`](#ably-apps-channel-rules-update-nameorid) * [`ably apps create`](#ably-apps-create) * [`ably apps current`](#ably-apps-current) -* [`ably apps delete [ID]`](#ably-apps-delete-id) +* [`ably apps delete [APPID]`](#ably-apps-delete-appid) * [`ably apps list`](#ably-apps-list) -* [`ably apps logs`](#ably-apps-logs) -* [`ably apps logs history`](#ably-apps-logs-history) -* [`ably apps logs subscribe`](#ably-apps-logs-subscribe) * [`ably apps set-apns-p12 ID`](#ably-apps-set-apns-p12-id) * [`ably apps stats [ID]`](#ably-apps-stats-id) * [`ably apps switch [APPID]`](#ably-apps-switch-appid) @@ -132,7 +129,6 @@ See [MCP Server section](#mcp-server) for more details on how to use the MCP Ser * [`ably channels batch-publish [MESSAGE]`](#ably-channels-batch-publish-message) * [`ably channels history CHANNEL`](#ably-channels-history-channel) * [`ably channels list`](#ably-channels-list) -* [`ably channels logs [TOPIC]`](#ably-channels-logs-topic) * [`ably channels occupancy`](#ably-channels-occupancy) * [`ably channels occupancy get CHANNEL`](#ably-channels-occupancy-get-channel) * [`ably channels occupancy subscribe CHANNEL`](#ably-channels-occupancy-subscribe-channel) @@ -142,36 +138,35 @@ See [MCP Server section](#mcp-server) for more details on how to use the MCP Ser * [`ably channels publish CHANNEL MESSAGE`](#ably-channels-publish-channel-message) * [`ably channels subscribe CHANNELS`](#ably-channels-subscribe-channels) * [`ably config`](#ably-config) +* [`ably config path`](#ably-config-path) +* [`ably config show`](#ably-config-show) * [`ably connections`](#ably-connections) -* [`ably connections logs [TOPIC]`](#ably-connections-logs-topic) * [`ably connections stats`](#ably-connections-stats) * [`ably connections test`](#ably-connections-test) * [`ably help [COMMANDS]`](#ably-help-commands) * [`ably integrations`](#ably-integrations) * [`ably integrations create`](#ably-integrations-create) -* [`ably integrations delete RULEID`](#ably-integrations-delete-ruleid) +* [`ably integrations delete INTEGRATIONID`](#ably-integrations-delete-integrationid) * [`ably integrations get RULEID`](#ably-integrations-get-ruleid) * [`ably integrations list`](#ably-integrations-list) * [`ably integrations update RULEID`](#ably-integrations-update-ruleid) * [`ably login [TOKEN]`](#ably-login-token) * [`ably logs`](#ably-logs) -* [`ably logs app`](#ably-logs-app) -* [`ably logs app history`](#ably-logs-app-history) -* [`ably logs app subscribe`](#ably-logs-app-subscribe) * [`ably logs channel-lifecycle`](#ably-logs-channel-lifecycle) * [`ably logs channel-lifecycle subscribe`](#ably-logs-channel-lifecycle-subscribe) * [`ably logs connection-lifecycle`](#ably-logs-connection-lifecycle) * [`ably logs connection-lifecycle history`](#ably-logs-connection-lifecycle-history) * [`ably logs connection-lifecycle subscribe`](#ably-logs-connection-lifecycle-subscribe) -* [`ably logs connection subscribe`](#ably-logs-connection-subscribe) +* [`ably logs history`](#ably-logs-history) * [`ably logs push`](#ably-logs-push) * [`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 QUEUENAME`](#ably-queues-delete-queuename) +* [`ably queues delete QUEUEID`](#ably-queues-delete-queueid) * [`ably queues list`](#ably-queues-list) * [`ably rooms`](#ably-rooms) * [`ably rooms list`](#ably-rooms-list) @@ -182,7 +177,7 @@ See [MCP Server section](#mcp-server) for more details on how to use the MCP Ser * [`ably rooms messages reactions send ROOM MESSAGESERIAL REACTION`](#ably-rooms-messages-reactions-send-room-messageserial-reaction) * [`ably rooms messages reactions subscribe ROOM`](#ably-rooms-messages-reactions-subscribe-room) * [`ably rooms messages send ROOM TEXT`](#ably-rooms-messages-send-room-text) -* [`ably rooms messages subscribe ROOM`](#ably-rooms-messages-subscribe-room) +* [`ably rooms messages subscribe ROOMS`](#ably-rooms-messages-subscribe-rooms) * [`ably rooms occupancy`](#ably-rooms-occupancy) * [`ably rooms occupancy get ROOM`](#ably-rooms-occupancy-get-room) * [`ably rooms occupancy subscribe ROOM`](#ably-rooms-occupancy-subscribe-room) @@ -251,7 +246,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` @@ -286,7 +281,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` @@ -321,7 +316,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]` @@ -363,7 +358,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]` @@ -404,7 +399,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 stats` @@ -458,7 +453,7 @@ EXAMPLES $ ably accounts stats --live --interval 15 ``` -_See code: [src/commands/accounts/stats/index.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/accounts/stats/index.ts)_ +_See code: [src/commands/accounts/stats/index.ts](https://github.com/ably/ably-cli/blob/v0.16.0/src/commands/accounts/stats/index.ts)_ ## `ably accounts switch [ALIAS]` @@ -498,7 +493,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` @@ -534,14 +529,13 @@ COMMANDS ably apps current Show the currently selected app ably apps delete Delete an app ably apps list List all apps in the current account - ably apps logs Stream or retrieve app logs ably apps set-apns-p12 Upload Apple Push Notification Service P12 certificate for an app ably apps stats Get app stats with optional live updates ably apps switch Switch to a different Ably app 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` @@ -564,7 +558,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` @@ -616,7 +610,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` @@ -660,7 +654,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` @@ -683,7 +677,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` @@ -737,7 +731,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` @@ -774,7 +768,7 @@ EXAMPLES $ ably apps create --name "My New App" --access-token "YOUR_ACCESS_TOKEN" ``` -_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` @@ -809,19 +803,19 @@ 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 [ID]` +## `ably apps delete [APPID]` Delete an app ``` USAGE - $ ably apps delete [ID] [--access-token ] [--api-key ] [--client-id ] [--env ] + $ ably apps delete [APPID] [--access-token ] [--api-key ] [--client-id ] [--env ] [--endpoint ] [--host ] [--json | --pretty-json] [--token ] [-v] [-f] [--app ] ARGUMENTS - ID App ID to delete (uses current app if not specified) + APPID App ID to delete (uses current app if not specified) FLAGS -f, --force Skip confirmation prompt @@ -857,7 +851,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` @@ -892,105 +886,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)_ - -## `ably apps logs` - -Stream or retrieve app logs - -``` -USAGE - $ ably apps logs - -DESCRIPTION - Stream or retrieve app logs - -EXAMPLES - $ ably apps logs subscribe - - $ ably apps logs subscribe --rewind 10 - - $ ably apps logs history -``` - -_See code: [src/commands/apps/logs/index.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/apps/logs/index.ts)_ - -## `ably apps logs history` - -Alias for `ably logs app history` - -``` -USAGE - $ ably apps logs history [--access-token ] [--api-key ] [--client-id ] [--env ] - [--endpoint ] [--host ] [--pretty-json | --json] [--token ] [-v] [--direction - backwards|forwards] [--limit ] - -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. - --direction=