Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
314 changes: 182 additions & 132 deletions README.md

Large diffs are not rendered by default.

11 changes: 7 additions & 4 deletions docs/Product-Requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ The CLI uses topics (space-separated) to group related commands logically.
- `$ ably accounts list`: Lists locally configured accounts (aliases, token details, user info, account details).
- `$ ably accounts logout [ALIAS]`: Removes the access token and associated data for the specified (or default) account after warning.
- `$ ably accounts current`: Shows the currently selected account (alias or `default`) and verifies the token against the Control API `/me` endpoint.
- `$ ably accounts stats`: Views account stats. Supports `--live` for polling key metrics (peak connections, channels, message throughput, etc.).
- `$ ably accounts switch [ALIAS]`: Switches the active account configuration to the specified alias or prompts for selection.

**App Management (`ably apps`)**
Expand All @@ -45,7 +44,6 @@ The CLI uses topics (space-separated) to group related commands logically.
- `$ ably apps update ID`: Updates the app specified by `ID`. Supports `--name`, `--tls-only`.
- `$ ably apps delete [ID]`: Deletes the specified (or current) app after confirmation. Supports `--force`.
- `$ ably apps set-apns-p12 ID`: Uploads an APNS P12 certificate for the specified app `ID`. Requires `--certificate`. Supports `--password`, `--use-for-sandbox`.
- `$ ably apps stats [ID]`: Views app stats for the specified (or current) app. Supports `--live` polling, `--unit`, `--start`, `--end`, `--limit`.
- `$ ably apps switch [APPID]`: Switches the active app configuration to the specified App ID or prompts for selection.
- `$ ably apps current`: Shows the currently selected app configuration.
- `$ ably apps logs subscribe`: Alias for `ably logs app subscribe`.
Expand Down Expand Up @@ -94,7 +92,6 @@ The CLI uses topics (space-separated) to group related commands logically.
**Connections (`ably connections`)**
*(Interact with Pub/Sub connections)*

- `$ ably connections stats`: Shows connection stats (similar to `ably apps stats` but connection-focused). Supports `--live`.
- `$ ably connections test`: Performs a simple connection test. Supports transport options.
- `$ ably connections logs [TOPIC]`: Alias for `ably logs connection-lifecycle subscribe`. (Currently only supports `connection-lifecycle`).

Expand Down Expand Up @@ -159,6 +156,12 @@ The CLI uses topics (space-separated) to group related commands logically.
- `$ ably queues create`: Creates a queue. Requires various flags.
- `$ ably queues delete QUEUENAME`: Deletes a queue after confirmation. Supports `--force`.

**Statistics (`ably stats`)**
*(View usage statistics for accounts and apps)*

- `$ ably stats account`: Views account stats. Supports `--live` for polling key metrics (peak connections, channels, message throughput, etc.), `--unit`, `--start`, `--end`, `--limit`.
- `$ ably stats app [ID]`: Views app stats for the specified (or current) app. Supports `--live` polling, `--unit`, `--start`, `--end`, `--limit`.

**Benchmarking (`ably bench`)**
*(Run benchmark tests)*

Expand Down Expand Up @@ -317,7 +320,7 @@ The `AblyCliTerminal` React component can optionally support a split-screen mode
- Uses a distinct client ID prefix (`ably-mcp-`).
- **Available MCP Commands (Subset of CLI)**:
- `ably apps list`
- `ably apps stats`
- `ably stats app`
- `ably auth keys list`
- `ably channels history`
- `ably channels publish`
Expand Down
9 changes: 5 additions & 4 deletions docs/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@
- [ ] Test app update with partial data
- [ ] Test P12 certificate file upload handling
- [ ] Test failure scenarios: duplicate app names, API error mapping
- [ ] `apps stats`: Mock Control API calls, flag handling, output formats.
- [ ] **Stats:**
- [ ] `stats account`: Mock Control API calls, flag handling, output formats.
- [ ] Test stats parsing and formatting for different time ranges
- [ ] Test --live polling functionality with mocked responses
- [ ] `stats app`: Mock Control API calls, flag handling, output formats.
- [ ] Test stats parsing and formatting for different time ranges
- [ ] Test --live polling functionality with mocked responses
- [ ] `apps logs history/subscribe`: Mock Control API/SDK, flag handling, output formats, SIGINT handling.
Expand Down Expand Up @@ -107,9 +111,6 @@
- [ ] **Channel Rules (Legacy):**
- [ ] `channel-rule create/list/update/delete`: Mock Control API calls, flag handling, output formats. (Verify necessity).
- [ ] **Connections:**
- [ ] `connections stats`: Mock REST API call, flag handling, output formats.
- [ ] Test different stat aggregation periods
- [ ] Test connection types filtering
- [ ] `connections test`: Mock SDK connection attempts, flag handling, output formats.
- [ ] Test different transport options (WebSockets, HTTP)
- [ ] Test environment selection
Expand Down
1 change: 0 additions & 1 deletion src/commands/accounts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ export default class AccountsCommand extends BaseTopicCommand {
"$ ably accounts current",
"$ ably accounts logout",
"$ ably accounts switch my-account",
"$ ably accounts stats",
];
}
77 changes: 0 additions & 77 deletions src/commands/accounts/stats/README.md

This file was deleted.

1 change: 0 additions & 1 deletion src/commands/apps/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export default class AppsCommand extends BaseTopicCommand {
"$ ably apps update",
"$ ably apps delete",
"$ ably apps set-apns-p12",
"$ ably apps stats",
"$ ably apps channel-rules list",
"$ ably apps switch my-app",
];
Expand Down
1 change: 0 additions & 1 deletion src/commands/connections/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export default class Connections extends BaseTopicCommand {
static override description = "Interact with Ably Pub/Sub connections";

static override examples = [
"<%= config.bin %> <%= command.id %> stats",
"<%= config.bin %> <%= command.id %> logs connections-lifecycle",
"<%= config.bin %> <%= command.id %> test",
];
Expand Down
Loading
Loading