# Init 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](https://ably.com/docs/cli/login.md) - Authenticate without installing Agent Skills. * [Environment variables](https://ably.com/docs/cli/env.md) - Authenticate via environment variables instead of OAuth. * [CLI reference](https://ably.com/docs/cli.md) - Full list of available commands. ## Related Topics - [Overview](https://ably.com/docs/cli.md): Command-line interface for the Ably realtime messaging platform. - [Login](https://ably.com/docs/cli/login.md): Log in to your Ably account using the CLI. - [Autocomplete](https://ably.com/docs/cli/autocomplete.md): Display autocomplete installation instructions for the Ably CLI. - [Env](https://ably.com/docs/cli/env.md): Show the reference for environment variables supported by the Ably CLI. - [Status](https://ably.com/docs/cli/status.md): Check the status of Ably services using the CLI. - [Version](https://ably.com/docs/cli/version.md): Display the version of the Ably CLI. - [Help](https://ably.com/docs/cli/help.md): Display help information for Ably CLI commands. ## Documentation Index To discover additional Ably documentation: 1. Fetch [llms.txt](https://ably.com/llms.txt) for the canonical list of available pages. 2. Identify relevant URLs from that index. 3. Fetch target pages as needed. Avoid using assumed or outdated documentation paths.