Skip to content

Commit 25ebc13

Browse files
authored
Merge pull request #533 from multiversx/rename-to-config-env
Rename env to config-env
2 parents 3827aa8 + 16ca822 commit 25ebc13

12 files changed

Lines changed: 152 additions & 101 deletions

CLI.md

Lines changed: 42 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ See:
2323
2424
2525
COMMAND GROUPS:
26-
{config-wallet,contract,tx,validator,ledger,wallet,validator-wallet,deps,config,localnet,data,staking-provider,dns,faucet,multisig,governance,env,get}
26+
{config-wallet,contract,tx,validator,ledger,wallet,validator-wallet,deps,config,localnet,data,staking-provider,dns,faucet,multisig,governance,config-env,get}
2727
2828
TOP-LEVEL OPTIONS:
2929
-h, --help show this help message and exit
@@ -51,7 +51,7 @@ dns Operations related to the Domain Name Service
5151
faucet Get xEGLD on Devnet or Testnet
5252
multisig Deploy and interact with the Multisig Smart Contract
5353
governance Propose, vote and interact with the governance contract.
54-
env Configure MultiversX CLI to use specific environment values.
54+
config-env Configure MultiversX CLI to use specific environment values.
5555
get Get info from the network.
5656
5757
```
@@ -5632,12 +5632,12 @@ options:
56325632
--proxy PROXY 🔗 the URL of the proxy
56335633
56345634
```
5635-
## Group **Environment**
5635+
## Group **ConfigEnv**
56365636

56375637

56385638
```
5639-
$ mxpy env --help
5640-
usage: mxpy env COMMAND [-h] ...
5639+
$ mxpy config-env --help
5640+
usage: mxpy config-env COMMAND [-h] ...
56415641
56425642
Configure MultiversX CLI to use specific environment values.
56435643
@@ -5651,72 +5651,74 @@ OPTIONS:
56515651
COMMANDS summary
56525652
----------------
56535653
new Creates a new environment and sets it as the active environment.
5654-
get Gets an env value from the active environment.
5655-
set Sets an env value for the active environment.
5654+
get Gets an env value from the specified environment.
5655+
set Sets an env value for the specified environment.
56565656
dump Dumps the active environment.
5657-
delete Deletes an env value from the active environment.
5657+
delete Deletes an env value from the specified environment.
56585658
switch Switch to a different environment.
56595659
list List available environments
5660-
remove Deletes an environment from the env file. Will switch to default env.
5660+
remove Deletes an environment from the env file. Use `mxpy config-env switch` to move to another env.
56615661
reset Deletes the environment file. Default env will be used.
56625662
56635663
```
5664-
### Environment.New
5664+
### ConfigEnv.New
56655665

56665666

56675667
```
5668-
$ mxpy env new --help
5669-
usage: mxpy env new [-h] ...
5668+
$ mxpy config-env new --help
5669+
usage: mxpy config-env new [-h] ...
56705670
56715671
Creates a new environment and sets it as the active environment.
56725672
56735673
positional arguments:
5674-
name the name of the configuration entry
5674+
name the name of the new environment
56755675
56765676
options:
56775677
-h, --help show this help message and exit
56785678
--template TEMPLATE an environment from which to create the new environment
56795679
56805680
```
5681-
### Environment.Set
5681+
### ConfigEnv.Set
56825682

56835683

56845684
```
5685-
$ mxpy env set --help
5686-
usage: mxpy env set [-h] ...
5685+
$ mxpy config-env set --help
5686+
usage: mxpy config-env set [-h] ...
56875687
5688-
Sets an env value for the active environment.
5688+
Sets an env value for the specified environment.
56895689
56905690
positional arguments:
56915691
name the name of the configuration entry
56925692
value the new value
56935693
56945694
options:
56955695
-h, --help show this help message and exit
5696+
--env ENV the name of the environment to operate on
56965697
56975698
```
5698-
### Environment.Get
5699+
### ConfigEnv.Get
56995700

57005701

57015702
```
5702-
$ mxpy env get --help
5703-
usage: mxpy env get [-h] ...
5703+
$ mxpy config-env get --help
5704+
usage: mxpy config-env get [-h] ...
57045705
5705-
Gets an env value from the active environment.
5706+
Gets an env value from the specified environment.
57065707
57075708
positional arguments:
57085709
name the name of the configuration entry
57095710
57105711
options:
57115712
-h, --help show this help message and exit
5713+
--env ENV the name of the environment to operate on
57125714
57135715
```
5714-
### Environment.Dump
5716+
### ConfigEnv.Dump
57155717

57165718

57175719
```
5718-
$ mxpy env dump --help
5719-
usage: mxpy env dump [-h] ...
5720+
$ mxpy config-env dump --help
5721+
usage: mxpy config-env dump [-h] ...
57205722
57215723
Dumps the active environment.
57225724
@@ -5725,57 +5727,53 @@ options:
57255727
--default dumps the default environment instead of the active one.
57265728
57275729
```
5728-
### Environment.Switch
5730+
### ConfigEnv.Switch
57295731

57305732

57315733
```
5732-
$ mxpy env switch --help
5733-
usage: mxpy env switch [-h] ...
5734+
$ mxpy config-env switch --help
5735+
usage: mxpy config-env switch [-h] ...
57345736
57355737
Switch to a different environment.
57365738
5737-
positional arguments:
5738-
name the name of the configuration entry
5739-
57405739
options:
57415740
-h, --help show this help message and exit
5741+
--env ENV the name of the environment to operate on
57425742
57435743
```
5744-
### Environment.List
5744+
### ConfigEnv.List
57455745

57465746

57475747
```
5748-
$ mxpy env list --help
5749-
usage: mxpy env list [-h] ...
5748+
$ mxpy config-env list --help
5749+
usage: mxpy config-env list [-h] ...
57505750
57515751
List available environments
57525752
57535753
options:
57545754
-h, --help show this help message and exit
57555755
57565756
```
5757-
### Environment.Remove
5757+
### ConfigEnv.Remove
57585758

57595759

57605760
```
5761-
$ mxpy env remove --help
5762-
usage: mxpy env remove [-h] ...
5761+
$ mxpy config-env remove --help
5762+
usage: mxpy config-env remove [-h] ...
57635763
5764-
Deletes an environment from the env file. Will switch to default env.
5765-
5766-
positional arguments:
5767-
environment The environment to remove from env file.
5764+
Deletes an environment from the env file. Use `mxpy config-env switch` to move to another env.
57685765
57695766
options:
5770-
-h, --help show this help message and exit
5767+
-h, --help show this help message and exit
5768+
--env ENV the name of the environment to operate on
57715769
57725770
```
5773-
### Environment.Reset
5771+
### ConfigEnv.Reset
57745772

57755773

57765774
```
5777-
$ mxpy env reset --help
5778-
usage: mxpy env reset [-h] ...
5775+
$ mxpy config-env reset --help
5776+
usage: mxpy config-env reset [-h] ...
57795777
57805778
Deletes the environment file. Default env will be used.
57815779

CLI.md.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -185,15 +185,15 @@ generate() {
185185
command "Governance.GetConfig" "governance get-config"
186186
command "Governance.GetDelegatedVoteInfo" "governance get-delegated-vote-info"
187187

188-
group "Environment" "env"
189-
command "Environment.New" "env new"
190-
command "Environment.Set" "env set"
191-
command "Environment.Get" "env get"
192-
command "Environment.Dump" "env dump"
193-
command "Environment.Switch" "env switch"
194-
command "Environment.List" "env list"
195-
command "Environment.Remove" "env remove"
196-
command "Environment.Reset" "env reset"
188+
group "ConfigEnv" "config-env"
189+
command "ConfigEnv.New" "config-env new"
190+
command "ConfigEnv.Set" "config-env set"
191+
command "ConfigEnv.Get" "config-env get"
192+
command "ConfigEnv.Dump" "config-env dump"
193+
command "ConfigEnv.Switch" "config-env switch"
194+
command "ConfigEnv.List" "config-env list"
195+
command "ConfigEnv.Remove" "config-env remove"
196+
command "ConfigEnv.Reset" "config-env reset"
197197

198198
group "ConfigWallet" "config-wallet"
199199
command "ConfigWallet.New" "config-wallet new"

multiversx_sdk_cli/base_transactions_controller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
StringValue,
1111
)
1212

13+
from multiversx_sdk_cli.config_env import get_address_hrp
1314
from multiversx_sdk_cli.constants import (
1415
ADDRESS_PREFIX,
1516
EXTRA_GAS_LIMIT_FOR_GUARDED_TRANSACTIONS,
@@ -21,7 +22,6 @@
2122
TRUE_STR_LOWER,
2223
)
2324
from multiversx_sdk_cli.cosign_transaction import cosign_transaction
24-
from multiversx_sdk_cli.env import get_address_hrp
2525
from multiversx_sdk_cli.errors import BadUserInput, TransactionSigningError
2626
from multiversx_sdk_cli.guardian_relayer_data import GuardianRelayerData
2727
from multiversx_sdk_cli.interfaces import IAccount

multiversx_sdk_cli/cli.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
from rich.logging import RichHandler
1111

1212
import multiversx_sdk_cli.cli_config
13+
import multiversx_sdk_cli.cli_config_env
1314
import multiversx_sdk_cli.cli_config_wallet
1415
import multiversx_sdk_cli.cli_contracts
1516
import multiversx_sdk_cli.cli_data
1617
import multiversx_sdk_cli.cli_delegation
1718
import multiversx_sdk_cli.cli_deps
1819
import multiversx_sdk_cli.cli_dns
19-
import multiversx_sdk_cli.cli_env
2020
import multiversx_sdk_cli.cli_faucet
2121
import multiversx_sdk_cli.cli_get
2222
import multiversx_sdk_cli.cli_governance
@@ -30,8 +30,8 @@
3030
import multiversx_sdk_cli.version
3131
from multiversx_sdk_cli import config, errors, utils, ux
3232
from multiversx_sdk_cli.cli_shared import set_proxy_from_config_if_not_provided
33+
from multiversx_sdk_cli.config_env import get_address_hrp
3334
from multiversx_sdk_cli.constants import LOG_LEVELS, SDK_PATH
34-
from multiversx_sdk_cli.env import get_address_hrp
3535

3636
logger = logging.getLogger("cli")
3737

@@ -140,7 +140,7 @@ def setup_parser(args: list[str]):
140140
commands.append(multiversx_sdk_cli.cli_faucet.setup_parser(args, subparsers))
141141
commands.append(multiversx_sdk_cli.cli_multisig.setup_parser(args, subparsers))
142142
commands.append(multiversx_sdk_cli.cli_governance.setup_parser(args, subparsers))
143-
commands.append(multiversx_sdk_cli.cli_env.setup_parser(subparsers))
143+
commands.append(multiversx_sdk_cli.cli_config_env.setup_parser(subparsers))
144144
commands.append(multiversx_sdk_cli.cli_get.setup_parser(subparsers))
145145

146146
parser.epilog = """

0 commit comments

Comments
 (0)