hydra
Search…
Hydra CLI
A cli tool for running a Hydra query node

Install

Using npx:
1
$ alias hydra-cli='npx @dzlzv/hydra-cli'
Copied!
or install via npm:
1
npm install -g @dzlzv/hydra-cli
Copied!
and then
1
$ hydra-cli [COMMAND]
Copied!

Quickstart

Run
1
$ hydra-cli scaffold
Copied!
and answer the prompts. This will generate a sample project and README with setup instructions.

Commands

hydra-cli codegen

Code generator
1
Code generator
2
3
USAGE
4
$ hydra-cli codegen
5
6
OPTIONS
7
-d, --createDb Create the DB and install migrations
8
-s, --schema=schema [default: ../../schema.graphql] Schema path, can be file or directory
9
--[no-]install Install dependencies
Copied!

hydra-cli help [COMMAND]

display help for hydra-cli
1
display help for <%= config.bin %>
2
3
USAGE
4
$ hydra-cli help [COMMAND]
5
6
ARGUMENTS
7
COMMAND command to show help for
8
9
OPTIONS
10
--all see all commands in CLI
Copied!
See code: @oclif/plugin-help

hydra-cli plugins

list installed plugins
1
list installed plugins
2
3
USAGE
4
$ hydra-cli plugins
5
6
OPTIONS
7
--core show core plugins
8
9
EXAMPLE
10
$ hydra-cli plugins
Copied!

hydra-cli plugins:inspect PLUGIN...

displays installation properties of a plugin
1
displays installation properties of a plugin
2
3
USAGE
4
$ hydra-cli plugins:inspect PLUGIN...
5
6
ARGUMENTS
7
PLUGIN [default: .] plugin to inspect
8
9
OPTIONS
10
-h, --help show CLI help
11
-v, --verbose
12
13
EXAMPLE
14
$ hydra-cli plugins:inspect myplugin
Copied!

hydra-cli plugins:install PLUGIN...

installs a plugin into the CLI
1
installs a plugin into the CLI
2
Can be installed from npm or a git url.
3
4
Installation of a user-installed plugin will override a core plugin.
5
6
e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in the CLI without the need to patch and update the whole CLI.
7
8
9
USAGE
10
$ hydra-cli plugins:install PLUGIN...
11
12
ARGUMENTS
13
PLUGIN plugin to install
14
15
OPTIONS
16
-f, --force yarn install with force flag
17
-h, --help show CLI help
18
-v, --verbose
19
20
DESCRIPTION
21
Can be installed from npm or a git url.
22
23
Installation of a user-installed plugin will override a core plugin.
24
25
e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
26
will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
27
the CLI without the need to patch and update the whole CLI.
28
29
ALIASES
30
$ hydra-cli plugins:add
31
32
EXAMPLES
33
$ hydra-cli plugins:install myplugin
34
$ hydra-cli plugins:install https://github.com/someuser/someplugin
35
$ hydra-cli plugins:install someuser/someplugin
Copied!

hydra-cli plugins:link PLUGIN

links a plugin into the CLI for development
1
links a plugin into the CLI for development
2
Installation of a linked plugin will override a user-installed or core plugin.
3
4
e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello' command will override the user-installed or core plugin implementation. This is useful for development work.
5
6
7
USAGE
8
$ hydra-cli plugins:link PLUGIN
9
10
ARGUMENTS
11
PATH [default: .] path to plugin
12
13
OPTIONS
14
-h, --help show CLI help
15
-v, --verbose
16
17
DESCRIPTION
18
Installation of a linked plugin will override a user-installed or core plugin.
19
20
e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
21
command will override the user-installed or core plugin implementation. This is useful for development work.
22
23
EXAMPLE
24
$ hydra-cli plugins:link myplugin
Copied!

hydra-cli plugins:uninstall PLUGIN...

removes a plugin from the CLI
1
removes a plugin from the CLI
2
3
USAGE
4
$ hydra-cli plugins:uninstall PLUGIN...
5
6
ARGUMENTS
7
PLUGIN plugin to uninstall
8
9
OPTIONS
10
-h, --help show CLI help
11
-v, --verbose
12
13
ALIASES
14
$ hydra-cli plugins:unlink
15
$ hydra-cli plugins:remove
Copied!

hydra-cli plugins:update

update installed plugins
1
update installed plugins
2
3
USAGE
4
$ hydra-cli plugins:update
5
6
OPTIONS
7
-h, --help show CLI help
8
-v, --verbose
Copied!

hydra-cli preview

Preview GraphQL API schema
1
Preview GraphQL API schema
2
3
USAGE
4
$ hydra-cli preview
5
6
OPTIONS
7
-s, --schema=schema [default: ../../schema.graphql] Schema path
Copied!

hydra-cli scaffold

Starter kit: generates a directory layout and a sample schema file
1
Starter kit: generates a directory layout and a sample schema file
2
3
USAGE
4
$ hydra-cli scaffold
5
6
OPTIONS
7
-a, --appPort=appPort [default: 4000] GraphQL server port
8
-b, --blockHeight=blockHeight [default: 0] Start block height
9
-d, --dir=dir [default: /home/runner/work/hydra/hydra/packages/hydra-cli] Project folder
10
-h, --dbHost=dbHost [default: localhost] Database host
11
-i, --indexerUrl=indexerUrl Hydra Indexer endpoint
12
-m, --[no-]mappings Create schema and mappings
13
-n, --name=name [default: hydra-scaffold] Project name
14
-p, --dbPort=dbPort [default: 5432] Database port
15
-u, --dbUser=dbUser [default: postgres] Database user
16
-x, --dbPassword=dbPassword [default: postgres] Database user password
17
--rewrite Clear the folder before scaffolding
18
--silent If present, the scaffolder is non-interactive and uses only provided CLI flags
Copied!
Last modified 4mo ago