[DX-1326] docs: document ably init and use it across getting-started pages#3380
[DX-1326] docs: document ably init and use it across getting-started pages#3380umair-ably wants to merge 3 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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. Comment |
There was a problem hiding this comment.
Pull request overview
This PR introduces documentation for the new ably init CLI command and updates multiple getting-started guides to use a single-command CLI setup flow, while also integrating the new command into the CLI reference navigation.
Changes:
- Adds a new CLI reference page for
ably initat/docs/cli/init, including options and examples. - Updates the main Ably CLI docs page to lead with the new one-command setup flow.
- Replaces the existing “install CLI then login” snippets across Pub/Sub, Chat, and Push getting-started pages with the new init-based snippet, and wires the new page into the CLI index + platform nav.
Reviewed changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated 31 comments.
Show a summary per file
| File | Description |
|---|---|
| src/pages/docs/push/getting-started/web.mdx | Updates Push web getting-started CLI setup snippet to use init. |
| src/pages/docs/push/getting-started/react-native.mdx | Updates Push React Native getting-started CLI setup snippet to use init. |
| src/pages/docs/push/getting-started/flutter.mdx | Updates Push Flutter getting-started CLI setup snippet to use init. |
| src/pages/docs/push/getting-started/fcm.mdx | Updates Push FCM getting-started CLI setup snippet to use init. |
| src/pages/docs/push/getting-started/apns.mdx | Updates Push APNs getting-started CLI setup snippet to use init. |
| src/pages/docs/platform/tools/cli.mdx | Revises Ably CLI landing page install/usage sections to introduce ably init. |
| src/pages/docs/getting-started/swift.mdx | Updates Pub/Sub Swift getting-started CLI snippet to use init. |
| src/pages/docs/getting-started/ruby.mdx | Updates Pub/Sub Ruby getting-started CLI snippet to use init. |
| src/pages/docs/getting-started/react.mdx | Updates Pub/Sub React getting-started CLI snippet to use init. |
| src/pages/docs/getting-started/react-native.mdx | Updates Pub/Sub React Native getting-started CLI snippet to use init. |
| src/pages/docs/getting-started/python.mdx | Updates Pub/Sub Python getting-started CLI snippet to use init. |
| src/pages/docs/getting-started/php.mdx | Updates Pub/Sub PHP getting-started CLI snippet to use init. |
| src/pages/docs/getting-started/objective-c.mdx | Updates Pub/Sub Objective-C getting-started CLI snippet to use init. |
| src/pages/docs/getting-started/node.mdx | Updates Pub/Sub Node.js getting-started CLI snippet to use init. |
| src/pages/docs/getting-started/nextjs.mdx | Updates Pub/Sub Next.js getting-started CLI snippet to use init. |
| src/pages/docs/getting-started/laravel.mdx | Updates Pub/Sub Laravel getting-started CLI snippet to use init. |
| src/pages/docs/getting-started/kotlin.mdx | Updates Pub/Sub Kotlin getting-started CLI snippet to use init. |
| src/pages/docs/getting-started/javascript.mdx | Updates Pub/Sub JavaScript getting-started CLI snippet to use init. |
| src/pages/docs/getting-started/java.mdx | Updates Pub/Sub Java getting-started CLI snippet to use init. |
| src/pages/docs/getting-started/go.mdx | Updates Pub/Sub Go getting-started CLI snippet to use init. |
| src/pages/docs/getting-started/flutter.mdx | Updates Pub/Sub Flutter getting-started CLI snippet to use init. |
| src/pages/docs/getting-started/dotnet.mdx | Updates Pub/Sub .NET getting-started CLI snippet to use init. |
| src/pages/docs/cli/init.mdx | Adds the new ably init CLI reference page (synopsis/options/examples). |
| src/pages/docs/cli/index.mdx | Adds ably init to the CLI commands index table. |
| src/pages/docs/chat/getting-started/swift.mdx | Updates Chat Swift getting-started CLI snippet to use init. |
| src/pages/docs/chat/getting-started/swift-async-sequence.mdx | Updates Chat Swift AsyncSequence getting-started CLI snippet to use init. |
| src/pages/docs/chat/getting-started/react.mdx | Updates Chat React getting-started CLI snippet to use init. |
| src/pages/docs/chat/getting-started/react-ui-kit.mdx | Updates Chat React UI Kit getting-started CLI snippet to use init. |
| src/pages/docs/chat/getting-started/react-native.mdx | Updates Chat React Native getting-started CLI snippet to use init. |
| src/pages/docs/chat/getting-started/jvm.mdx | Updates Chat JVM getting-started CLI snippet to use init. |
| src/pages/docs/chat/getting-started/javascript.mdx | Updates Chat JavaScript getting-started CLI snippet to use init. |
| src/pages/docs/chat/getting-started/android.mdx | Updates Chat Android getting-started CLI snippet to use init. |
| src/data/nav/platform.ts | Adds /docs/cli/init to the platform navigation under Ably CLI Reference. |
Comments suppressed due to low confidence (1)
src/pages/docs/cli/init.mdx:92
npx -p @ably/cli initis likely incorrect: with-p,npxwill try to run an executable namedinit, but the Ably CLI executable isably. Usenpx @ably/cli initornpx -p @ably/cli ably initinstead.
npx -p @ably/cli init
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add a reference page for the new `ably init` command, link it from the CLI index and platform nav, and replace the two-step install/login snippet across getting-started, chat, and push pages with the single `npx -p @ably/cli init` command. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0cb540c to
7695d34
Compare
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
| Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test chat features. It can simulate other users by sending messages, entering presence, and acting as another user typing a message. | ||
|
|
||
| 1. Install the Ably CLI: | ||
| Install the Ably CLI, log in to your Ably account, and set the default app and API key in a single command: |
There was a problem hiding this comment.
| Install the Ably CLI, log in to your Ably account, and set the default app and API key in a single command: | |
| Ably CLI: Install, authenticate, configure the default app with API key and set up [ably agent skills](https://github.com/ably/agent-skills) in a single command |
As a third person, somehow log in to your Ably account doesn't give clarity on logging in for the purpose CLI authentication.
There was a problem hiding this comment.
Same can be applied across all updated docs.
There was a problem hiding this comment.
I'll update to mention auth, but I don't think we need to highlight the skills here. We still have an aside specifically for skills at the top of this page, and the updated CLI docs links also mention skills.
| <If loggedIn={false}> | ||
| <Aside data-type='note'> | ||
| The code examples in this guide include a demo API key. If you wish to interact with the Ably CLI and view outputs within your Ably account, ensure that you replace them with your own API key. | ||
| </Aside> | ||
| </If> |
There was a problem hiding this comment.
Since, npx -p @ably/cli ably init setup everything including authentication in a single command.
This note seems is unnecessary. Currently, it feels ambiguous or doesn't make sense.
There was a problem hiding this comment.
Same can be applied across all updated docs.
There was a problem hiding this comment.
this note is correct afaict... it only shows when not logged in to highlight that using the demo key alongside the CLI won't work.
The CLI doing auth in 1 step does not take away from needing to use the correct API key in the example code below
| @@ -44,24 +44,16 @@ | |||
|
|
|||
| Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test chat features. It can simulate other users by sending messages, entering presence, and acting as another user typing a message. | |||
There was a problem hiding this comment.
(Optional) can be removed so that Install Ably CLI becomes part of the standard development workflow. Even if users are not directly using ably-cli, the required skills are still installed as part of npx -p @ably/cli ably init.
(Optional) may have existed earlier because ably-cli was still pre-GA. Since ably-cli is now stable, users should be able to rely on it without issues.
There was a problem hiding this comment.
hmm I think we should still keep "optional" because the CLI step is optional with context of this getting started guide i.e. you don't need the CLI to use the getting-started guide
Replace external GitHub link with /docs/platform/tools/cli and shorten "log in to your Ably account" to "authenticate" across getting-started pages. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
/docs/cli/initfor theably initcommand, covering synopsis, options (--target,--json,--pretty-json,--verbose), examples, and supported AI coding tools (Claude Code, Cursor, VS Code, Windsurf).ably login" snippet across all getting-started pages (core, chat, push) with the singlenpx -p @ably/cli ably initcommand./docs/platform/tools/clito lead with the one-command install and explain whatably initdoes end-to-end.Test plan
yarn developand confirm/docs/cli/initrenders, appears in the platform nav, and is linked from the CLI index table./docs/platform/tools/clireads cleanly with the new lead-in and the alternativenpm install -g @ably/cliblock.🤖 Generated with Claude Code