|
| 1 | +# 🛠 Ably CLI Restructure: Help System and Support Topic |
| 2 | + |
| 3 | +## Objective |
| 4 | + |
| 5 | +Align the CLI with industry standards by: |
| 6 | + |
| 7 | +* Making the `help` command idiomatic and intuitive |
| 8 | +* Avoiding overloaded or redundant command names (e.g. `help help`, `support support`) |
| 9 | +* Promoting support-related features to a dedicated and clearly named topic |
| 10 | + |
| 11 | +--- |
| 12 | + |
| 13 | +## 🎯 Key Changes |
| 14 | + |
| 15 | +### ✅ 1. Update `help` Command Behavior |
| 16 | + |
| 17 | +#### Current: |
| 18 | + |
| 19 | +* `ably help` shows all commands and also includes `help ask`, `help contact`, etc. |
| 20 | +* `help` is treated as both a command and a topic, leading to confusion. |
| 21 | + |
| 22 | +#### New behavior: |
| 23 | + |
| 24 | +* `ably help` or `ably` → show standard CLI usage and list of root commands. |
| 25 | +* `ably help <command>` → show help for that command (equivalent to `ably <command> --help`). |
| 26 | +* `--help` or `-h` → supported on all commands and subcommands. |
| 27 | +* `help` is no longer treated as a parent command topic (remove `help ask`, `help contact`, etc). |
| 28 | + |
| 29 | +#### Notes: |
| 30 | + |
| 31 | +* Ensure command-specific help works with both `--help` and `help <command>`. |
| 32 | +* The interactive shell should behave consistently with the above (`help` triggers the standard usage view). |
| 33 | + |
| 34 | +--- |
| 35 | + |
| 36 | +### ✅ 2. Promote `status` to a Top-Level Command |
| 37 | + |
| 38 | +#### Old: |
| 39 | + |
| 40 | +* `help status` |
| 41 | + |
| 42 | +#### New: |
| 43 | + |
| 44 | +* `ably status` |
| 45 | + |
| 46 | +#### Behavior: |
| 47 | + |
| 48 | +* Show current Ably service status |
| 49 | +* Optionally support `--open` flag to launch status page in browser |
| 50 | + |
| 51 | +--- |
| 52 | + |
| 53 | +### ✅ 3. Create a New `support` Topic |
| 54 | + |
| 55 | +Rename and regroup support-related subcommands under a new topic: `support`. |
| 56 | + |
| 57 | +#### Command structure: |
| 58 | + |
| 59 | +```bash |
| 60 | +ably support ask |
| 61 | +ably support contact |
| 62 | +ably support info |
| 63 | +``` |
| 64 | + |
| 65 | +#### Command Details: |
| 66 | + |
| 67 | +| Command | Description | |
| 68 | +| ---------------------- | --------------------------------------------------------- | |
| 69 | +| `ably support ask` | Interact with the Ably AI assistant for usage questions | |
| 70 | +| `ably support contact` | Show how to contact Ably (e.g. email, portal, link) | |
| 71 | +| `ably support info` | Show general support guidance (previously `help support`) | |
| 72 | + |
| 73 | +* `ably support` without args → show summary of available subcommands (ask, contact, info). |
| 74 | +* Remove `help ask`, `help contact`, `help support`. |
| 75 | + |
| 76 | +--- |
| 77 | + |
| 78 | +## 🧹 Cleanup and Consistency |
| 79 | + |
| 80 | +* Remove all traces of the old `help` subcommands from help output and CLI structure. |
| 81 | +* Ensure all commands under `support` and `status` have: |
| 82 | + |
| 83 | + * Proper descriptions in `--help` output |
| 84 | + * Tab completion (if supported) |
| 85 | + * Visibility in interactive mode's root listing (or in the “support” section) |
| 86 | + |
| 87 | +--- |
| 88 | + |
| 89 | +## 📋 Final Command Overview |
| 90 | + |
| 91 | +| Command | Description | |
| 92 | +| ----------------------- | ------------------------------------------------- | |
| 93 | +| `ably help` | Show help and list of top-level commands | |
| 94 | +| `ably <command> --help` | Show help for a specific command | |
| 95 | +| `ably help <command>` | Alias for above | |
| 96 | +| `ably status` | Check the current status of Ably systems | |
| 97 | +| `ably support ask` | Ask Ably’s AI assistant a usage question | |
| 98 | +| `ably support contact` | Show how to reach Ably’s support team | |
| 99 | +| `ably support info` | General support resources and documentation links | |
| 100 | + |
| 101 | +--- |
| 102 | + |
| 103 | +## 🗣 Messaging / UX Suggestions |
| 104 | + |
| 105 | +* In `ably --help` output, add a **Support Commands** section: |
| 106 | + |
| 107 | + ``` |
| 108 | + SUPPORT COMMANDS |
| 109 | + support ask Ask the Ably AI assistant a usage question |
| 110 | + support contact Show how to contact Ably |
| 111 | + support info General support resources and links |
| 112 | + status Check current status of Ably's platform |
| 113 | + ``` |
| 114 | + |
| 115 | +* In interactive mode welcome message, consider: |
| 116 | + |
| 117 | + ``` |
| 118 | + Type 'help' to see all commands. Need assistance? Try 'support ask' or 'support contact'. |
| 119 | + ``` |
| 120 | + |
| 121 | +# CLI Terminal Server |
| 122 | + |
| 123 | +Please look at the code in the Terminal Server (/cli-terminal-server) and investigate what tests or code may depend on this structure that may now need updating. For example, we have `help web-cli` command which will no longer exist. Consider whether we should change `help web-cli` completely and just make it an argument of the root level help command such as --web-cli. Consider whether there are any other hidden commands under help too that need addressing. Make changes to both repositories to reflect these changes. |
| 124 | + |
| 125 | +Once done, ensure all tests and linting is passing in the main CLI. |
| 126 | + |
| 127 | +We will then need to do a minor release of the CLI, so that we can test the changes in the CLI terminal server. Confirm when that is ready to be done, and bump the 0.9.0-alpha.[version] and tell me when to publish the NPM package. |
| 128 | + |
| 129 | +--- |
| 130 | + |
| 131 | +## ✅ Deliverables Checklist |
| 132 | + |
| 133 | +* [ ] Remove existing `help` subcommands from the command tree |
| 134 | +* [ ] Add `support` topic and subcommands: |
| 135 | + * [ ] `support ask` |
| 136 | + * [ ] `support contact` |
| 137 | + * [ ] `support info` |
| 138 | +* [ ] Promote `status` to root command |
| 139 | +* [ ] Ensure `help`, `--help`, and `help <command>` all work consistently |
| 140 | +* [ ] Update CLI banner, `--help` output, and interactive shell messages |
| 141 | +* [ ] Validate everything in interactive and non-interactive modes |
| 142 | +* [ ] Ensure Terminal Server is updated to reflect these changes |
| 143 | +* [ ] Once all tests in main are passing, confirm changes are made, so that we can bump the version and release a new NPM pacakge so that we can test the terminal server changes. |
| 144 | + |
0 commit comments