The Hydra CLI and its testing library both live within the same package which can be installed and updated from the NPM registry:

npm install --global @klevoya/hydra


The help command prints the current Hydra version and a description of commands that can be run.

hydra help
hydra help <command>
hydra help init


Hydra requires an account to use the public Hydra server for executing commands. Creating an account or authenticating Hydra with an existing account is done by running the login command:

hydra login
# should open a browser window to log in / sign up

Authenticating with hydra stores the login information in ~/.hydra/auth.json. This file should be kept safe as it includes the authentication token.

Running Hydra in a CI pipeline

When running tests as part of your Continous Integration workflow, the CI server needs to be authenticated as well. See the section on CI for more information.


The logout command deletes the ~/.hydra/auth.json file.

hydra logout


A scaffolding command creating the configuration file, the boilerplate test files, and optionally JSON fixture files. It's safe to run the init command repeatedly to update projects files as the configuration will be merged and test files will not be overwritten.


--contracts-dir <path>-cpath to search for compiled contractscurrent working directory
--typescriptuse TypeScript for boilerplate test filesoff
hydra init
hydra init --contracts-dir contracts