Skip to content

Installation

Follow these steps to install and configure Hydra.

Section titled “Option 1: Pre-built Binaries (Recommended)”

The easiest way to install Hydra is using pre-built binaries. This doesn’t require Bun or any development tools.

Terminal window
curl -fsSL https://raw.githubusercontent.com/rnwolfe/hydra/main/scripts/install.sh | bash

This automatically:

  • Detects your OS and architecture (Linux, macOS, including Apple Silicon)
  • Downloads the appropriate binaries
  • Installs to ~/.hydra/bin

After installation, add Hydra to your PATH:

Terminal window
# For bash
echo 'export PATH="$HOME/.hydra/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
# For zsh
echo 'export PATH="$HOME/.hydra/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
# For fish
fish_add_path ~/.hydra/bin
Terminal window
hydra --help
Terminal window
curl -fsSL https://raw.githubusercontent.com/rnwolfe/hydra/main/scripts/install.sh | bash -s -- v0.1.0
Terminal window
HYDRA_INSTALL=/opt/hydra curl -fsSL https://raw.githubusercontent.com/rnwolfe/hydra/main/scripts/install.sh | bash

The hydra binary provides all functionality through subcommands:

CommandDescription
hydra runStart trading (paper mode by default)
hydra run --mode liveStart live trading
hydra run --mode replayReplay recorded session
hydra recordRecord market data sessions
hydra latencyNetwork latency diagnostics

Note: The TUI dashboard (hydra tui) is only available when running from source due to a library limitation.

PlatformArchitecture
Linuxx64, ARM64
macOSx64, ARM64 (Apple Silicon)
Windowsx64

For development or if you prefer running from source.

Terminal window
git clone https://github.com/rnwolfe/hydra.git
cd hydra
Terminal window
bun install

When running from source, use bun run scripts:

Binary CommandSource Equivalent
hydra runbun run paper
hydra run --mode livebun run bot
hydra recordbun run record
hydra run --mode replaybun run replay
N/A (source only)bun run tui

The bot requires a configuration file to function.

Terminal window
cp config.example.yaml config.yaml

By default, the bot looks for config.example.yaml. To use a different file:

Terminal window
# With binary
hydra run --config ./config.yaml
# From source
BOT_CONFIG=./config.yaml bun run paper
VariableDescriptionRequired
POLYMARKET_PRIVATE_KEYEthereum private key for live tradingOnly for live mode
BOT_CONFIGPath to config fileOptional (defaults to ./config.example.yaml)
POLYMARKET_PRIVATE_KEY=0x...your...private...key...
BOT_CONFIG=./config.yaml

Bun automatically loads .env files. If using binaries, create the .env in your working directory.


Terminal window
# Check that binary is installed
which hydra
# Run paper trading (will connect to live market data)
hydra run
Terminal window
# Run type checking
bun run typecheck
# Run unit tests
bun test
# Start paper trading
bun run paper

To create your own binaries:

Terminal window
# Build all binaries for current platform
bun run build:local
# Build for all platforms
bun run build:all
# Build specific entries
bun run build -- --entry=bot,tui

Binaries are output to dist/<platform>/.

Note: The TUI cannot be compiled to a binary due to a library limitation. Use bun run tui from source instead.