> ## Documentation Index > Fetch the complete documentation index at: https://loops.so/docs/llms.txt > Use this file to discover all available pages before exploring further. # Loops CLI > The official Loops command-line interface. Manage contacts, send events, workflows, and deliver transactional emails directly from your terminal. ## Installation ### One-line installer ```bash theme={"dark"} curl -fsSL https://install.loops.so/cli | sh ``` To install a specific version or to a custom path, add `-s -- ` after `sh` in the command above. The default installation path is `~/.local/bin`. Using a coding agent? Install the Loops CLI and agent skills together with `curl -fsSL https://install.loops.so/wizard | sh`, or connect the [Loops MCP server](/docs/mcp-server) if your agent cannot run a terminal. ### Homebrew ```bash theme={"dark"} brew install loops-so/tap/loops ``` ### Script for Windows PowerShell ```powershell theme={"dark"} irm https://raw.githubusercontent.com/loops-so/cli/main/install.ps1 | iex ``` ### Go install ```bash theme={"dark"} go install github.com/loops-so/cli/cmd/loops@latest ``` ### Verify ```bash theme={"dark"} loops --version ``` ## Authentication The CLI requires a Loops API key. Get one from [Settings > API](https://app.loops.so/settings?page=api) in Loops. There are two ways to authenticate the CLI. ### Keyring storage Store a key locally with `loops auth login`: ```bash theme={"dark"} loops auth login my-team ``` You can store keys for multiple teams and switch between them: * `loops auth use ` — set a stored key as the default * `loops auth list` — list stored keys and see which is the default * `loops auth get ` — print a stored API key * `--team ` on any command — use a specific stored key for that command See [Auth commands](/docs/cli/auth) for the full reference. ### Environment variable Set `LOOPS_API_KEY` to use a key directly — useful for CI or when keyring storage isn't available. ```bash theme={"dark"} export LOOPS_API_KEY=your_api_key ``` ### Precedence When multiple keys are available, the CLI resolves them in this order: 1. `LOOPS_API_KEY` environment variable 2. `--team` flag 3. The current default (set via `loops auth use`) ## Global flags These flags can be used with any command. | Flag | Short | Description | | - | - | - | | `--debug` | | Print API request details before sending | | `--output` | `-o` | Output format: `text` (default) or `json` | | `--team` | `-t` | Team key name to use | | `--help` | `-h` | Show help for any command | ## Commands Log in, switch teams, and manage stored API keys. Create, target, schedule, and update draft campaigns. Read and create audience segments. Organize campaigns into groups. Create and list contact properties. Create, update, find, and delete contacts. Set up shell autocompletion. View, create, and update email components. Get, preview, and update draft email messages. Send events to trigger workflows. Read event patterns. View your mailing lists. View, create, and update email themes. Send and manage transactional emails. Organize transactional emails into groups. Upload files as email assets. List, create, and edit workflows and their nodes. ## Utility commands ### `loops api-key` Validate your current API key. ```bash theme={"dark"} loops api-key ``` ### `loops dedicated-sending-ips` List the dedicated sending IP addresses assigned to your team. ```bash theme={"dark"} loops dedicated-sending-ips ``` ### `loops skill install` Install the [Loops CLI skill](/docs/skills) so AI coding agents can discover and use the CLI. Pass `--all` to install every Loops skill, `--global` to install it globally, and `-y` to skip confirmation prompts. ```bash theme={"dark"} loops skill install ``` ### `loops --version` Print the CLI version. ```bash theme={"dark"} loops --version ``` ### `loops agent-context` Print a JSON description of every command, subcommand, and flag in the CLI. Designed for AI coding agents (and other tools) that need to discover what the CLI can do without scraping `--help` output. ```bash theme={"dark"} loops agent-context ``` ## Related topics - [Agent skills for Loops](/docs/skills.md) - [Loops SDKs](/docs/sdks.md) - [Events: trigger automated emails with Loops](/docs/events.md) - [Quickstart for agents](/docs/quickstart-agents.md) - [Completion](/docs/cli/completion.md)