# Install Hydra

## Prerequisites

* Unix-based operating system (Mac or Linux), you may experience issues on Windows. &#x20;
* Node 14.x (to be compatible with the latest [polkadot-api](https://polkadot.js.org/docs/api/) )&#x20;
* Both Hydra-CLI and the generated project files have dependencies that require Node v10.16 or higher
* `npm` and (optional, but recommended) [`npx`](https://www.npmjs.com/package/npx)
* Hydra stores the substrate data in an external PostgresSQL 12 instance. The scaffolding tool provides a convenient shortcut for running the database instance from a Docker image. In this case the standard docker environment (`docker` and `docker-compose`) should be available.
* (Optional) [Docker engine](https://docs.docker.com/engine/install/). The scaffolding tool provides targets for building Docker images for external deployment.

## Installation

{% hint style="warning" %}
Use `@dzlzv/hydra-cli@next` for the most recent development version&#x20;
{% endhint %}

*Global installation:*

```bash
npm install -g @dzlzv/hydra-cli
```

The path to `hydra-cli` binaries will be added to the system-wide `$PATH`.

*Local installation:*

```bash
npm install @dzlzv/hydra-cli
```

The binaries will be installed to the local `.bin` folder. You can execute `hydra-cli` commands by adding the`.bin`folder within your local `node_modules` to `$PATH`.

*Isolated set-up:*

Execute `hydra-cli` commands directly by typing

```bash
npx @dzlzv/hydra-cli <command>
```

This provides an isolated way to execute `hydra-cli` commands.

{% hint style="success" %}
Run `hydra-cli --version` to check your installation
{% endhint %}

{% hint style="info" %}
It may be convenient to create an alias for quick access to `hydra-cli` e.g.

```
alias hydra-cli='npx @dzlzv/hydra-cli'
```

Or on Windows you can use:

```
doskey hydra-cli=npx @dzlzv/hydra-cli
```

{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dzhelezov.gitbook.io/hydra/install-hydra.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
