diff --git a/doc/config.md b/doc/config.md new file mode 100644 index 0000000000000000000000000000000000000000..541c0a0cc96e0fecea4c18011c779628942f9425 --- /dev/null +++ b/doc/config.md @@ -0,0 +1,27 @@ +# Äžcli config + +Some Äžcli commands require to have an address configured (for example to get account balance), some require to have a secret configured (to sign extrinsics). +Äžcli allows to save what you want in a config file and to overwrite parts in command line arguments. Example: + +```sh +# save Alice secret to config file +cargo run -- -S predefined -s Alice config save + +# show config +cargo run -- config show +# [stdout] +# Äžcli config +# duniter endpoint ws://localhost:9944 +# indexer endpoint http://localhost:8080/v1/graphql +# address 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY (secret defined) + +# use different address in command line +cargo run -- --address 5Fxune7f71ZbpP2FoY3mhYcmM596Erhv1gRue4nsPwkxMR4n config show +# [stdout] +# Äžcli config +# duniter endpoint ws://localhost:9944 +# indexer endpoint http://localhost:8080/v1/graphql +# address 5Fxune7f71ZbpP2FoY3mhYcmM596Erhv1gRue4nsPwkxMR4n (no secret) +``` + +You can see that if a secret is defined, the associated address is used, but if an other address is given, the secret is silenced. \ No newline at end of file diff --git a/doc/example.md b/doc/example.md index 51cf095ef866f209daa2d00a3164e4d69678f545..7d3ea4515e4e8d76037cbca39f9763e5bbab7a54 100644 --- a/doc/example.md +++ b/doc/example.md @@ -20,7 +20,7 @@ gcli -S predefined -s Alice config save gcli --network local -S predefined -s test1 config save ``` -In the following, we assume this last command was run. +In the following, we assume this last command was run. More about the config in [config.md](./config.md). ## Commands