For every command you have to specify several command line options. Config can save these so you don't have to pass them everytime and instead if not passed they are retrieved from the config store. If any of the options are provided on the command line then they override any previously stored config options.
This provides a very easy to use and flexible configuration solution. The above command could be shortened using config to this:
1
> axe tx create -m 5 -f 0.0001 -a some-address
Copied!
we think you will agree that is much easier to work with.
Usage
There are 7 things you can do with config:
1
available sub actions
2
- save | save the specified options as default for axe, axen and axem
3
- show | show current default configuration
4
- remove | remove the default configuration
5
- use | use the specified configuration
6
- list | list the available configurations
7
- enable | enable configurations
8
- disable | disable configurations
Copied!
In addition to those usages you can also override config completely - which is very hand if you have saved config for different things e.g
1
> axen --config=myserver1
2
> axem -c myminer1
3
> axe wallet amount -c wallet1
Copied!
Save
Save stores the specified config to the location: ~/.axentro/config. You just have to supply the config you would like to save and a config name to save it under (the default name is config which is used if no name is supplied):
1
> axe config save -n http://testnet.axentro.io --testnet --config=myconfig
Copied!
Show
You can view the list of stored config using the show command:
1
> axe config show
Copied!
1
current configuration is for: 's1t' in file /Users/kings/.axentro/config
2
configuration is Enabled
3
--------------------
4
connect_node: http://testnet.axentro.io
5
wallet_path: /Users/kings/sc-wallets/w1.json
6
is_testnet: true
7
is_private: true
8
bind_host: 0.0.0.0
9
bind_port: 3000
10
processes: 1
11
encrypted: false
Copied!
Remove
If you want to remove a specific configuration or all configurations (this will delete the config file)
1
> axe config remove --config=myconfig
2
> axe config remove
Copied!
Use
If you want to switch to using a different default config:
1
> axe config use --config=myconfig
Copied!
List
To see a list of all the saved configs
1
> axe config list
Copied!
Enable / Disable
If you want to completely disable configurations so they don't apply or turn them back on again: