Skip to main content

Configure

The configuration command is required to be run before any other commands. When you run this command, we check if there exist a configuration file. If no configuration file is found, we create it. If a configuration exists, then we ask if you want to override the configuration.

  1. config
  2. config:view
  3. config:user
  4. config:networks

Config

Usage

holograph config

Help Output

USAGE
$ holograph config [--url <value> --network goerli|mumbai|fuji|rinkeby] [--privateKey <value>] [--fromFile
<value>] [--fromJson <value>]

FLAGS
--fromFile=<value> Path to the config file to load
--fromJson=<value> JSON object to use as the config
--network=<option> Network to set
<options: goerli|mumbai|fuji|rinkeby>
--privateKey=<value> Default account to use when sending all transactions
--url=<value> Provider URL of network to set

DESCRIPTION
Initialize the Holograph CLI with a config file. If no flags are passed, the CLI will prompt you for the required
information.

EXAMPLES
$ holograph config --privateKey abc...def

$ holograph config --fromFile ./config.json

$ holograph config --fromJson '{"version": "beta3", ...}

Flags

from File

If you are an advanced user, you can pass the directory of the config file you want to use. It is parsed and will throw an error if the file is not valid.

from Json

If you are an advanced user, you can pass the config json object directly. It is parsed and will throw an error if the file is not valid.

network

The network you want to set in the configuration file. The only acceptable values are: ['goerli', 'mumbai', 'fuji']

privateKey

You can pass in the private key as a flag to the command. This should be for advanced users.

url

Depends on the network flag set and must be a valid secure websocket url.

Config:View

See the entire configuration file. You can also choose the output format JSON or Yaml.

Usage

holograph config:view

Help Output

USAGE
$ holograph config:view [--output clean|json|yaml]

FLAGS
--output=<option> Output format
<options: clean|json|yaml>

DESCRIPTION
View the current configuration state of the Holograph command line

EXAMPLES
$ holograph config:view

$ holograph config:view --output json

$ holograph config:view --output yaml

$ holograph config:view --output clean

Flags

output

Choose how the format of the stdout. only ['json', 'yaml', 'clean'] are accepted

Config:User

View the address of the user in the configuration file

Usage

holograph config:user

Help Output

USAGE
$ holograph config:user [--output clean|json|yaml]

FLAGS
--output=<option> Output format
<options: clean|json|yaml>

DESCRIPTION
View the current user information

EXAMPLES
$ holograph config:user

$ holograph config:user --output json

$ holograph config:user --output yaml

$ holograph config:user --output clean

Flags

output

Choose how the format of the stdout. only ['json', 'yaml', 'clean'] are accepted

Config:Networks

View the networks and websockets defined in the configuration file.

Usage

holograph config:networks

Help Output

USAGE
$ holograph config:networks [--output clean|json|yaml]

FLAGS
--output=<option> Output format
<options: clean|json|yaml>

DESCRIPTION
View the current network config

EXAMPLES
$ holograph config:networks

$ holograph config:networks --output json

$ holograph config:networks --output yaml

$ holograph config:networks --output clean

Flags

output

Choose how the format of the stdout. only ['json', 'yaml', 'clean'] are accepted