Skip to content

[DX-787] [DX-791] Unify CLI output #147

Merged
umair-ably merged 18 commits intomainfrom
DX-787-791-consistency
Mar 5, 2026
Merged

[DX-787] [DX-791] Unify CLI output #147
umair-ably merged 18 commits intomainfrom
DX-787-791-consistency

Conversation

@umair-ably
Copy link
Contributor

@umair-ably umair-ably commented Mar 4, 2026

Unify CLI output with consistent helpers (progress, success, listening, resource)

Introduce src/utils/output.ts with shared formatting helpers and apply
them across all commands for consistent user-facing output: green ✓ for
success, cyan for resource names, dim for listening prompts. Also updates
examples to use kebab-case flags and adjusts tests to match.

Summary by CodeRabbit

Release Notes

  • New Features

    • Added standardized CLI output formatting with consistent success, progress, and listening indicators across commands.
  • Documentation

    • Added CLI output and flag conventions documentation.
  • Refactor

    • Standardized --app flag descriptions for consistency.
    • Updated limit and duration flag descriptions for clarity.
    • Replaced direct logging with centralized output helpers for uniform messaging.
    • Simplified success messages to emphasize actions over results.
    • Renamed --auto-type flag for consistency.
  • Tests

    • Updated test assertions to match new standardized output messages.

vladvelici and others added 11 commits March 2, 2026 10:09
  DX-786: Replaced monolithic globalFlags (16 flags on every command) with
  composable flag groups. Utility commands like `ably version` now only show
  --verbose/--json. Auth flags (--api-key, --access-token, --token) removed
  entirely — auth is via `ably login` or env vars (ABLY_API_KEY, ABLY_TOKEN,
  ABLY_ACCESS_TOKEN). Moved --endpoint to login/switch only, stored per-account
  in config. Removed --env and --host. Kept --client-id on presence commands.
@cursor
Copy link

cursor bot commented Mar 4, 2026

You have run out of free Bugbot PR reviews for this billing cycle. This will reset on April 4.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@vercel
Copy link

vercel bot commented Mar 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cli-web-cli Ready Ready Preview, Comment Mar 5, 2026 4:16pm

Request Review

@coderabbitai
Copy link

coderabbitai bot commented Mar 4, 2026

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: b481bed8-c79f-4b85-a197-a1ebd82da65c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

A new utility module standardizes CLI output formatting using four helpers (progress, success, listening, resource). Flag descriptions are systematically updated for consistency, and success messages are simplified across 80+ command files. Some commands have json flags removed or duration flag descriptions updated.

Changes

Cohort / File(s) Summary
New Output Utility
src/utils/output.ts
Introduces four exported helper functions: progress, success, listening, and resource for standardized CLI output formatting with chalk styling.
Documentation
.claude/CLAUDE.md, .cursor/rules/AI-Assistance.mdc
Adds sections documenting CLI output patterns and flag conventions using the new output helpers.
App Commands with Flag/Message Updates
src/commands/apps/create.ts, src/commands/apps/delete.ts, src/commands/apps/channel-rules/*
Updates app flag descriptions to "The app ID or name (defaults to current app)" and replaces chalk-based success messages with standardized output helpers.
Auth Commands
src/commands/auth/issue-*.ts, src/commands/auth/revoke-token.ts, src/commands/auth/keys/*
Standardizes app flag descriptions across all auth-related commands; replaces chalk success messages in key creation with resource and success helpers.
Bench Commands
src/commands/bench/publisher.ts, src/commands/bench/subscriber.ts
Replaces chalk-based completion messages with success helper; adds progress/resource/success formatting to subscriber messages and changes duration flag short form from -d to -D.
Channels Commands
src/commands/channels/history.ts, src/commands/channels/inspect.ts, src/commands/channels/list.ts, src/commands/channels/occupancy/subscribe.ts, src/commands/channels/presence/enter.ts, src/commands/channels/presence/subscribe.ts, src/commands/channels/publish.ts, src/commands/channels/subscribe.ts
Updates limit flag descriptions and replaces direct logging with progress/success/listening/resource helpers; updates duration flag wording from "given number" to "N".
Integrations Commands
src/commands/integrations/create.ts, src/commands/integrations/delete.ts, src/commands/integrations/get.ts, src/commands/integrations/list.ts, src/commands/integrations/update.ts
Standardizes app flag descriptions; replaces chalk success messages with resource and success helpers in create/delete operations.
Logs Commands
src/commands/logs/channel-lifecycle/subscribe.ts, src/commands/logs/connection-lifecycle/history.ts, src/commands/logs/connection-lifecycle/subscribe.ts, src/commands/logs/history.ts, src/commands/logs/push/history.ts, src/commands/logs/push/subscribe.ts, src/commands/logs/subscribe.ts
Updates limit and duration flag descriptions; removes json flag from channel-lifecycle and push subscribe; replaces direct logs with success/listening helpers.
Queues Commands
src/commands/queues/create.ts, src/commands/queues/delete.ts, src/commands/queues/list.ts
Standardizes app flag descriptions; replaces chalk success with resource and success helpers in create command.
Rooms Commands
src/commands/rooms/list.ts, src/commands/rooms/messages/history.ts, src/commands/rooms/messages/reactions/subscribe.ts, src/commands/rooms/messages/send.ts, src/commands/rooms/messages/subscribe.ts, src/commands/rooms/occupancy/subscribe.ts, src/commands/rooms/presence/enter.ts, src/commands/rooms/presence/subscribe.ts, src/commands/rooms/reactions/subscribe.ts, src/commands/rooms/typing/keystroke.ts, src/commands/rooms/typing/subscribe.ts
Updates limit/duration flag descriptions; replaces direct logs with success/listening/resource helpers; renames autoType to auto-type flag in keystroke command; changes success messages to concise format.
Spaces Commands
src/commands/spaces/cursors/get-all.ts, src/commands/spaces/cursors/set.ts, src/commands/spaces/list.ts, src/commands/spaces/locations/set.ts, src/commands/spaces/locks/acquire.ts, src/commands/spaces/members/enter.ts, src/commands/spaces/members/subscribe.ts
Updates limit/duration flag descriptions; replaces chalk success with resource/success/listening helpers; spaces/locations/set.ts adds E2E mode logic for duration=0 with streamlined flow and error suppression.
Stats Commands
src/commands/stats/account.ts, src/commands/stats/app.ts
Updates limit flag description to standardized "Maximum number of results to return" format with default values.
Test Files (E2E and Unit)
test/e2e/channels/*, test/e2e/rooms/rooms-e2e.test.ts, test/e2e/spaces/spaces-e2e.test.ts, test/unit/commands/apps/create.test.ts, test/unit/commands/auth/keys/create.test.ts, test/unit/commands/channels/publish.test.ts, test/unit/commands/integrations/create.test.ts, test/unit/commands/integrations/delete.test.ts, test/unit/commands/logs/*, test/unit/commands/queues/create.test.ts, test/unit/commands/rooms/features.test.ts, test/unit/commands/rooms/messages.test.ts, test/unit/commands/spaces/spaces.test.ts
Updates test expectations to match new output messages; relaxes exact message matching to generic phrases plus resource names; reflects flag and messaging changes across all affected commands.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested reviewers

  • jamiehenson
  • denissellu

Poem

🐰 Hops with glee through output streams,
Progress markers, success gleams,
Listening loud, resources styled,
CLI messages reconciled!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'DX-787 [DX-791] Unify CLI output' clearly summarizes the main objective: creating unified CLI output formatting across the codebase. It directly reflects the core change of introducing shared output helpers and standardizing user-facing messages.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch DX-787-791-consistency

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 8

🧹 Nitpick comments (2)
src/commands/spaces/members/subscribe.ts (1)

168-168: Use a listening-state message with listening(...).

At Line 168, listening("Subscribing to member events.") mixes states. Consider changing to “Listening for member events.” (and ideally emit it right after subscribe succeeds) for consistent semantics.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/commands/spaces/members/subscribe.ts` at line 168, Change the mixed-state
message to a proper listening-state message and emit it after the subscribe call
succeeds: replace the current this.log(`\n${listening("Subscribing to member
events.")}\n`) usage with this.log(`\n${listening("Listening for member
events.")}\n`) and move that line so it runs only after the subscribe
promise/operation completes successfully (locate the subscribe invocation inside
the subscribe command handler and place the listening(...) log in its success
callback / after await).
test/e2e/channels/channels-e2e.test.ts (1)

482-492: Consider asserting the channel name in count publish output

These checks verify progress wording, but not the output’s target channel. Adding one assertion improves contract coverage.

Proposed tweak
     expect(countPublishResult.stdout).toContain(
       "3/3 messages published to channel",
     );
+    expect(countPublishResult.stdout).toContain(countChannel);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/e2e/channels/channels-e2e.test.ts` around lines 482 - 492, Add an
assertion that the publish output includes the target channel name: update the
test around the existing expects that check countPublishResult.stdout (the lines
asserting "Message 1/2/3 published to channel" and "3/3 messages published to
channel") to also assert that countPublishResult.stdout contains the channel
identifier (use the test's channel variable, e.g., channelName or channel,
whichever is declared in this test) so the output verifies both progress text
and the actual channel target.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/commands/auth/keys/current.ts`:
- Line 19: The --app flag description overpromises name support because the
command reads flags.app directly into appId; either update the flag text to say
"app ID (defaults to current app)" or implement name→ID resolution before lookup
by calling your existing resolver (e.g., resolveAppNameToId or getAppByName) and
assign its result to appId when flags.app is not already an ID; modify the code
path in current.ts that sets appId from flags.app to perform resolution and
handle resolution errors, or simply change the description string to be ID-only
to keep behavior consistent.

In `@src/commands/auth/keys/list.ts`:
- Line 19: The flag description says "ID or name" but the command passes
flags.app straight through as appId without resolving names; update the handling
in the list command so flags.app is normalized to an ID before use (e.g., call
your app-resolution helper such as resolveAppNameToId/lookupAppByName and assign
the result to appId) or else change the flag description back to "ID" only;
specifically modify the code that reads flags.app and sets appId in the list
command (reference: flags.app and the variable appId) to perform name-to-ID
lookup and use the resolved ID where keys listing occurs.

In `@src/commands/auth/keys/revoke.ts`:
- Line 26: The flag description says names are allowed but the code in revoke.ts
passes flags.app straight into getKey/revokeKey as an appId; either resolve
names to IDs before those calls or update the flag text to only claim IDs. Fix
by adding an app-id resolution step (e.g., call a resolver like
resolveAppId(flags.app) or lookup the app by name and use its id) and then pass
that resolved id into getKey and revokeKey, or change the description string for
flags.app to "The app ID (defaults to current app)" so behavior and docs match;
update references to flags.app, getKey, and revokeKey accordingly.

In `@src/commands/auth/keys/update.ts`:
- Line 24: The description for the update command's --app flag claims it accepts
an "app ID or name" but the code uses flags.app as an ID without resolving
names; update the implementation so that when flags.app is provided it is
resolved to an app ID (e.g., call the existing app name→ID resolver or helper
used elsewhere) before use, or change the description to only say "app ID" if
you prefer not to add resolution; specifically modify the code paths in
src/commands/auth/keys/update.ts that reference flags.app to either invoke the
app resolution function (same resolver used by other commands) or update the
description string to remove "or name" to keep behavior and wording consistent.

In `@src/commands/bench/subscriber.ts`:
- Around line 37-38: The duration option's short flag was accidentally changed
to "D"; revert the option object's char value from "D" back to "d" in the
subscriber command definition (the duration option entry with description
"Automatically exit after N seconds (0 = run indefinitely)") so existing
scripts/tests expecting -d continue to work, and run the unit tests to confirm
the -d flag is recognized in help/output.

In `@src/commands/logs/push/subscribe.ts`:
- Around line 77-79: The success log is emitted before the actual subscribe
call; change the pre-subscribe message to a progress/info message (use this.log
with a progress or info helper instead of success) near where channelName is
referenced, then move the this.log(success(`Subscribed to
${resource(channelName)}.`)) and this.log(listening("Listening for push logs."))
lines into the post-subscribe path after channel.subscribe(...) completes
successfully so the success/listening messages are only logged once
channel.subscribe resolves.

In `@src/commands/rooms/occupancy/subscribe.ts`:
- Around line 118-120: The current success message `success(\`Subscribed to
occupancy in room: ${resource(this.roomName!)}.\`)` is emitted on room attach
before the occupancy subscription is actually set up; move or change this so it
only runs after the occupancy subscription promise completes (or after the
method that configures the subscription returns successfully). Locate the attach
branch where `this.roomName` is used and the occupancy subscription setup (e.g.,
the function/method that registers occupancy events or
`subscribeToOccupancy`/similar), await that operation and emit the success
message only after it resolves (or emit a separate "attached" message if you
need an immediate acknowledgement but keep the definitive "subscribed" message
after successful setup).

In `@src/commands/rooms/presence/subscribe.ts`:
- Around line 59-65: The code currently logs success and listening before the
subscription is actually established; change the flow in subscribe.ts so you
first emit a progress/connecting message (e.g., this.log with a connecting
message) before calling currentRoom.presence.subscribe(...) and completing auth,
then await/handle the subscription result and only after
currentRoom.presence.subscribe(...) resolves successfully call
this.log(success(`Subscribed to presence in room:
${resource(this.roomName!)}.`)) and this.log(listening("Listening for presence
events.")); ensure any errors from the subscribe call are caught and result in
an appropriate error log instead of emitting success.

---

Nitpick comments:
In `@src/commands/spaces/members/subscribe.ts`:
- Line 168: Change the mixed-state message to a proper listening-state message
and emit it after the subscribe call succeeds: replace the current
this.log(`\n${listening("Subscribing to member events.")}\n`) usage with
this.log(`\n${listening("Listening for member events.")}\n`) and move that line
so it runs only after the subscribe promise/operation completes successfully
(locate the subscribe invocation inside the subscribe command handler and place
the listening(...) log in its success callback / after await).

In `@test/e2e/channels/channels-e2e.test.ts`:
- Around line 482-492: Add an assertion that the publish output includes the
target channel name: update the test around the existing expects that check
countPublishResult.stdout (the lines asserting "Message 1/2/3 published to
channel" and "3/3 messages published to channel") to also assert that
countPublishResult.stdout contains the channel identifier (use the test's
channel variable, e.g., channelName or channel, whichever is declared in this
test) so the output verifies both progress text and the actual channel target.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: c75c5829-046c-4a18-a45b-7907b5c8e122

📥 Commits

Reviewing files that changed from the base of the PR and between a3cc7fa and 8e08112.

📒 Files selected for processing (82)
  • .claude/CLAUDE.md
  • .cursor/rules/AI-Assistance.mdc
  • src/commands/apps/channel-rules/create.ts
  • src/commands/apps/channel-rules/delete.ts
  • src/commands/apps/channel-rules/update.ts
  • src/commands/apps/create.ts
  • src/commands/apps/delete.ts
  • src/commands/auth/issue-ably-token.ts
  • src/commands/auth/issue-jwt-token.ts
  • src/commands/auth/keys/create.ts
  • src/commands/auth/keys/current.ts
  • src/commands/auth/keys/get.ts
  • src/commands/auth/keys/list.ts
  • src/commands/auth/keys/revoke.ts
  • src/commands/auth/keys/switch.ts
  • src/commands/auth/keys/update.ts
  • src/commands/auth/revoke-token.ts
  • src/commands/bench/publisher.ts
  • src/commands/bench/subscriber.ts
  • src/commands/channels/history.ts
  • src/commands/channels/inspect.ts
  • src/commands/channels/list.ts
  • src/commands/channels/occupancy/subscribe.ts
  • src/commands/channels/presence/enter.ts
  • src/commands/channels/presence/subscribe.ts
  • src/commands/channels/publish.ts
  • src/commands/channels/subscribe.ts
  • src/commands/integrations/create.ts
  • src/commands/integrations/delete.ts
  • src/commands/integrations/get.ts
  • src/commands/integrations/list.ts
  • src/commands/integrations/update.ts
  • src/commands/logs/channel-lifecycle/subscribe.ts
  • src/commands/logs/connection-lifecycle/history.ts
  • src/commands/logs/connection-lifecycle/subscribe.ts
  • src/commands/logs/history.ts
  • src/commands/logs/push/history.ts
  • src/commands/logs/push/subscribe.ts
  • src/commands/logs/subscribe.ts
  • src/commands/queues/create.ts
  • src/commands/queues/delete.ts
  • src/commands/queues/list.ts
  • src/commands/rooms/list.ts
  • src/commands/rooms/messages/history.ts
  • src/commands/rooms/messages/reactions/subscribe.ts
  • src/commands/rooms/messages/send.ts
  • src/commands/rooms/messages/subscribe.ts
  • src/commands/rooms/occupancy/subscribe.ts
  • src/commands/rooms/presence/enter.ts
  • src/commands/rooms/presence/subscribe.ts
  • src/commands/rooms/reactions/subscribe.ts
  • src/commands/rooms/typing/keystroke.ts
  • src/commands/rooms/typing/subscribe.ts
  • src/commands/spaces/cursors/get-all.ts
  • src/commands/spaces/cursors/set.ts
  • src/commands/spaces/list.ts
  • src/commands/spaces/locations/set.ts
  • src/commands/spaces/locks/acquire.ts
  • src/commands/spaces/members/enter.ts
  • src/commands/spaces/members/subscribe.ts
  • src/commands/stats/account.ts
  • src/commands/stats/app.ts
  • src/utils/output.ts
  • test/e2e/channels/channel-history-e2e.test.ts
  • test/e2e/channels/channel-occupancy-e2e.test.ts
  • test/e2e/channels/channel-presence-e2e.test.ts
  • test/e2e/channels/channel-subscribe-e2e.test.ts
  • test/e2e/channels/channels-e2e.test.ts
  • test/e2e/rooms/rooms-e2e.test.ts
  • test/e2e/spaces/spaces-e2e.test.ts
  • test/unit/commands/apps/create.test.ts
  • test/unit/commands/auth/keys/create.test.ts
  • test/unit/commands/channels/publish.test.ts
  • test/unit/commands/integrations/create.test.ts
  • test/unit/commands/integrations/delete.test.ts
  • test/unit/commands/logs/channel-lifecycle/subscribe.test.ts
  • test/unit/commands/logs/connection-lifecycle/subscribe.test.ts
  • test/unit/commands/logs/subscribe.test.ts
  • test/unit/commands/queues/create.test.ts
  • test/unit/commands/rooms/features.test.ts
  • test/unit/commands/rooms/messages.test.ts
  • test/unit/commands/spaces/spaces.test.ts

…ng, resource)

  Introduce src/utils/output.ts with shared formatting helpers and apply
  them across all commands for consistent user-facing output: green ✓ for
  success, cyan for resource names, dim for listening prompts. Also updates
  examples to use kebab-case flags and adjusts tests to match.
@umair-ably umair-ably force-pushed the DX-787-791-consistency branch from 8e08112 to 89335e2 Compare March 4, 2026 12:56
@umair-ably umair-ably force-pushed the DX-786-global-commands branch from a3cc7fa to 07dc49c Compare March 4, 2026 14:03
Base automatically changed from DX-786-global-commands to main March 5, 2026 13:42
Resolved conflicts keeping main's new features (clientIdFlag, json flags,
hidden endpoint, env var approach in tests, v0.16.0) while preserving
this branch's consistency changes (output helpers, kebab-case flags).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Standardizes Ably CLI human-readable output and common flag/help text across Channels, Rooms, Spaces, Logs, Control, and Bench commands by introducing shared formatting helpers and aligning tests/docs accordingly.

Changes:

  • Added src/utils/output.ts helper functions (progress, success, listening, resource) and adopted them across commands.
  • Standardized common flag descriptions (--app, --limit, --duration) and renamed --autoType to --auto-type.
  • Updated unit/e2e tests and documentation (README + AI assistant guidance) to match the new output/flag conventions.

Reviewed changes

Copilot reviewed 84 out of 84 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/unit/commands/spaces/spaces.test.ts Update output assertions
test/unit/commands/rooms/messages.test.ts Update output assertions
test/unit/commands/rooms/features.test.ts Update output assertions
test/unit/commands/queues/create.test.ts Update output assertions
test/unit/commands/logs/subscribe.test.ts Update output assertions
test/unit/commands/logs/connection-lifecycle/subscribe.test.ts Update output assertions
test/unit/commands/logs/channel-lifecycle/subscribe.test.ts Update output assertions
test/unit/commands/integrations/delete.test.ts Update output assertions
test/unit/commands/integrations/create.test.ts Update output assertions
test/unit/commands/channels/publish.test.ts Update output assertions
test/unit/commands/auth/keys/create.test.ts Update output assertions
test/unit/commands/apps/create.test.ts Update output assertions
test/e2e/spaces/spaces-e2e.test.ts Update ready signals/messages
test/e2e/rooms/rooms-e2e.test.ts Update ready signals/messages
test/e2e/channels/channels-e2e.test.ts Update publish assertions
test/e2e/channels/channel-subscribe-e2e.test.ts Update subscribe ready signal
test/e2e/channels/channel-presence-e2e.test.ts Update presence output assertion
test/e2e/channels/channel-occupancy-e2e.test.ts Update subscribe ready signal
test/e2e/channels/channel-history-e2e.test.ts Update publish assertions
src/utils/output.ts New output helpers
src/commands/stats/app.ts Standardize --limit help
src/commands/stats/account.ts Standardize --limit help
src/commands/spaces/members/subscribe.ts Use output helpers
src/commands/spaces/members/enter.ts Use output helpers
src/commands/spaces/locks/acquire.ts Use output helpers
src/commands/spaces/locations/set.ts Use output helpers + help tweaks
src/commands/spaces/list.ts Standardize --limit help
src/commands/spaces/cursors/set.ts Standardize --duration help
src/commands/spaces/cursors/get-all.ts Use output helpers
src/commands/rooms/typing/subscribe.ts Use output helpers
src/commands/rooms/typing/keystroke.ts Rename flag + use output helpers
src/commands/rooms/reactions/subscribe.ts Use output helpers
src/commands/rooms/presence/subscribe.ts Use output helpers
src/commands/rooms/presence/enter.ts Use output helpers
src/commands/rooms/occupancy/subscribe.ts Use output helpers
src/commands/rooms/messages/subscribe.ts Use output helpers
src/commands/rooms/messages/send.ts Use output helpers
src/commands/rooms/messages/reactions/subscribe.ts Standardize --duration help
src/commands/rooms/messages/history.ts Standardize --limit help
src/commands/rooms/list.ts Standardize --limit help
src/commands/queues/list.ts Standardize --app help
src/commands/queues/delete.ts Standardize --app help
src/commands/queues/create.ts Use output helpers + --app help
src/commands/logs/subscribe.ts Use output helpers
src/commands/logs/push/subscribe.ts Use output helpers
src/commands/logs/push/history.ts Standardize --limit help
src/commands/logs/history.ts Standardize --limit help
src/commands/logs/connection-lifecycle/subscribe.ts Use output helpers
src/commands/logs/connection-lifecycle/history.ts Standardize --limit help
src/commands/logs/channel-lifecycle/subscribe.ts Use output helpers
src/commands/integrations/update.ts Standardize --app help
src/commands/integrations/list.ts Standardize --app help
src/commands/integrations/get.ts Standardize --app help
src/commands/integrations/delete.ts Use output helpers + --app help
src/commands/integrations/create.ts Use output helpers + --app help
src/commands/channels/subscribe.ts Use output helpers
src/commands/channels/publish.ts Use output helpers + messages
src/commands/channels/presence/subscribe.ts Use output helpers
src/commands/channels/presence/enter.ts Use output helpers
src/commands/channels/occupancy/subscribe.ts Use output helpers
src/commands/channels/list.ts Standardize --limit help
src/commands/channels/inspect.ts Standardize --app help
src/commands/channels/history.ts Standardize --limit help
src/commands/bench/subscriber.ts Use output helpers + -D
src/commands/bench/publisher.ts Use output helpers
src/commands/auth/revoke-token.ts Standardize --app help
src/commands/auth/keys/update.ts Standardize --app help
src/commands/auth/keys/switch.ts Standardize --app help
src/commands/auth/keys/revoke.ts Standardize --app help
src/commands/auth/keys/list.ts Standardize --app help
src/commands/auth/keys/get.ts Standardize --app help
src/commands/auth/keys/current.ts Standardize --app help
src/commands/auth/keys/create.ts Use output helpers + --app help
src/commands/auth/issue-jwt-token.ts Standardize --app help
src/commands/auth/issue-ably-token.ts Standardize --app help
src/commands/apps/delete.ts Standardize --app help
src/commands/apps/create.ts Use output helpers
src/commands/apps/channel-rules/update.ts Standardize --app help
src/commands/apps/channel-rules/delete.ts Standardize --app help
src/commands/apps/channel-rules/create.ts Standardize --app help
align-cli.md Add conventions plan doc
README.md Update command docs/examples
.cursor/rules/AI-Assistance.mdc Document conventions
.claude/CLAUDE.md Document conventions
Comments suppressed due to low confidence (5)

src/commands/spaces/locations/set.ts:41

  • The --duration flag description says 0 = run indefinitely, but this command has a special duration === 0 fast-path (shouldExitImmediately) that exits immediately after setting the location (used for E2E mode). Update the flag description to reflect the actual behavior (or remove the special-case so 0 truly means indefinite).
    src/commands/spaces/cursors/set.ts:66
  • The --duration flag description says 0 = run indefinitely, but this command explicitly treats flags.duration === 0 as an immediate-exit mode (this.exit(0) after setting the cursor). Please align the description with the implemented semantics (or adjust the logic if the new standard is 0 = run indefinitely).
    README.md:231
  • These autogenerated See code links were changed from .../blob/v0.16.0/... to .../blob/v0.15.0/..., but package.json declares version 0.16.0. This makes the README point at the wrong tag across many sections; regenerate the README (e.g., via oclif readme) or update the links to match the current version.

See code: src/commands/accounts/index.ts

**README.md:3356**
* This README example uses a `--position` flag for `spaces cursors set`, but the command implementation (src/commands/spaces/cursors/set.ts) only supports `--x/--y` (or `--data` containing `position`). Update the example to use supported flags so users can copy/paste it successfully.

EXAMPLES
$ ably spaces cursors set my-space --position '{"x": 100, "y": 200}' --data '{"color": "red"}'

$ ably spaces cursors subscribe my-space

**README.md:3914**
* In the newly added `ably stats account` docs, the `--limit` flag description still says "Maximum number of stats records to return", but the command source was updated to "Maximum number of results to return (default: 10)". Regenerating the README from the updated command help output should fix this mismatch.
  --json                  Output in JSON format
  --limit=<value>         [default: 10] Maximum number of stats records to return
  --live                  Subscribe to live stats updates (uses minute interval)
  --pretty-json           Output in colorized JSON format
</details>



---

💡 <a href="/ably/ably-cli/new/main?filename=.github/instructions/*.instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add Copilot custom instructions</a> for smarter, more guided reviews. <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn how to get started</a>.

@umair-ably umair-ably force-pushed the DX-787-791-consistency branch from a2eff4e to 4d2013f Compare March 5, 2026 15:05
@umair-ably umair-ably marked this pull request as ready for review March 5, 2026 15:05
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 105 out of 105 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (7)

src/help.ts:150

  • In showCommandHelp(), the extra COMMANDS section is written with chalk.* via this.log(...) but it bypasses formatHelpOutput() / stripAnsi handling. When generating README/help with stripAnsi enabled, this can leak ANSI styling into the output. Consider routing these lines through the same formatHelpOutput()/stripAnsi path (or avoid chalk when opts.stripAnsi / GENERATING_README is set).
    src/commands/spaces/locations/set.ts:46
  • The --duration help text says 0 = run indefinitely, but this command treats duration === 0 as a special “exit immediately” E2E path (shouldExitImmediately). This makes the flag description misleading for users and inconsistent with actual behavior. Update the description to reflect the real semantics (or change the logic so 0 truly means indefinite).
    src/commands/spaces/cursors/set.ts:67
  • The --duration flag description says 0 = run indefinitely, but this command explicitly exits early when flags.duration === 0 (immediate exit mode after a short delay). The help text should match the implemented behavior (e.g., 0 = exit immediately after setting the cursor).
    src/commands/rooms/presence/subscribe.ts:73
  • This prints a success message (✓ Subscribed to presence...) before any connection/attach has happened, and it is emitted even when auth fails (the command later warns and just waits). That’s user-visible misinformation. Consider using progress(...)/listening(...) for the early readiness signal, and only logging success("Subscribed...") once the room is attached and presence subscription is active.
    src/commands/rooms/presence/subscribe.ts:279
  • After presence.subscribe(...) completes, the code logs listening("Subscribing to presence events."). This is both redundant (a listening message is already printed at startup) and the wording is inaccurate at this point (it’s no longer “subscribing”). Consider removing this line or changing it to a single consistent listening hint (e.g., Listening for presence events.) that’s only printed once.
    src/commands/spaces/locks/get.ts:68
  • This success message doesn’t follow the new output conventions introduced in this PR: it includes “Successfully …” and doesn’t end with a period. For consistency with other updated commands and the documented conventions, consider changing it to something like “Entered space: .” (no “Successfully”, with trailing period).
    README.md:231
  • The README “See code” links were updated from blob/v0.16.0 to blob/v0.15.0, but package.json in this PR is still version: 0.16.0. This makes the documentation links point at the wrong tag. Regenerate the README (or update the link version) so it matches the current CLI version/tag.

_See code: [src/commands/accounts/index.ts](https://github.com/ably/ably-cli/blob/v0.15.0/src/commands/accounts/index.ts)_


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sacOO7
Copy link
Contributor

sacOO7 commented Mar 5, 2026

Minor color issues ->

channel subscribe

> bin/run.js channels subscribe test

Using: Account=Free account (DIBHRw) • App=Sandbox (jy3uew) • Key=Root (jy3uew.oZJBOA)

Attaching to channel: <cyan>test</cyan>...
Successfully attached to channel test
✓ Subscribed to channel: <cyan>test</cyan>.
Listening for messages. Press Ctrl+C to exit.
[2026-03-05T15:23:17.002Z] Channel: test | Event: (none)
Data: data
  • In case of text Successfully attached to channel test => test isn't cyan here, also : not present before test

channel message publish

✓ Message published to channel <cyan>test</cyan>.
  • For above text => test isn't prefixed with :

channel message history

> bin/run.js channels history test

Using: Account=Free account (DIBHRw) • App=Sandbox (jy3uew) • Key=Root (jy3uew.oZJBOA)

Found 1 messages in the history of channel test:

[1] 2026-03-05T15:26:38.780Z
Event: <yellow>(none)</yellow>
Client ID: <blue>ably-cli-79aa6688</blue>
Data:
data
  • Message keys doesn't have colors, but values are using different colors, yellow and blue.
  • Is data supposed to have a color

Copy link
Contributor

@sacOO7 sacOO7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ( you can check failing CI for session tests )

@umair-ably umair-ably merged commit adedf69 into main Mar 5, 2026
14 of 15 checks passed
@umair-ably umair-ably deleted the DX-787-791-consistency branch March 5, 2026 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants