Skip to main content


kwil-cli supports two ways to provide configuration:

  • persistent configuration, via a local configuration file
  • global flags, which last only for the specified command's lifetime.

Global flag configs are given precedence over persistent configs.

Persistent Configuration

To create a reusable, persistent configuration, you can use the configure command. This will give you the option to set a default value for all global configs.

kwil-cli configure

You can skip over any config by simply pressing enter.

The configuration file will be stored at ~/.kwil-cli/config.json.

Global Flags

Global flags override the values in the configuration file at runtime, without modifying the configuration file itself. Below is an example of a kwil-cli command that is configured to connecting to the latest testnet,, using a config flag:

kwil-cli database list --provider=

Available Configs

Below is a table containing the available configs, their flags, an example value, and a description.

HTTP Endpoint--providerhttps://longhorn.kwil.comThe endpoint of a Kwil node, which will be used for accessing data on the node's network.
Kwil Chain ID--chain-idkwil-test-chainThe chain ID of the Kwil network to use. Can be left blank to trust a server-provided value.
Private Key--private-key0371808159548bae6fe902a88cb432ca
The secp256k1 private key to use for signing messages and transactions.

NOTE: There is another specical flag --output, which is used to specify the output format. By default it's text, but you can also set it to json. When set to json, command output will be formatted as JSON instead of text.