CLI
The Hydra CLI and its testing library both live within the same package which can be installed and updated from the NPM registry:
#
helpThe help
command prints the current Hydra version and a description of commands that can be run.
#
loginHydra 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:
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.
#
logoutThe logout
command deletes the ~/.hydra/auth.json
file.
#
initA 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.
#
OptionsOption | Shorthand | Description | Default |
---|---|---|---|
--contracts-dir <path> | -c | path to search for compiled contracts | current working directory |
--typescript | use TypeScript for boilerplate test files | off |