From 379ea0386a3b52c365e1f1bc5a1268800a7b0578 Mon Sep 17 00:00:00 2001 From: umair Date: Wed, 13 May 2026 12:02:26 +0100 Subject: [PATCH 1/6] docs: document ably init and use it across getting-started pages 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) --- src/data/nav/platform.ts | 1 + .../docs/chat/getting-started/android.mdx | 12 +- .../docs/chat/getting-started/javascript.mdx | 12 +- src/pages/docs/chat/getting-started/jvm.mdx | 12 +- .../chat/getting-started/react-native.mdx | 12 +- .../chat/getting-started/react-ui-kit.mdx | 12 +- src/pages/docs/chat/getting-started/react.mdx | 12 +- .../getting-started/swift-async-sequence.mdx | 12 +- src/pages/docs/chat/getting-started/swift.mdx | 12 +- src/pages/docs/cli/index.mdx | 1 + src/pages/docs/cli/init.mdx | 108 ++++++++++++++++++ src/pages/docs/getting-started/dotnet.mdx | 12 +- src/pages/docs/getting-started/flutter.mdx | 12 +- src/pages/docs/getting-started/go.mdx | 12 +- src/pages/docs/getting-started/java.mdx | 12 +- src/pages/docs/getting-started/javascript.mdx | 12 +- src/pages/docs/getting-started/kotlin.mdx | 12 +- src/pages/docs/getting-started/laravel.mdx | 12 +- src/pages/docs/getting-started/nextjs.mdx | 12 +- src/pages/docs/getting-started/node.mdx | 12 +- .../docs/getting-started/objective-c.mdx | 12 +- src/pages/docs/getting-started/php.mdx | 12 +- src/pages/docs/getting-started/python.mdx | 12 +- .../docs/getting-started/react-native.mdx | 12 +- src/pages/docs/getting-started/react.mdx | 12 +- src/pages/docs/getting-started/ruby.mdx | 12 +- src/pages/docs/getting-started/swift.mdx | 12 +- src/pages/docs/platform/tools/cli.mdx | 20 ++-- src/pages/docs/push/getting-started/apns.mdx | 12 +- src/pages/docs/push/getting-started/fcm.mdx | 12 +- .../docs/push/getting-started/flutter.mdx | 12 +- .../push/getting-started/react-native.mdx | 12 +- src/pages/docs/push/getting-started/web.mdx | 12 +- 33 files changed, 181 insertions(+), 297 deletions(-) create mode 100644 src/pages/docs/cli/init.mdx diff --git a/src/data/nav/platform.ts b/src/data/nav/platform.ts index f2c7642301..a152b9ad08 100644 --- a/src/data/nav/platform.ts +++ b/src/data/nav/platform.ts @@ -360,6 +360,7 @@ export default { link: '/docs/cli', index: true, }, + { name: 'Init', link: '/docs/cli/init' }, { name: 'Login', link: '/docs/cli/login' }, { name: 'Accounts', diff --git a/src/pages/docs/chat/getting-started/android.mdx b/src/pages/docs/chat/getting-started/android.mdx index a5632c5b72..5c2855d81f 100644 --- a/src/pages/docs/chat/getting-started/android.mdx +++ b/src/pages/docs/chat/getting-started/android.mdx @@ -44,19 +44,11 @@ implementation("com.ably.chat:chat-extensions-compose:1.2.0") 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: ```shell -npm install -g @ably/cli -``` - - -2. Run the following to log in to your Ably account and set the default app and API key: - - -```shell -ably login +npx -p @ably/cli ably init ``` diff --git a/src/pages/docs/chat/getting-started/javascript.mdx b/src/pages/docs/chat/getting-started/javascript.mdx index 454e154838..4cf3ca7d32 100644 --- a/src/pages/docs/chat/getting-started/javascript.mdx +++ b/src/pages/docs/chat/getting-started/javascript.mdx @@ -62,19 +62,11 @@ echo "ABLY_API_KEY={{API_KEY}}" > .env 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: ```shell -npm install -g @ably/cli -``` - - -2. Run the following to log in to your Ably account and set the default app and API key: - - -```shell -ably login +npx -p @ably/cli ably init ``` diff --git a/src/pages/docs/chat/getting-started/jvm.mdx b/src/pages/docs/chat/getting-started/jvm.mdx index 475c54bc5e..28c917b588 100644 --- a/src/pages/docs/chat/getting-started/jvm.mdx +++ b/src/pages/docs/chat/getting-started/jvm.mdx @@ -59,19 +59,11 @@ implementation("org.slf4j:slf4j-nop:2.0.17") 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: ```shell -npm install -g @ably/cli -``` - - -2. Run the following to log in to your Ably account and set the default app and API key: - - -```shell -ably login +npx -p @ably/cli ably init ``` diff --git a/src/pages/docs/chat/getting-started/react-native.mdx b/src/pages/docs/chat/getting-started/react-native.mdx index b417816ba5..b48549760c 100644 --- a/src/pages/docs/chat/getting-started/react-native.mdx +++ b/src/pages/docs/chat/getting-started/react-native.mdx @@ -53,19 +53,11 @@ cd ios && pod install && cd .. 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: ```shell -npm install -g @ably/cli -``` - - -2. Run the following to log in to your Ably account and set the default app and API key: - - -```shell -ably login +npx -p @ably/cli ably init ``` diff --git a/src/pages/docs/chat/getting-started/react-ui-kit.mdx b/src/pages/docs/chat/getting-started/react-ui-kit.mdx index b66f28af30..a58c8a4713 100644 --- a/src/pages/docs/chat/getting-started/react-ui-kit.mdx +++ b/src/pages/docs/chat/getting-started/react-ui-kit.mdx @@ -67,19 +67,11 @@ That's all the setup you need—the kit's CSS is automatically bundled by Vite a 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: ```shell -npm install -g @ably/cli -``` - - -2. Run the following to log in to your Ably account and set the default app and API key: - - -```shell -ably login +npx -p @ably/cli ably init ``` diff --git a/src/pages/docs/chat/getting-started/react.mdx b/src/pages/docs/chat/getting-started/react.mdx index 348634a977..3a5279dfc5 100644 --- a/src/pages/docs/chat/getting-started/react.mdx +++ b/src/pages/docs/chat/getting-started/react.mdx @@ -60,19 +60,11 @@ echo "VITE_ABLY_API_KEY={{API_KEY}}" > .env 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: ```shell -npm install -g @ably/cli -``` - - -2. Run the following to log in to your Ably account and set the default app and API key: - - -```shell -ably login +npx -p @ably/cli ably init ``` diff --git a/src/pages/docs/chat/getting-started/swift-async-sequence.mdx b/src/pages/docs/chat/getting-started/swift-async-sequence.mdx index 24c21756a5..0a1409228c 100644 --- a/src/pages/docs/chat/getting-started/swift-async-sequence.mdx +++ b/src/pages/docs/chat/getting-started/swift-async-sequence.mdx @@ -25,19 +25,11 @@ Using an AI coding assistant? [Teach it Ably](/docs/platform/ai-llms#agent-skill 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: ```shell -npm install -g @ably/cli -``` - - -2. Run the following to log in to your Ably account and set the default app and API key: - - -```shell -ably login +npx -p @ably/cli ably init ``` diff --git a/src/pages/docs/chat/getting-started/swift.mdx b/src/pages/docs/chat/getting-started/swift.mdx index b9f46db09a..dace797221 100644 --- a/src/pages/docs/chat/getting-started/swift.mdx +++ b/src/pages/docs/chat/getting-started/swift.mdx @@ -25,19 +25,11 @@ Using an AI coding assistant? [Teach it Ably](/docs/platform/ai-llms#agent-skill 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: ```shell -npm install -g @ably/cli -``` - - -2. Run the following to log in to your Ably account and set the default app and API key: - - -```shell -ably login +npx -p @ably/cli ably init ``` diff --git a/src/pages/docs/cli/index.mdx b/src/pages/docs/cli/index.mdx index 0466338270..4a865b68b2 100644 --- a/src/pages/docs/cli/index.mdx +++ b/src/pages/docs/cli/index.mdx @@ -28,6 +28,7 @@ The following top-level commands are available in the Ably CLI: | Command | Description | | ------- | ----------- | +| [`ably init`](/docs/cli/init) | Set up the Ably CLI in one command: install, authenticate, and install [Agent Skills](https://github.com/ably/agent-skills) into your AI coding tools | | [`ably login`](/docs/cli/login) | Log in to your Ably account (alias for "ably accounts login") | | [`ably accounts`](/docs/cli/accounts) | Manage Ably accounts and your configured access tokens | | [`ably apps`](/docs/cli/apps) | Manage Ably apps | diff --git a/src/pages/docs/cli/init.mdx b/src/pages/docs/cli/init.mdx new file mode 100644 index 0000000000..c44169d305 --- /dev/null +++ b/src/pages/docs/cli/init.mdx @@ -0,0 +1,108 @@ +--- +title: "Init" +meta_description: "Set up the Ably CLI in a single command: install, authenticate, and install Agent Skills into AI coding tools." +meta_keywords: "ably cli, cli, init, ably init, onboarding, agent skills, claude code, cursor, vs code, windsurf" +--- + +Use the `ably init` command to set up the Ably CLI in a single step. It installs the CLI, authenticates you with [OAuth Device Authorization](https://datatracker.ietf.org/doc/html/rfc8628), and installs the Ably [Agent Skills](https://github.com/ably/agent-skills) into any AI coding tools detected on your machine. + +Supported AI coding tools: + +* [Claude Code](https://www.anthropic.com/claude-code) - installed via the `@ably/agent-skills` Claude Code plugin. +* [Cursor](https://cursor.com) +* [VS Code](https://code.visualstudio.com) (GitHub Copilot) +* [Windsurf](https://windsurf.com) + +For tools other than Claude Code, the skill files are copied directly into the tool's user skills directory. + +## Synopsis + + +```shell +ably init [options] +``` + + +You can also run `init` without installing the CLI first: + + +```shell +npx -p @ably/cli ably init +``` + + +## Options + +### `--target | -t` + +Target AI coding tools to install Agent Skills for. Defaults to `auto`, which detects installed tools and prompts you to choose. Repeat the flag to specify multiple tools. + +Supported values: + +* `auto` - Auto-detect installed tools (default). +* `claude-code` - Claude Code. +* `cursor` - Cursor. +* `vscode` - VS Code (GitHub Copilot). +* `windsurf` - Windsurf. + +`auto` cannot be combined with explicit targets. + +### `--json` + +Output results as compact JSON. Mutually exclusive with `--pretty-json`. + +### `--pretty-json` + +Output results in formatted, colorized JSON. Mutually exclusive with `--json`. + +### `--verbose | -v` + +Enable verbose logging. Can be combined with `--json` or `--pretty-json`. + +## Examples + +Set up the CLI with auto-detected AI coding tools: + + +```shell +ably init +``` + + +Install Agent Skills for Claude Code only: + + +```shell +ably init --target claude-code +``` + + +Install Agent Skills for Cursor and Windsurf: + + +```shell +ably init --target cursor --target windsurf +``` + + +Set up the CLI without installing it first: + + +```shell +npx -p @ably/cli ably init +``` + + +Run `init` in JSON mode for use in scripts: + + +```shell +ably init --json +``` + + +## See also + +* [Login](/docs/cli/login) - Authenticate without installing Agent Skills. +* [Environment variables](/docs/cli/env) - Authenticate via environment variables instead of OAuth. +* [CLI reference](/docs/cli) - Full list of available commands. diff --git a/src/pages/docs/getting-started/dotnet.mdx b/src/pages/docs/getting-started/dotnet.mdx index 554f0aaafc..88f550c8e9 100644 --- a/src/pages/docs/getting-started/dotnet.mdx +++ b/src/pages/docs/getting-started/dotnet.mdx @@ -41,19 +41,11 @@ dotnet add package ably.io Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -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: ```shell -npm install -g @ably/cli -``` - - -2. Run the following to log in to your Ably account and set the default app and API key: - - -```shell -ably login +npx -p @ably/cli ably init ``` diff --git a/src/pages/docs/getting-started/flutter.mdx b/src/pages/docs/getting-started/flutter.mdx index 7ab9a5e581..61a38773a6 100644 --- a/src/pages/docs/getting-started/flutter.mdx +++ b/src/pages/docs/getting-started/flutter.mdx @@ -167,19 +167,11 @@ Initialize the Ably service at the application level to prevent it from being re Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -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: ```shell -npm install -g @ably/cli -``` - - -2. Run the following to log in to your Ably account and set the default app and API key: - - -```shell -ably login +npx -p @ably/cli ably init ``` diff --git a/src/pages/docs/getting-started/go.mdx b/src/pages/docs/getting-started/go.mdx index c887b45ce0..9c0dc8bc7f 100644 --- a/src/pages/docs/getting-started/go.mdx +++ b/src/pages/docs/getting-started/go.mdx @@ -34,19 +34,11 @@ go get -u github.com/ably/ably-go/ably Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -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: ```shell -npm install -g @ably/cli -``` - - -2. Run the following to log in to your Ably account and set the default app and API key: - - -```shell -ably login +npx -p @ably/cli ably init ``` diff --git a/src/pages/docs/getting-started/java.mdx b/src/pages/docs/getting-started/java.mdx index ddf606bdb0..f9cf3bcd68 100644 --- a/src/pages/docs/getting-started/java.mdx +++ b/src/pages/docs/getting-started/java.mdx @@ -52,19 +52,11 @@ Using an AI coding assistant? [Teach it Ably](/docs/platform/ai-llms#agent-skill Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -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: ```shell -npm install -g @ably/cli -``` - - -2. Run the following to log in to your Ably account and set the default app and API key: - - -```shell -ably login +npx -p @ably/cli ably init ``` diff --git a/src/pages/docs/getting-started/javascript.mdx b/src/pages/docs/getting-started/javascript.mdx index aa85086707..85cd0cbdf0 100644 --- a/src/pages/docs/getting-started/javascript.mdx +++ b/src/pages/docs/getting-started/javascript.mdx @@ -26,19 +26,11 @@ Using an AI coding assistant? [Teach it Ably](/docs/platform/ai-llms#agent-skill Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -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: ```shell -npm install -g @ably/cli -``` - - -2. Run the following to log in to your Ably account and set the default app and API key: - - -```shell -ably login +npx -p @ably/cli ably init ``` diff --git a/src/pages/docs/getting-started/kotlin.mdx b/src/pages/docs/getting-started/kotlin.mdx index f787682a3c..6384b6cf9c 100644 --- a/src/pages/docs/getting-started/kotlin.mdx +++ b/src/pages/docs/getting-started/kotlin.mdx @@ -31,19 +31,11 @@ implementation("io.ably:ably-java:") Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -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: ```shell -npm install -g @ably/cli -``` - - -2. Run the following to log in to your Ably account and set the default app and API key: - - -```shell -ably login +npx -p @ably/cli ably init ``` diff --git a/src/pages/docs/getting-started/laravel.mdx b/src/pages/docs/getting-started/laravel.mdx index ed90ca073f..7ac0526ea6 100644 --- a/src/pages/docs/getting-started/laravel.mdx +++ b/src/pages/docs/getting-started/laravel.mdx @@ -50,19 +50,11 @@ npm run dev Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -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: ```shell -npm install -g @ably/cli -``` - - -2. Run the following to log in to your Ably account and set the default app and API key: - - -```shell -ably login +npx -p @ably/cli ably init ``` diff --git a/src/pages/docs/getting-started/nextjs.mdx b/src/pages/docs/getting-started/nextjs.mdx index 4991984908..7a612ce990 100644 --- a/src/pages/docs/getting-started/nextjs.mdx +++ b/src/pages/docs/getting-started/nextjs.mdx @@ -86,19 +86,11 @@ npm install ably Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -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: ```shell -npm install -g @ably/cli -``` - - -2. Run the following to log in to your Ably account and set the default app and API key: - - -```shell -ably login +npx -p @ably/cli ably init ``` diff --git a/src/pages/docs/getting-started/node.mdx b/src/pages/docs/getting-started/node.mdx index ea8805daca..bec3fa7506 100644 --- a/src/pages/docs/getting-started/node.mdx +++ b/src/pages/docs/getting-started/node.mdx @@ -44,19 +44,11 @@ echo "ABLY_API_KEY={{API_KEY}}" > .env Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -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: ```shell -npm install -g @ably/cli -``` - - -2. Run the following to log in to your Ably account and set the default app and API key: - - -```shell -ably login +npx -p @ably/cli ably init ``` diff --git a/src/pages/docs/getting-started/objective-c.mdx b/src/pages/docs/getting-started/objective-c.mdx index 807dede3ec..d63e7ba166 100644 --- a/src/pages/docs/getting-started/objective-c.mdx +++ b/src/pages/docs/getting-started/objective-c.mdx @@ -46,19 +46,11 @@ https://github.com/ably/ably-cocoa Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -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: ```shell -npm install -g @ably/cli -``` - - -2. Run the following to log in to your Ably account and set the default app and API key: - - -```shell -ably login +npx -p @ably/cli ably init ``` diff --git a/src/pages/docs/getting-started/php.mdx b/src/pages/docs/getting-started/php.mdx index 3320f828e2..34ea3d910b 100644 --- a/src/pages/docs/getting-started/php.mdx +++ b/src/pages/docs/getting-started/php.mdx @@ -44,19 +44,11 @@ composer require ably/ably-php Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -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: ```shell -npm install -g @ably/cli -``` - - -2. Run the following to log in to your Ably account and set the default app and API key: - - -```shell -ably login +npx -p @ably/cli ably init ``` diff --git a/src/pages/docs/getting-started/python.mdx b/src/pages/docs/getting-started/python.mdx index ea025bf405..edde3e2b91 100644 --- a/src/pages/docs/getting-started/python.mdx +++ b/src/pages/docs/getting-started/python.mdx @@ -41,19 +41,11 @@ pip install ably Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -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: ```shell -npm install -g @ably/cli -``` - - -2. Run the following to log in to your Ably account and set the default app and API key: - - -```shell -ably login +npx -p @ably/cli ably init ``` diff --git a/src/pages/docs/getting-started/react-native.mdx b/src/pages/docs/getting-started/react-native.mdx index 32cea903f7..7676706198 100644 --- a/src/pages/docs/getting-started/react-native.mdx +++ b/src/pages/docs/getting-started/react-native.mdx @@ -145,19 +145,11 @@ Keep the Realtime client initialization outside of any React component to preven Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -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: ```shell -npm install -g @ably/cli -``` - - -2. Run the following to log in to your Ably account and set the default app and API key: - - -```shell -ably login +npx -p @ably/cli ably init ``` diff --git a/src/pages/docs/getting-started/react.mdx b/src/pages/docs/getting-started/react.mdx index 8a21aa8829..c727642a4e 100644 --- a/src/pages/docs/getting-started/react.mdx +++ b/src/pages/docs/getting-started/react.mdx @@ -153,19 +153,11 @@ Keep the Realtime client initialization outside of any React component to preven Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -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: ```shell -npm install -g @ably/cli -``` - - -2. Run the following to log in to your Ably account and set the default app and API key: - - -```shell -ably login +npx -p @ably/cli ably init ``` diff --git a/src/pages/docs/getting-started/ruby.mdx b/src/pages/docs/getting-started/ruby.mdx index 780e11288a..0e0ace7850 100644 --- a/src/pages/docs/getting-started/ruby.mdx +++ b/src/pages/docs/getting-started/ruby.mdx @@ -39,19 +39,11 @@ The realtime interface of the Ruby SDK must be run within an [EventMachine](http Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -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: ```shell -npm install -g @ably/cli -``` - - -2. Run the following to log in to your Ably account and set the default app and API key: - - -```shell -ably login +npx -p @ably/cli ably init ``` diff --git a/src/pages/docs/getting-started/swift.mdx b/src/pages/docs/getting-started/swift.mdx index de347a4b9a..3aebba827b 100644 --- a/src/pages/docs/getting-started/swift.mdx +++ b/src/pages/docs/getting-started/swift.mdx @@ -37,19 +37,11 @@ dependencies: [ Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -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: ```shell -npm install -g @ably/cli -``` - - -2. Run the following to log in to your Ably account and set the default app and API key: - - -```shell -ably login +npx -p @ably/cli ably init ``` diff --git a/src/pages/docs/platform/tools/cli.mdx b/src/pages/docs/platform/tools/cli.mdx index 03f3ca0cc3..7001fe29bd 100644 --- a/src/pages/docs/platform/tools/cli.mdx +++ b/src/pages/docs/platform/tools/cli.mdx @@ -17,28 +17,34 @@ The Ably CLI interacts with: ## Installation -The Ably CLI is available as an NPM package. Install it using: +Get started in a single command: ```shell -npm install -g @ably/cli +npx -p @ably/cli ably init ``` -## Usage +`ably init` installs the Ably CLI globally, authenticates you, and installs the Ably [Agent Skills](https://github.com/ably/agent-skills) into any AI coding tools it detects on your machine, such as Claude Code, Cursor, VS Code, and Windsurf. -Run the following to log in to your Ably account: +If you'd rather install the CLI yourself before running `init`, the Ably CLI is published to NPM: ```shell -ably login +npm install -g @ably/cli +ably init ``` + -This initiates an [OAuth Device Authorization](https://datatracker.ietf.org/doc/html/rfc8628) flow: the CLI displays an authorization code and opens your browser to approve it. Once approved, the CLI receives an [access token](/docs/platform/account/access-tokens) that is stored locally and refreshed automatically — no manual token management required. +## Usage + +`ably init` authenticates using an [OAuth Device Authorization](https://datatracker.ietf.org/doc/html/rfc8628) flow: the CLI displays an authorization code and opens your browser to approve it. Once approved, the CLI receives an [access token](/docs/platform/account/access-tokens) that is stored locally and refreshed automatically, so there is no manual token management. + +If you only need to authenticate, without installing Agent Skills, run [`ably login`](/docs/cli/login) instead. After you have successfully authenticated and chosen your app and API key, you're ready to interact with Ably resources directly from your terminal. diff --git a/src/pages/docs/push/getting-started/apns.mdx b/src/pages/docs/push/getting-started/apns.mdx index cce663c4b0..42654c8ef8 100644 --- a/src/pages/docs/push/getting-started/apns.mdx +++ b/src/pages/docs/push/getting-started/apns.mdx @@ -27,19 +27,11 @@ then enable the Push notifications option. See [rules](/docs/channels#rules) for Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features and push notifications. -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: ```shell -npm install -g @ably/cli -``` - - -2. Run the following to log in to your Ably account and set the default app and API key: - - -```shell -ably login +npx -p @ably/cli ably init ``` diff --git a/src/pages/docs/push/getting-started/fcm.mdx b/src/pages/docs/push/getting-started/fcm.mdx index bea7cd82be..2ab63ff613 100644 --- a/src/pages/docs/push/getting-started/fcm.mdx +++ b/src/pages/docs/push/getting-started/fcm.mdx @@ -25,19 +25,11 @@ Using an AI coding assistant? [Teach it Ably](/docs/platform/ai-llms#agent-skill Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features and push notifications. -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: ```shell -npm install -g @ably/cli -``` - - -2. Run the following to log in to your Ably account and set the default app and API key: - - -```shell -ably login +npx -p @ably/cli ably init ``` diff --git a/src/pages/docs/push/getting-started/flutter.mdx b/src/pages/docs/push/getting-started/flutter.mdx index 286a2a1ad1..9d300b3277 100644 --- a/src/pages/docs/push/getting-started/flutter.mdx +++ b/src/pages/docs/push/getting-started/flutter.mdx @@ -22,19 +22,11 @@ You'll learn how to configure Firebase Cloud Messaging (FCM) for Android and APN Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features and push notifications. -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: ```shell -npm install -g @ably/cli -``` - - -2. Run the following to log in to your Ably account and set the default app and API key: - - -```shell -ably login +npx -p @ably/cli ably init ``` diff --git a/src/pages/docs/push/getting-started/react-native.mdx b/src/pages/docs/push/getting-started/react-native.mdx index 625c5c877e..538c56f4db 100644 --- a/src/pages/docs/push/getting-started/react-native.mdx +++ b/src/pages/docs/push/getting-started/react-native.mdx @@ -24,19 +24,11 @@ You'll learn how to set up your application with Firebase Cloud Messaging (FCM), Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features and push notifications. -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: ```shell -npm install -g @ably/cli -``` - - -2. Run the following to log in to your Ably account and set the default app and API key: - - -```shell -ably login +npx -p @ably/cli ably init ``` diff --git a/src/pages/docs/push/getting-started/web.mdx b/src/pages/docs/push/getting-started/web.mdx index 74dd7da117..f98fcaaec4 100644 --- a/src/pages/docs/push/getting-started/web.mdx +++ b/src/pages/docs/push/getting-started/web.mdx @@ -26,19 +26,11 @@ then enable the Push notifications option. See [rules](/docs/channels#rules) for Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features and push notifications. -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: ```shell -npm install -g @ably/cli -``` - - -2. Run the following to log in to your Ably account and set the default app and API key: - - -```shell -ably login +npx -p @ably/cli ably init ``` From d32bca54c9b25b36efa07932d3f576e5c65d9efa Mon Sep 17 00:00:00 2001 From: umair Date: Wed, 13 May 2026 15:56:05 +0100 Subject: [PATCH 2/6] docs: shorten ably init description in CLI index table Co-Authored-By: Claude Opus 4.7 (1M context) --- src/pages/docs/cli/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/docs/cli/index.mdx b/src/pages/docs/cli/index.mdx index 4a865b68b2..f744f87086 100644 --- a/src/pages/docs/cli/index.mdx +++ b/src/pages/docs/cli/index.mdx @@ -28,7 +28,7 @@ The following top-level commands are available in the Ably CLI: | Command | Description | | ------- | ----------- | -| [`ably init`](/docs/cli/init) | Set up the Ably CLI in one command: install, authenticate, and install [Agent Skills](https://github.com/ably/agent-skills) into your AI coding tools | +| [`ably init`](/docs/cli/init) | Install the CLI, authenticate, and install [Agent Skills](https://github.com/ably/agent-skills) | | [`ably login`](/docs/cli/login) | Log in to your Ably account (alias for "ably accounts login") | | [`ably accounts`](/docs/cli/accounts) | Manage Ably accounts and your configured access tokens | | [`ably apps`](/docs/cli/apps) | Manage Ably apps | From e8a702ef56364a34d2602b00ec726193056f837e Mon Sep 17 00:00:00 2001 From: umair Date: Thu, 14 May 2026 09:48:07 +0100 Subject: [PATCH 3/6] docs: link CLI section to internal docs and tighten phrasing 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) --- src/pages/docs/chat/getting-started/android.mdx | 4 ++-- src/pages/docs/chat/getting-started/javascript.mdx | 4 ++-- src/pages/docs/chat/getting-started/jvm.mdx | 4 ++-- src/pages/docs/chat/getting-started/react-native.mdx | 4 ++-- src/pages/docs/chat/getting-started/react-ui-kit.mdx | 4 ++-- src/pages/docs/chat/getting-started/react.mdx | 4 ++-- src/pages/docs/chat/getting-started/swift-async-sequence.mdx | 4 ++-- src/pages/docs/chat/getting-started/swift.mdx | 4 ++-- src/pages/docs/getting-started/dotnet.mdx | 4 ++-- src/pages/docs/getting-started/flutter.mdx | 4 ++-- src/pages/docs/getting-started/go.mdx | 4 ++-- src/pages/docs/getting-started/java.mdx | 4 ++-- src/pages/docs/getting-started/javascript.mdx | 4 ++-- src/pages/docs/getting-started/kotlin.mdx | 4 ++-- src/pages/docs/getting-started/laravel.mdx | 4 ++-- src/pages/docs/getting-started/nextjs.mdx | 4 ++-- src/pages/docs/getting-started/node.mdx | 4 ++-- src/pages/docs/getting-started/objective-c.mdx | 4 ++-- src/pages/docs/getting-started/php.mdx | 4 ++-- src/pages/docs/getting-started/python.mdx | 4 ++-- src/pages/docs/getting-started/react-native.mdx | 4 ++-- src/pages/docs/getting-started/react.mdx | 4 ++-- src/pages/docs/getting-started/ruby.mdx | 4 ++-- src/pages/docs/getting-started/swift.mdx | 4 ++-- src/pages/docs/push/getting-started/apns.mdx | 4 ++-- src/pages/docs/push/getting-started/fcm.mdx | 4 ++-- src/pages/docs/push/getting-started/flutter.mdx | 4 ++-- src/pages/docs/push/getting-started/react-native.mdx | 4 ++-- src/pages/docs/push/getting-started/web.mdx | 4 ++-- 29 files changed, 58 insertions(+), 58 deletions(-) diff --git a/src/pages/docs/chat/getting-started/android.mdx b/src/pages/docs/chat/getting-started/android.mdx index 5c2855d81f..914980e659 100644 --- a/src/pages/docs/chat/getting-started/android.mdx +++ b/src/pages/docs/chat/getting-started/android.mdx @@ -42,9 +42,9 @@ implementation("com.ably.chat:chat-extensions-compose:1.2.0") ### (Optional) Install Ably CLI -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. +Use the [Ably CLI](/docs/platform/tools/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. -Install the Ably CLI, log in to your Ably account, and set the default app and API key in a single command: +Install the Ably CLI, authenticate, and set the default app and API key in a single command: ```shell diff --git a/src/pages/docs/chat/getting-started/javascript.mdx b/src/pages/docs/chat/getting-started/javascript.mdx index 4cf3ca7d32..c1c37e9118 100644 --- a/src/pages/docs/chat/getting-started/javascript.mdx +++ b/src/pages/docs/chat/getting-started/javascript.mdx @@ -60,9 +60,9 @@ echo "ABLY_API_KEY={{API_KEY}}" > .env ### (Optional) Install Ably CLI -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. +Use the [Ably CLI](/docs/platform/tools/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. -Install the Ably CLI, log in to your Ably account, and set the default app and API key in a single command: +Install the Ably CLI, authenticate, and set the default app and API key in a single command: ```shell diff --git a/src/pages/docs/chat/getting-started/jvm.mdx b/src/pages/docs/chat/getting-started/jvm.mdx index 28c917b588..d535f09e69 100644 --- a/src/pages/docs/chat/getting-started/jvm.mdx +++ b/src/pages/docs/chat/getting-started/jvm.mdx @@ -57,9 +57,9 @@ implementation("org.slf4j:slf4j-nop:2.0.17") ### (Optional) Install Ably CLI -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. +Use the [Ably CLI](/docs/platform/tools/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. -Install the Ably CLI, log in to your Ably account, and set the default app and API key in a single command: +Install the Ably CLI, authenticate, and set the default app and API key in a single command: ```shell diff --git a/src/pages/docs/chat/getting-started/react-native.mdx b/src/pages/docs/chat/getting-started/react-native.mdx index b48549760c..61310d8762 100644 --- a/src/pages/docs/chat/getting-started/react-native.mdx +++ b/src/pages/docs/chat/getting-started/react-native.mdx @@ -51,9 +51,9 @@ cd ios && pod install && cd .. ### (Optional) Install Ably CLI -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. +Use the [Ably CLI](/docs/platform/tools/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. -Install the Ably CLI, log in to your Ably account, and set the default app and API key in a single command: +Install the Ably CLI, authenticate, and set the default app and API key in a single command: ```shell diff --git a/src/pages/docs/chat/getting-started/react-ui-kit.mdx b/src/pages/docs/chat/getting-started/react-ui-kit.mdx index a58c8a4713..78020fe420 100644 --- a/src/pages/docs/chat/getting-started/react-ui-kit.mdx +++ b/src/pages/docs/chat/getting-started/react-ui-kit.mdx @@ -65,9 +65,9 @@ That's all the setup you need—the kit's CSS is automatically bundled by Vite a ### (Optional) Install Ably CLI -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. +Use the [Ably CLI](/docs/platform/tools/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. -Install the Ably CLI, log in to your Ably account, and set the default app and API key in a single command: +Install the Ably CLI, authenticate, and set the default app and API key in a single command: ```shell diff --git a/src/pages/docs/chat/getting-started/react.mdx b/src/pages/docs/chat/getting-started/react.mdx index 3a5279dfc5..dcec079e5c 100644 --- a/src/pages/docs/chat/getting-started/react.mdx +++ b/src/pages/docs/chat/getting-started/react.mdx @@ -58,9 +58,9 @@ echo "VITE_ABLY_API_KEY={{API_KEY}}" > .env ### (Optional) Install Ably CLI -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. +Use the [Ably CLI](/docs/platform/tools/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. -Install the Ably CLI, log in to your Ably account, and set the default app and API key in a single command: +Install the Ably CLI, authenticate, and set the default app and API key in a single command: ```shell diff --git a/src/pages/docs/chat/getting-started/swift-async-sequence.mdx b/src/pages/docs/chat/getting-started/swift-async-sequence.mdx index 0a1409228c..56fa215d38 100644 --- a/src/pages/docs/chat/getting-started/swift-async-sequence.mdx +++ b/src/pages/docs/chat/getting-started/swift-async-sequence.mdx @@ -23,9 +23,9 @@ Using an AI coding assistant? [Teach it Ably](/docs/platform/ai-llms#agent-skill ### (Optional) Install Ably CLI -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. +Use the [Ably CLI](/docs/platform/tools/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. -Install the Ably CLI, log in to your Ably account, and set the default app and API key in a single command: +Install the Ably CLI, authenticate, and set the default app and API key in a single command: ```shell diff --git a/src/pages/docs/chat/getting-started/swift.mdx b/src/pages/docs/chat/getting-started/swift.mdx index dace797221..3b99ffcfd8 100644 --- a/src/pages/docs/chat/getting-started/swift.mdx +++ b/src/pages/docs/chat/getting-started/swift.mdx @@ -23,9 +23,9 @@ Using an AI coding assistant? [Teach it Ably](/docs/platform/ai-llms#agent-skill ### (Optional) Install Ably CLI -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. +Use the [Ably CLI](/docs/platform/tools/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. -Install the Ably CLI, log in to your Ably account, and set the default app and API key in a single command: +Install the Ably CLI, authenticate, and set the default app and API key in a single command: ```shell diff --git a/src/pages/docs/getting-started/dotnet.mdx b/src/pages/docs/getting-started/dotnet.mdx index 88f550c8e9..3ac45629ba 100644 --- a/src/pages/docs/getting-started/dotnet.mdx +++ b/src/pages/docs/getting-started/dotnet.mdx @@ -39,9 +39,9 @@ dotnet add package ably.io ### (Optional) Install Ably CLI -Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. +Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -Install the Ably CLI, log in to your Ably account, and set the default app and API key in a single command: +Install the Ably CLI, authenticate, and set the default app and API key in a single command: ```shell diff --git a/src/pages/docs/getting-started/flutter.mdx b/src/pages/docs/getting-started/flutter.mdx index 61a38773a6..533cb59c07 100644 --- a/src/pages/docs/getting-started/flutter.mdx +++ b/src/pages/docs/getting-started/flutter.mdx @@ -165,9 +165,9 @@ Initialize the Ably service at the application level to prevent it from being re ### (Optional) Install Ably CLI -Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. +Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -Install the Ably CLI, log in to your Ably account, and set the default app and API key in a single command: +Install the Ably CLI, authenticate, and set the default app and API key in a single command: ```shell diff --git a/src/pages/docs/getting-started/go.mdx b/src/pages/docs/getting-started/go.mdx index 9c0dc8bc7f..644bc4a36a 100644 --- a/src/pages/docs/getting-started/go.mdx +++ b/src/pages/docs/getting-started/go.mdx @@ -32,9 +32,9 @@ go get -u github.com/ably/ably-go/ably ### (Optional) Install Ably CLI -Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. +Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -Install the Ably CLI, log in to your Ably account, and set the default app and API key in a single command: +Install the Ably CLI, authenticate, and set the default app and API key in a single command: ```shell diff --git a/src/pages/docs/getting-started/java.mdx b/src/pages/docs/getting-started/java.mdx index f9cf3bcd68..5090f1cea7 100644 --- a/src/pages/docs/getting-started/java.mdx +++ b/src/pages/docs/getting-started/java.mdx @@ -50,9 +50,9 @@ Using an AI coding assistant? [Teach it Ably](/docs/platform/ai-llms#agent-skill ### (Optional) Install Ably CLI -Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. +Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -Install the Ably CLI, log in to your Ably account, and set the default app and API key in a single command: +Install the Ably CLI, authenticate, and set the default app and API key in a single command: ```shell diff --git a/src/pages/docs/getting-started/javascript.mdx b/src/pages/docs/getting-started/javascript.mdx index 85cd0cbdf0..2b88da5915 100644 --- a/src/pages/docs/getting-started/javascript.mdx +++ b/src/pages/docs/getting-started/javascript.mdx @@ -24,9 +24,9 @@ Using an AI coding assistant? [Teach it Ably](/docs/platform/ai-llms#agent-skill ### (Optional) Install Ably CLI -Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. +Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -Install the Ably CLI, log in to your Ably account, and set the default app and API key in a single command: +Install the Ably CLI, authenticate, and set the default app and API key in a single command: ```shell diff --git a/src/pages/docs/getting-started/kotlin.mdx b/src/pages/docs/getting-started/kotlin.mdx index 6384b6cf9c..f2f84d87e7 100644 --- a/src/pages/docs/getting-started/kotlin.mdx +++ b/src/pages/docs/getting-started/kotlin.mdx @@ -29,9 +29,9 @@ implementation("io.ably:ably-java:") ### (Optional) Install Ably CLI -Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. +Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -Install the Ably CLI, log in to your Ably account, and set the default app and API key in a single command: +Install the Ably CLI, authenticate, and set the default app and API key in a single command: ```shell diff --git a/src/pages/docs/getting-started/laravel.mdx b/src/pages/docs/getting-started/laravel.mdx index 7ac0526ea6..9ef13e03cc 100644 --- a/src/pages/docs/getting-started/laravel.mdx +++ b/src/pages/docs/getting-started/laravel.mdx @@ -48,9 +48,9 @@ npm run dev ### (Optional) Install Ably CLI -Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. +Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -Install the Ably CLI, log in to your Ably account, and set the default app and API key in a single command: +Install the Ably CLI, authenticate, and set the default app and API key in a single command: ```shell diff --git a/src/pages/docs/getting-started/nextjs.mdx b/src/pages/docs/getting-started/nextjs.mdx index 7a612ce990..66d845a35b 100644 --- a/src/pages/docs/getting-started/nextjs.mdx +++ b/src/pages/docs/getting-started/nextjs.mdx @@ -84,9 +84,9 @@ npm install ably ### (Optional) Install Ably CLI -Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. +Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -Install the Ably CLI, log in to your Ably account, and set the default app and API key in a single command: +Install the Ably CLI, authenticate, and set the default app and API key in a single command: ```shell diff --git a/src/pages/docs/getting-started/node.mdx b/src/pages/docs/getting-started/node.mdx index bec3fa7506..0c77c419f8 100644 --- a/src/pages/docs/getting-started/node.mdx +++ b/src/pages/docs/getting-started/node.mdx @@ -42,9 +42,9 @@ echo "ABLY_API_KEY={{API_KEY}}" > .env ### (Optional) Install Ably CLI -Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. +Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -Install the Ably CLI, log in to your Ably account, and set the default app and API key in a single command: +Install the Ably CLI, authenticate, and set the default app and API key in a single command: ```shell diff --git a/src/pages/docs/getting-started/objective-c.mdx b/src/pages/docs/getting-started/objective-c.mdx index d63e7ba166..696645fa60 100644 --- a/src/pages/docs/getting-started/objective-c.mdx +++ b/src/pages/docs/getting-started/objective-c.mdx @@ -44,9 +44,9 @@ https://github.com/ably/ably-cocoa ### (Optional) Install Ably CLI -Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. +Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -Install the Ably CLI, log in to your Ably account, and set the default app and API key in a single command: +Install the Ably CLI, authenticate, and set the default app and API key in a single command: ```shell diff --git a/src/pages/docs/getting-started/php.mdx b/src/pages/docs/getting-started/php.mdx index 34ea3d910b..a2958d05d4 100644 --- a/src/pages/docs/getting-started/php.mdx +++ b/src/pages/docs/getting-started/php.mdx @@ -42,9 +42,9 @@ composer require ably/ably-php ### (Optional) Install Ably CLI -Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. +Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -Install the Ably CLI, log in to your Ably account, and set the default app and API key in a single command: +Install the Ably CLI, authenticate, and set the default app and API key in a single command: ```shell diff --git a/src/pages/docs/getting-started/python.mdx b/src/pages/docs/getting-started/python.mdx index edde3e2b91..1f84f864c0 100644 --- a/src/pages/docs/getting-started/python.mdx +++ b/src/pages/docs/getting-started/python.mdx @@ -39,9 +39,9 @@ pip install ably ### (Optional) Install Ably CLI -Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. +Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -Install the Ably CLI, log in to your Ably account, and set the default app and API key in a single command: +Install the Ably CLI, authenticate, and set the default app and API key in a single command: ```shell diff --git a/src/pages/docs/getting-started/react-native.mdx b/src/pages/docs/getting-started/react-native.mdx index 7676706198..85ff517b5b 100644 --- a/src/pages/docs/getting-started/react-native.mdx +++ b/src/pages/docs/getting-started/react-native.mdx @@ -143,9 +143,9 @@ Keep the Realtime client initialization outside of any React component to preven ### (Optional) Install Ably CLI -Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. +Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -Install the Ably CLI, log in to your Ably account, and set the default app and API key in a single command: +Install the Ably CLI, authenticate, and set the default app and API key in a single command: ```shell diff --git a/src/pages/docs/getting-started/react.mdx b/src/pages/docs/getting-started/react.mdx index c727642a4e..5c241f8779 100644 --- a/src/pages/docs/getting-started/react.mdx +++ b/src/pages/docs/getting-started/react.mdx @@ -151,9 +151,9 @@ Keep the Realtime client initialization outside of any React component to preven ### (Optional) Install Ably CLI -Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. +Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -Install the Ably CLI, log in to your Ably account, and set the default app and API key in a single command: +Install the Ably CLI, authenticate, and set the default app and API key in a single command: ```shell diff --git a/src/pages/docs/getting-started/ruby.mdx b/src/pages/docs/getting-started/ruby.mdx index 0e0ace7850..6d10a8240a 100644 --- a/src/pages/docs/getting-started/ruby.mdx +++ b/src/pages/docs/getting-started/ruby.mdx @@ -37,9 +37,9 @@ The realtime interface of the Ruby SDK must be run within an [EventMachine](http ### (Optional) Install Ably CLI -Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. +Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -Install the Ably CLI, log in to your Ably account, and set the default app and API key in a single command: +Install the Ably CLI, authenticate, and set the default app and API key in a single command: ```shell diff --git a/src/pages/docs/getting-started/swift.mdx b/src/pages/docs/getting-started/swift.mdx index 3aebba827b..2faaed3276 100644 --- a/src/pages/docs/getting-started/swift.mdx +++ b/src/pages/docs/getting-started/swift.mdx @@ -35,9 +35,9 @@ dependencies: [ ### (Optional) Install Ably CLI -Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. +Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -Install the Ably CLI, log in to your Ably account, and set the default app and API key in a single command: +Install the Ably CLI, authenticate, and set the default app and API key in a single command: ```shell diff --git a/src/pages/docs/push/getting-started/apns.mdx b/src/pages/docs/push/getting-started/apns.mdx index 42654c8ef8..97774aa6c7 100644 --- a/src/pages/docs/push/getting-started/apns.mdx +++ b/src/pages/docs/push/getting-started/apns.mdx @@ -25,9 +25,9 @@ then enable the Push notifications option. See [rules](/docs/channels#rules) for ### (Optional) Install Ably CLI -Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features and push notifications. +Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features and push notifications. -Install the Ably CLI, log in to your Ably account, and set the default app and API key in a single command: +Install the Ably CLI, authenticate, and set the default app and API key in a single command: ```shell diff --git a/src/pages/docs/push/getting-started/fcm.mdx b/src/pages/docs/push/getting-started/fcm.mdx index 2ab63ff613..95a4145471 100644 --- a/src/pages/docs/push/getting-started/fcm.mdx +++ b/src/pages/docs/push/getting-started/fcm.mdx @@ -23,9 +23,9 @@ Using an AI coding assistant? [Teach it Ably](/docs/platform/ai-llms#agent-skill ### (Optional) Install Ably CLI -Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features and push notifications. +Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features and push notifications. -Install the Ably CLI, log in to your Ably account, and set the default app and API key in a single command: +Install the Ably CLI, authenticate, and set the default app and API key in a single command: ```shell diff --git a/src/pages/docs/push/getting-started/flutter.mdx b/src/pages/docs/push/getting-started/flutter.mdx index 9d300b3277..1cce51b5a4 100644 --- a/src/pages/docs/push/getting-started/flutter.mdx +++ b/src/pages/docs/push/getting-started/flutter.mdx @@ -20,9 +20,9 @@ You'll learn how to configure Firebase Cloud Messaging (FCM) for Android and APN ### (Optional) Install Ably CLI -Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features and push notifications. +Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features and push notifications. -Install the Ably CLI, log in to your Ably account, and set the default app and API key in a single command: +Install the Ably CLI, authenticate, and set the default app and API key in a single command: ```shell diff --git a/src/pages/docs/push/getting-started/react-native.mdx b/src/pages/docs/push/getting-started/react-native.mdx index 538c56f4db..5ce3db6e1d 100644 --- a/src/pages/docs/push/getting-started/react-native.mdx +++ b/src/pages/docs/push/getting-started/react-native.mdx @@ -22,9 +22,9 @@ You'll learn how to set up your application with Firebase Cloud Messaging (FCM), ### (Optional) Install Ably CLI -Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features and push notifications. +Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features and push notifications. -Install the Ably CLI, log in to your Ably account, and set the default app and API key in a single command: +Install the Ably CLI, authenticate, and set the default app and API key in a single command: ```shell diff --git a/src/pages/docs/push/getting-started/web.mdx b/src/pages/docs/push/getting-started/web.mdx index f98fcaaec4..c061215398 100644 --- a/src/pages/docs/push/getting-started/web.mdx +++ b/src/pages/docs/push/getting-started/web.mdx @@ -24,9 +24,9 @@ then enable the Push notifications option. See [rules](/docs/channels#rules) for ### (Optional) Install Ably CLI -Use the [Ably CLI](https://github.com/ably/cli) as an additional client to quickly test Pub/Sub features and push notifications. +Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features and push notifications. -Install the Ably CLI, log in to your Ably account, and set the default app and API key in a single command: +Install the Ably CLI, authenticate, and set the default app and API key in a single command: ```shell From c9faa29fb30645b558719589efa44460dc1d1849 Mon Sep 17 00:00:00 2001 From: umair Date: Thu, 14 May 2026 15:15:28 +0100 Subject: [PATCH 4/6] docs: clarify CLI env vars alternative to init and login Co-Authored-By: Claude Opus 4.7 (1M context) --- src/pages/docs/platform/tools/cli.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/docs/platform/tools/cli.mdx b/src/pages/docs/platform/tools/cli.mdx index 7001fe29bd..a845f613c4 100644 --- a/src/pages/docs/platform/tools/cli.mdx +++ b/src/pages/docs/platform/tools/cli.mdx @@ -37,7 +37,7 @@ ably init ## Usage From d6c15ad9ddd586eade091955d5285a924b67cf7d Mon Sep 17 00:00:00 2001 From: umair Date: Thu, 14 May 2026 15:19:36 +0100 Subject: [PATCH 5/6] docs: link ably init to its CLI reference page Co-Authored-By: Claude Opus 4.7 (1M context) --- src/pages/docs/chat/getting-started/android.mdx | 2 +- src/pages/docs/chat/getting-started/javascript.mdx | 2 +- src/pages/docs/chat/getting-started/jvm.mdx | 2 +- src/pages/docs/chat/getting-started/react-native.mdx | 2 +- src/pages/docs/chat/getting-started/react-ui-kit.mdx | 2 +- src/pages/docs/chat/getting-started/react.mdx | 2 +- src/pages/docs/chat/getting-started/swift-async-sequence.mdx | 2 +- src/pages/docs/chat/getting-started/swift.mdx | 2 +- src/pages/docs/getting-started/dotnet.mdx | 2 +- src/pages/docs/getting-started/flutter.mdx | 2 +- src/pages/docs/getting-started/go.mdx | 2 +- src/pages/docs/getting-started/java.mdx | 2 +- src/pages/docs/getting-started/javascript.mdx | 2 +- src/pages/docs/getting-started/kotlin.mdx | 2 +- src/pages/docs/getting-started/laravel.mdx | 2 +- src/pages/docs/getting-started/nextjs.mdx | 2 +- src/pages/docs/getting-started/node.mdx | 2 +- src/pages/docs/getting-started/objective-c.mdx | 2 +- src/pages/docs/getting-started/php.mdx | 2 +- src/pages/docs/getting-started/python.mdx | 2 +- src/pages/docs/getting-started/react-native.mdx | 2 +- src/pages/docs/getting-started/react.mdx | 2 +- src/pages/docs/getting-started/ruby.mdx | 2 +- src/pages/docs/getting-started/swift.mdx | 2 +- src/pages/docs/platform/tools/cli.mdx | 2 +- src/pages/docs/push/getting-started/apns.mdx | 2 +- src/pages/docs/push/getting-started/fcm.mdx | 2 +- src/pages/docs/push/getting-started/flutter.mdx | 2 +- src/pages/docs/push/getting-started/react-native.mdx | 2 +- src/pages/docs/push/getting-started/web.mdx | 2 +- 30 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/pages/docs/chat/getting-started/android.mdx b/src/pages/docs/chat/getting-started/android.mdx index 914980e659..955e2873bb 100644 --- a/src/pages/docs/chat/getting-started/android.mdx +++ b/src/pages/docs/chat/getting-started/android.mdx @@ -44,7 +44,7 @@ implementation("com.ably.chat:chat-extensions-compose:1.2.0") Use the [Ably CLI](/docs/platform/tools/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. -Install the Ably CLI, authenticate, and set the default app and API key in a single command: +[`ably init`](/docs/cli/init) installs the Ably CLI, authenticates, and sets the default app and API key in a single command: ```shell diff --git a/src/pages/docs/chat/getting-started/javascript.mdx b/src/pages/docs/chat/getting-started/javascript.mdx index c1c37e9118..9fb298ee8e 100644 --- a/src/pages/docs/chat/getting-started/javascript.mdx +++ b/src/pages/docs/chat/getting-started/javascript.mdx @@ -62,7 +62,7 @@ echo "ABLY_API_KEY={{API_KEY}}" > .env Use the [Ably CLI](/docs/platform/tools/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. -Install the Ably CLI, authenticate, and set the default app and API key in a single command: +[`ably init`](/docs/cli/init) installs the Ably CLI, authenticates, and sets the default app and API key in a single command: ```shell diff --git a/src/pages/docs/chat/getting-started/jvm.mdx b/src/pages/docs/chat/getting-started/jvm.mdx index d535f09e69..c968521f02 100644 --- a/src/pages/docs/chat/getting-started/jvm.mdx +++ b/src/pages/docs/chat/getting-started/jvm.mdx @@ -59,7 +59,7 @@ implementation("org.slf4j:slf4j-nop:2.0.17") Use the [Ably CLI](/docs/platform/tools/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. -Install the Ably CLI, authenticate, and set the default app and API key in a single command: +[`ably init`](/docs/cli/init) installs the Ably CLI, authenticates, and sets the default app and API key in a single command: ```shell diff --git a/src/pages/docs/chat/getting-started/react-native.mdx b/src/pages/docs/chat/getting-started/react-native.mdx index 61310d8762..5b7f7932f0 100644 --- a/src/pages/docs/chat/getting-started/react-native.mdx +++ b/src/pages/docs/chat/getting-started/react-native.mdx @@ -53,7 +53,7 @@ cd ios && pod install && cd .. Use the [Ably CLI](/docs/platform/tools/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. -Install the Ably CLI, authenticate, and set the default app and API key in a single command: +[`ably init`](/docs/cli/init) installs the Ably CLI, authenticates, and sets the default app and API key in a single command: ```shell diff --git a/src/pages/docs/chat/getting-started/react-ui-kit.mdx b/src/pages/docs/chat/getting-started/react-ui-kit.mdx index 78020fe420..1c0c7f735a 100644 --- a/src/pages/docs/chat/getting-started/react-ui-kit.mdx +++ b/src/pages/docs/chat/getting-started/react-ui-kit.mdx @@ -67,7 +67,7 @@ That's all the setup you need—the kit's CSS is automatically bundled by Vite a Use the [Ably CLI](/docs/platform/tools/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. -Install the Ably CLI, authenticate, and set the default app and API key in a single command: +[`ably init`](/docs/cli/init) installs the Ably CLI, authenticates, and sets the default app and API key in a single command: ```shell diff --git a/src/pages/docs/chat/getting-started/react.mdx b/src/pages/docs/chat/getting-started/react.mdx index dcec079e5c..4715a235d1 100644 --- a/src/pages/docs/chat/getting-started/react.mdx +++ b/src/pages/docs/chat/getting-started/react.mdx @@ -60,7 +60,7 @@ echo "VITE_ABLY_API_KEY={{API_KEY}}" > .env Use the [Ably CLI](/docs/platform/tools/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. -Install the Ably CLI, authenticate, and set the default app and API key in a single command: +[`ably init`](/docs/cli/init) installs the Ably CLI, authenticates, and sets the default app and API key in a single command: ```shell diff --git a/src/pages/docs/chat/getting-started/swift-async-sequence.mdx b/src/pages/docs/chat/getting-started/swift-async-sequence.mdx index 56fa215d38..73552e0d28 100644 --- a/src/pages/docs/chat/getting-started/swift-async-sequence.mdx +++ b/src/pages/docs/chat/getting-started/swift-async-sequence.mdx @@ -25,7 +25,7 @@ Using an AI coding assistant? [Teach it Ably](/docs/platform/ai-llms#agent-skill Use the [Ably CLI](/docs/platform/tools/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. -Install the Ably CLI, authenticate, and set the default app and API key in a single command: +[`ably init`](/docs/cli/init) installs the Ably CLI, authenticates, and sets the default app and API key in a single command: ```shell diff --git a/src/pages/docs/chat/getting-started/swift.mdx b/src/pages/docs/chat/getting-started/swift.mdx index 3b99ffcfd8..b66811ce61 100644 --- a/src/pages/docs/chat/getting-started/swift.mdx +++ b/src/pages/docs/chat/getting-started/swift.mdx @@ -25,7 +25,7 @@ Using an AI coding assistant? [Teach it Ably](/docs/platform/ai-llms#agent-skill Use the [Ably CLI](/docs/platform/tools/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. -Install the Ably CLI, authenticate, and set the default app and API key in a single command: +[`ably init`](/docs/cli/init) installs the Ably CLI, authenticates, and sets the default app and API key in a single command: ```shell diff --git a/src/pages/docs/getting-started/dotnet.mdx b/src/pages/docs/getting-started/dotnet.mdx index 3ac45629ba..a07f904f00 100644 --- a/src/pages/docs/getting-started/dotnet.mdx +++ b/src/pages/docs/getting-started/dotnet.mdx @@ -41,7 +41,7 @@ dotnet add package ably.io Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -Install the Ably CLI, authenticate, and set the default app and API key in a single command: +[`ably init`](/docs/cli/init) installs the Ably CLI, authenticates, and sets the default app and API key in a single command: ```shell diff --git a/src/pages/docs/getting-started/flutter.mdx b/src/pages/docs/getting-started/flutter.mdx index 533cb59c07..76cd7b6469 100644 --- a/src/pages/docs/getting-started/flutter.mdx +++ b/src/pages/docs/getting-started/flutter.mdx @@ -167,7 +167,7 @@ Initialize the Ably service at the application level to prevent it from being re Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -Install the Ably CLI, authenticate, and set the default app and API key in a single command: +[`ably init`](/docs/cli/init) installs the Ably CLI, authenticates, and sets the default app and API key in a single command: ```shell diff --git a/src/pages/docs/getting-started/go.mdx b/src/pages/docs/getting-started/go.mdx index 644bc4a36a..7cc82e520e 100644 --- a/src/pages/docs/getting-started/go.mdx +++ b/src/pages/docs/getting-started/go.mdx @@ -34,7 +34,7 @@ go get -u github.com/ably/ably-go/ably Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -Install the Ably CLI, authenticate, and set the default app and API key in a single command: +[`ably init`](/docs/cli/init) installs the Ably CLI, authenticates, and sets the default app and API key in a single command: ```shell diff --git a/src/pages/docs/getting-started/java.mdx b/src/pages/docs/getting-started/java.mdx index 5090f1cea7..9347cf7351 100644 --- a/src/pages/docs/getting-started/java.mdx +++ b/src/pages/docs/getting-started/java.mdx @@ -52,7 +52,7 @@ Using an AI coding assistant? [Teach it Ably](/docs/platform/ai-llms#agent-skill Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -Install the Ably CLI, authenticate, and set the default app and API key in a single command: +[`ably init`](/docs/cli/init) installs the Ably CLI, authenticates, and sets the default app and API key in a single command: ```shell diff --git a/src/pages/docs/getting-started/javascript.mdx b/src/pages/docs/getting-started/javascript.mdx index 2b88da5915..0848729f76 100644 --- a/src/pages/docs/getting-started/javascript.mdx +++ b/src/pages/docs/getting-started/javascript.mdx @@ -26,7 +26,7 @@ Using an AI coding assistant? [Teach it Ably](/docs/platform/ai-llms#agent-skill Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -Install the Ably CLI, authenticate, and set the default app and API key in a single command: +[`ably init`](/docs/cli/init) installs the Ably CLI, authenticates, and sets the default app and API key in a single command: ```shell diff --git a/src/pages/docs/getting-started/kotlin.mdx b/src/pages/docs/getting-started/kotlin.mdx index f2f84d87e7..bdf969c865 100644 --- a/src/pages/docs/getting-started/kotlin.mdx +++ b/src/pages/docs/getting-started/kotlin.mdx @@ -31,7 +31,7 @@ implementation("io.ably:ably-java:") Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -Install the Ably CLI, authenticate, and set the default app and API key in a single command: +[`ably init`](/docs/cli/init) installs the Ably CLI, authenticates, and sets the default app and API key in a single command: ```shell diff --git a/src/pages/docs/getting-started/laravel.mdx b/src/pages/docs/getting-started/laravel.mdx index 9ef13e03cc..ec759f0661 100644 --- a/src/pages/docs/getting-started/laravel.mdx +++ b/src/pages/docs/getting-started/laravel.mdx @@ -50,7 +50,7 @@ npm run dev Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -Install the Ably CLI, authenticate, and set the default app and API key in a single command: +[`ably init`](/docs/cli/init) installs the Ably CLI, authenticates, and sets the default app and API key in a single command: ```shell diff --git a/src/pages/docs/getting-started/nextjs.mdx b/src/pages/docs/getting-started/nextjs.mdx index 66d845a35b..851aa2b2cc 100644 --- a/src/pages/docs/getting-started/nextjs.mdx +++ b/src/pages/docs/getting-started/nextjs.mdx @@ -86,7 +86,7 @@ npm install ably Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -Install the Ably CLI, authenticate, and set the default app and API key in a single command: +[`ably init`](/docs/cli/init) installs the Ably CLI, authenticates, and sets the default app and API key in a single command: ```shell diff --git a/src/pages/docs/getting-started/node.mdx b/src/pages/docs/getting-started/node.mdx index 0c77c419f8..0271265f71 100644 --- a/src/pages/docs/getting-started/node.mdx +++ b/src/pages/docs/getting-started/node.mdx @@ -44,7 +44,7 @@ echo "ABLY_API_KEY={{API_KEY}}" > .env Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -Install the Ably CLI, authenticate, and set the default app and API key in a single command: +[`ably init`](/docs/cli/init) installs the Ably CLI, authenticates, and sets the default app and API key in a single command: ```shell diff --git a/src/pages/docs/getting-started/objective-c.mdx b/src/pages/docs/getting-started/objective-c.mdx index 696645fa60..fd9f87adf0 100644 --- a/src/pages/docs/getting-started/objective-c.mdx +++ b/src/pages/docs/getting-started/objective-c.mdx @@ -46,7 +46,7 @@ https://github.com/ably/ably-cocoa Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -Install the Ably CLI, authenticate, and set the default app and API key in a single command: +[`ably init`](/docs/cli/init) installs the Ably CLI, authenticates, and sets the default app and API key in a single command: ```shell diff --git a/src/pages/docs/getting-started/php.mdx b/src/pages/docs/getting-started/php.mdx index a2958d05d4..8e0f6536cf 100644 --- a/src/pages/docs/getting-started/php.mdx +++ b/src/pages/docs/getting-started/php.mdx @@ -44,7 +44,7 @@ composer require ably/ably-php Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -Install the Ably CLI, authenticate, and set the default app and API key in a single command: +[`ably init`](/docs/cli/init) installs the Ably CLI, authenticates, and sets the default app and API key in a single command: ```shell diff --git a/src/pages/docs/getting-started/python.mdx b/src/pages/docs/getting-started/python.mdx index 1f84f864c0..8786ca389d 100644 --- a/src/pages/docs/getting-started/python.mdx +++ b/src/pages/docs/getting-started/python.mdx @@ -41,7 +41,7 @@ pip install ably Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -Install the Ably CLI, authenticate, and set the default app and API key in a single command: +[`ably init`](/docs/cli/init) installs the Ably CLI, authenticates, and sets the default app and API key in a single command: ```shell diff --git a/src/pages/docs/getting-started/react-native.mdx b/src/pages/docs/getting-started/react-native.mdx index 85ff517b5b..b16403e283 100644 --- a/src/pages/docs/getting-started/react-native.mdx +++ b/src/pages/docs/getting-started/react-native.mdx @@ -145,7 +145,7 @@ Keep the Realtime client initialization outside of any React component to preven Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -Install the Ably CLI, authenticate, and set the default app and API key in a single command: +[`ably init`](/docs/cli/init) installs the Ably CLI, authenticates, and sets the default app and API key in a single command: ```shell diff --git a/src/pages/docs/getting-started/react.mdx b/src/pages/docs/getting-started/react.mdx index 5c241f8779..67980f5582 100644 --- a/src/pages/docs/getting-started/react.mdx +++ b/src/pages/docs/getting-started/react.mdx @@ -153,7 +153,7 @@ Keep the Realtime client initialization outside of any React component to preven Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -Install the Ably CLI, authenticate, and set the default app and API key in a single command: +[`ably init`](/docs/cli/init) installs the Ably CLI, authenticates, and sets the default app and API key in a single command: ```shell diff --git a/src/pages/docs/getting-started/ruby.mdx b/src/pages/docs/getting-started/ruby.mdx index 6d10a8240a..6825fab279 100644 --- a/src/pages/docs/getting-started/ruby.mdx +++ b/src/pages/docs/getting-started/ruby.mdx @@ -39,7 +39,7 @@ The realtime interface of the Ruby SDK must be run within an [EventMachine](http Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -Install the Ably CLI, authenticate, and set the default app and API key in a single command: +[`ably init`](/docs/cli/init) installs the Ably CLI, authenticates, and sets the default app and API key in a single command: ```shell diff --git a/src/pages/docs/getting-started/swift.mdx b/src/pages/docs/getting-started/swift.mdx index 2faaed3276..da997b887e 100644 --- a/src/pages/docs/getting-started/swift.mdx +++ b/src/pages/docs/getting-started/swift.mdx @@ -37,7 +37,7 @@ dependencies: [ Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features. It can simulate other clients by publishing messages, subscribing to channels, and managing presence states. -Install the Ably CLI, authenticate, and set the default app and API key in a single command: +[`ably init`](/docs/cli/init) installs the Ably CLI, authenticates, and sets the default app and API key in a single command: ```shell diff --git a/src/pages/docs/platform/tools/cli.mdx b/src/pages/docs/platform/tools/cli.mdx index a845f613c4..cab289de1f 100644 --- a/src/pages/docs/platform/tools/cli.mdx +++ b/src/pages/docs/platform/tools/cli.mdx @@ -25,7 +25,7 @@ npx -p @ably/cli ably init ``` -`ably init` installs the Ably CLI globally, authenticates you, and installs the Ably [Agent Skills](https://github.com/ably/agent-skills) into any AI coding tools it detects on your machine, such as Claude Code, Cursor, VS Code, and Windsurf. +[`ably init`](/docs/cli/init) installs the Ably CLI globally, authenticates you, and installs the Ably [Agent Skills](https://github.com/ably/agent-skills) into any AI coding tools it detects on your machine, such as Claude Code, Cursor, VS Code, and Windsurf. If you'd rather install the CLI yourself before running `init`, the Ably CLI is published to NPM: diff --git a/src/pages/docs/push/getting-started/apns.mdx b/src/pages/docs/push/getting-started/apns.mdx index 97774aa6c7..3a0f707c3c 100644 --- a/src/pages/docs/push/getting-started/apns.mdx +++ b/src/pages/docs/push/getting-started/apns.mdx @@ -27,7 +27,7 @@ then enable the Push notifications option. See [rules](/docs/channels#rules) for Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features and push notifications. -Install the Ably CLI, authenticate, and set the default app and API key in a single command: +[`ably init`](/docs/cli/init) installs the Ably CLI, authenticates, and sets the default app and API key in a single command: ```shell diff --git a/src/pages/docs/push/getting-started/fcm.mdx b/src/pages/docs/push/getting-started/fcm.mdx index 95a4145471..7f9ccfafe9 100644 --- a/src/pages/docs/push/getting-started/fcm.mdx +++ b/src/pages/docs/push/getting-started/fcm.mdx @@ -25,7 +25,7 @@ Using an AI coding assistant? [Teach it Ably](/docs/platform/ai-llms#agent-skill Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features and push notifications. -Install the Ably CLI, authenticate, and set the default app and API key in a single command: +[`ably init`](/docs/cli/init) installs the Ably CLI, authenticates, and sets the default app and API key in a single command: ```shell diff --git a/src/pages/docs/push/getting-started/flutter.mdx b/src/pages/docs/push/getting-started/flutter.mdx index 1cce51b5a4..1a1a48c96a 100644 --- a/src/pages/docs/push/getting-started/flutter.mdx +++ b/src/pages/docs/push/getting-started/flutter.mdx @@ -22,7 +22,7 @@ You'll learn how to configure Firebase Cloud Messaging (FCM) for Android and APN Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features and push notifications. -Install the Ably CLI, authenticate, and set the default app and API key in a single command: +[`ably init`](/docs/cli/init) installs the Ably CLI, authenticates, and sets the default app and API key in a single command: ```shell diff --git a/src/pages/docs/push/getting-started/react-native.mdx b/src/pages/docs/push/getting-started/react-native.mdx index 5ce3db6e1d..ebf64fa12a 100644 --- a/src/pages/docs/push/getting-started/react-native.mdx +++ b/src/pages/docs/push/getting-started/react-native.mdx @@ -24,7 +24,7 @@ You'll learn how to set up your application with Firebase Cloud Messaging (FCM), Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features and push notifications. -Install the Ably CLI, authenticate, and set the default app and API key in a single command: +[`ably init`](/docs/cli/init) installs the Ably CLI, authenticates, and sets the default app and API key in a single command: ```shell diff --git a/src/pages/docs/push/getting-started/web.mdx b/src/pages/docs/push/getting-started/web.mdx index c061215398..00b284f5d7 100644 --- a/src/pages/docs/push/getting-started/web.mdx +++ b/src/pages/docs/push/getting-started/web.mdx @@ -26,7 +26,7 @@ then enable the Push notifications option. See [rules](/docs/channels#rules) for Use the [Ably CLI](/docs/platform/tools/cli) as an additional client to quickly test Pub/Sub features and push notifications. -Install the Ably CLI, authenticate, and set the default app and API key in a single command: +[`ably init`](/docs/cli/init) installs the Ably CLI, authenticates, and sets the default app and API key in a single command: ```shell From a41a4c765f6c107a9c4dfcf2cf7cef0a76f3b31d Mon Sep 17 00:00:00 2001 From: umair Date: Thu, 14 May 2026 15:27:05 +0100 Subject: [PATCH 6/6] docs: rephrase CLI installation and usage for clarity Co-Authored-By: Claude Opus 4.7 (1M context) --- src/pages/docs/platform/tools/cli.mdx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/pages/docs/platform/tools/cli.mdx b/src/pages/docs/platform/tools/cli.mdx index cab289de1f..af98ef723d 100644 --- a/src/pages/docs/platform/tools/cli.mdx +++ b/src/pages/docs/platform/tools/cli.mdx @@ -27,7 +27,7 @@ npx -p @ably/cli ably init [`ably init`](/docs/cli/init) installs the Ably CLI globally, authenticates you, and installs the Ably [Agent Skills](https://github.com/ably/agent-skills) into any AI coding tools it detects on your machine, such as Claude Code, Cursor, VS Code, and Windsurf. -If you'd rather install the CLI yourself before running `init`, the Ably CLI is published to NPM: +To install the CLI manually first, use npm and then run `ably init`: ```shell @@ -37,20 +37,18 @@ ably init ## Usage -`ably init` authenticates using an [OAuth Device Authorization](https://datatracker.ietf.org/doc/html/rfc8628) flow: the CLI displays an authorization code and opens your browser to approve it. Once approved, the CLI receives an [access token](/docs/platform/account/access-tokens) that is stored locally and refreshed automatically, so there is no manual token management. +During `ably init`, the CLI authenticates using an [OAuth Device Authorization](https://datatracker.ietf.org/doc/html/rfc8628) flow: it displays an authorization code and opens your browser to approve it. Once approved, the CLI receives an [access token](/docs/platform/account/access-tokens) that is stored locally and refreshed automatically, so there is no manual token management. If you only need to authenticate, without installing Agent Skills, run [`ably login`](/docs/cli/login) instead. -After you have successfully authenticated and chosen your app and API key, you're ready to interact with Ably resources directly from your terminal. +After authenticating and selecting your app and API key, you can interact with Ably resources directly from your terminal. -For example, open two terminal instances and subscribe to one, and publish messages in the other: - -To subscribe: +For example, open two terminal windows. In the first, subscribe to a channel: ```shell @@ -59,7 +57,7 @@ ably channels subscribe channel-1 ``` -To publish: +In the second, publish messages to the same channel: ```shell @@ -75,7 +73,7 @@ ably channels publish --count 5 channel-1 "Message number {{.Count}}" ``` -For a list of all available commands, run: +To list all available commands, run: ```shell