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

# Local Development

<Steps>
  <Step title="Install" icon="code" iconType="solid" />

  <Step title="Generate access token" icon="coin" iconType="solid" />
</Steps>

## 1.  pip install hydra-cli

**python package (**[**pypi**](https://pypi.org/project/hydra-cli/0.0.1/)**)**

```bash theme={null}
pipx install hydra-cli
```

\[*You must have *[*Docker*](https://docs.docker.com/get-started/introduction/get-docker-desktop/)* and *[*Python3*](https://realpython.com/installing-python/)* installed*\*\*.\*\*]

Run `hydra` for setup:

```bash theme={null}
hydra
```

<Accordion title="the hydra command" defaultOpen="false" icon="code" iconType="solid">
  the `hydra`	command does the following:

  1. run `hydra setup` if needed
  2. run `hydra connect --start`
     1. start the server
     2. open a psql shell
     3. stop the server and cleanup when you exit the shell

  To exit the psql shell, use `exit`, `\\q` or `^D`.
</Accordion>

## 2.  Access token

The `hydra` command will ask for an access token and provides the URL ([https://platform.hydra.so/token)](https://platform.hydra.so/token) to generate your token. Copy the token and paste it into the CLI to unlock a 14-day free trial of Hydra's serverless analytics.

<img src="https://mintcdn.com/pgxman/yL_jvOZ3zOfO9lO9/images/accesstoken(edit).png?fit=max&auto=format&n=yL_jvOZ3zOfO9lO9&q=85&s=23a072cf9fdb3b216446d7ee558099fb" alt="" width="750" height="289" data-path="images/accesstoken(edit).png" />

## Commands

You can run `hydra help` for a list of commands, and `hydra COMMAND --help` to get help about any command.

```bash theme={null}
$ hydra setup
 - asks for token; optional port, username, password
 
$ hydra start
 - starts service
 
$ hydra connect
 - connects to service via psql
 
$ hydra connect --start
 - automatically starts and stops the service around a psql session
 
$ hydra stop
 - stops service
 
$ hydra config
 - prints stored config info
 
$ hydra teardown
 - prompts to delete configuration files
 - prompts to delete docker volume
 
$ hydra help

$ hydra --help
 - prints reference top-level information for the CLI
 
$ hydra COMMAND --help
 - prints helpful information about the command
```

## **Configuration**

Configuration is persistent. Once you specify your settings, it will remember what port you used. If would like to change the settings, you can run `hydra setup` again. You can also change the port number at any time with `hydra start`.

**Configuration files**

By default, configuration is saved to `hydra-cli` in your platform's user data directory:

* Mac OS X: `~/Library/Application Support/hydra-cli`
* Linux: `~/.local/share/hydra-cli`

You can specify a different configuration directory with `-C`/`--config-dir`, but you will need to pass this in with every execution.

## **Uninstalling**

1. `hydra stop` removes the running container, if one remains.
2. `hydra teardown` will confirm removal of the configuration files and the Docker volume, respectively.
3. `pip uninstall hydra-cli` will remove the CLI itself.
