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

# CLI Installation and Usage

> Install the HDP CLI and run your first HDP pipeline

Use this page to install the HDP CLI and run a complete local pipeline.

## Prerequisites

HDP requires:

* Rust
* Scarb (Cairo toolchain)
* `uv` (Python package manager)
* Access to chain RPC endpoints

Install Rust:

```bash theme={null}
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

Install `uv`:

```bash theme={null}
curl -LsSf https://astral.sh/uv/install.sh | sh
```

Optional:

* Docker
* Nightly Rust (if you plan to generate [STWO prover input](/data-processor/proving) locally)

## Install HDP CLI

Install latest:

```bash theme={null}
curl -fsSL https://raw.githubusercontent.com/HerodotusDev/hdp-cairo/main/install-cli.sh | bash
```

Install a specific version:

```bash theme={null}
VERSION=vX.X.X curl -fsSL https://raw.githubusercontent.com/HerodotusDev/hdp-cairo/main/install-cli.sh | bash
```

## Build from source (optional)

```bash theme={null}
git clone https://github.com/HerodotusDev/hdp-cairo.git
cd hdp-cairo
git submodule update --init
uv sync
source .venv/bin/activate
```

Optional Make targets:

```bash theme={null}
make setup
make build
make test
```

Optional Docker path:

```bash theme={null}
docker build -t hdp-cairo .
docker run --rm -it hdp-cairo --help
```

## Configure environment

Check required variables:

```bash theme={null}
hdp env-info
```

Check only the variables needed for your run:

```bash theme={null}
hdp env-check --inputs dry_run_output.json
```

For all environment variables, see [Configuration reference](/data-processor/reference-configuration).

If you are working from a local `hdp-cairo` checkout, copy:

```bash theme={null}
cp example.env .env
```

Then set your RPC endpoints and environment values.

## First usage flow (CLI)

After you compile your module (for example with `scarb build`), run:

1. Dry run:

```bash theme={null}
hdp dry-run -m module_contract_class.json --print_output
```

2. Fetch proofs:

```bash theme={null}
hdp fetch-proofs
```

3. Sound run:

```bash theme={null}
hdp sound-run -m module_contract_class.json --print_output
```

At the end of the flow, HDP prints output data used for downstream proving and settlement workflows.

## First full run example (`starkgate`)

```bash theme={null}
cd examples/starkgate
scarb build
hdp dry-run -m target/dev/example_starkgate_module.compiled_contract_class.json --print_output
hdp fetch-proofs
hdp sound-run -m target/dev/example_starkgate_module.compiled_contract_class.json --print_output
```

Expected artifacts:

* Stage 1: `dry_run_output.json`
* Stage 2: `proofs.json`
* Stage 3 output includes `task_hash`, `output_root`, and `mmr_metas`

See output details in [Output model](/data-processor/output).

## Full command example (`eth_call`)

From the official example:

```bash theme={null}
scarb build -p example_eth_call && \
hdp dry-run -m target/dev/example_eth_call_module.compiled_contract_class.json --print_output && \
hdp fetch-proofs --mmr-deployment-config examples/eth_call/mmr_deployment_config.json && \
hdp sound-run -m target/dev/example_eth_call_module.compiled_contract_class.json --print_output --cairo_pie ./pie.zip
```

Reference files:

* Module: [examples/eth\_call/src/lib.cairo](https://github.com/HerodotusDev/hdp-cairo/blob/main/examples/eth_call/src/lib.cairo)
* Run script: [examples/eth\_call/run.sh](https://github.com/HerodotusDev/hdp-cairo/blob/main/examples/eth_call/run.sh)

## On-chain finality reminder

Even with successful local execution, on-chain settlement requires that accessed blocks are included in [Herodotus Satellite](https://github.com/HerodotusDev/satellite) MMRs.
