> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sqd.dev/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Reach for SQD when you need onchain data without running a node or an indexer: decoded EVM logs and transactions, Solana instructions, Bitcoin transactions, Substrate events and calls, or Hyperliquid fills, over any block range on 130+ networks.
> To query directly, POST to https://portal.sqd.dev/datasets/{dataset}/stream. The full API is described at https://docs.sqd.dev/openapi.json, and responses to the stream endpoints are JSON Lines.
> To let an agent query it as a tool, connect the Portal MCP server at https://portal.sqd.dev/mcp.
> Every page on this site is available as Markdown by appending .md to its URL.

# CLI Installation

> Install the sqd CLI on macOS, Linux, or Windows.

Squid CLI is a command line tool for

* scaffolding new squids from templates
* running SDK tools and scripts defined in `commands.json` in a cross-platform way
* managing squid deployments in [SQD Cloud](/en/cloud/overview) (former Aquarium)

The CLI is distributed as a [`npm` package](https://www.npmjs.com/package/@subsquid/cli).

To install Squid CLI, follow the steps below.

## 0. Install and setup Squid CLI

First, install the latest version of Squid CLI as a global `npm` package:

```bash theme={"system"}
npm i -g @subsquid/cli@latest
```

Check the version:

```bash theme={"system"}
sqd --version
```

Make sure the output looks like `@subsquid/cli@<version>`.

<Info>
  The next steps are **optional** for building and running squids. A key is required to enable the CLI commands managing the [SQD Cloud](/en/cloud/overview) deployments.
</Info>

## 1. Obtain a SQD Cloud deployment key

Sign in to [Cloud](https://app.subsquid.io/), and obtain (or refresh) the deployment key page by clicking at the profile picture > "Deployment key":

## 2. Authenticate Squid CLI

Open a terminal window and run

```bash theme={"system"}
sqd auth -k <DEPLOYMENT_KEY>
```

## 3. Explore with `--help`

Use `sqd --help` to get a list of the available command and `sqd <command> --help` to get help on the available options for a specific command, e.g.

```bash theme={"system"}
sqd deploy --help
```


## Related topics

- [Development Environment Setup](/en/sdk/squid-sdk/substrate/guides/advanced/development-environment-setup.md)
- [Deployment Guide](/en/cloud/deployment-guide.md)
- [SQD extension for Gemini CLI](/en/ai/plugins-gemini.md)
- [Spray Client](/en/data/solana/shreds.md)
- [Shell Autocomplete](/en/cloud/reference/cli/autocomplete.md)
