-
Notifications
You must be signed in to change notification settings - Fork 48
Description
Description:
I’m using btcli in multiple Python virtual environments (venvs), each with its own config and key setup. However, I’ve noticed two major issues:
1. Configs are shared globally across venvs
Expected:
Each virtual environment should use its own local configuration (e.g., in ~/.btcli or within the venv root directory), isolated from other venvs.
Actual:
btcli appears to use a global config regardless of the active virtual environment, which causes conflicts when managing multiple networks or roles (e.g., separate setups for mainnet/devnet/testnet).
2. Commands fall back to hardcoded constants instead of config values for some commands
Example:
Running a command like:
btcli wallet new-coldkeyignores user-defined settings and uses default constants, even when config values are explicitly set by btcli config set.
In this case, code should check config values first and use the default value unless it's not set in config
Expected behavior:
Config values (whether in a config file or via btcli config set ...) should take precedence over hardcoded defaults.
Suggested Fixes:
- Load per-venv configs by default (e.g., from the active directory or an env var override like BTCLI_CONFIG_PATH).
- Make sure CLI commands prioritize user-defined configs over static defaults.
Environment:
- OS: MacOS 15.5 (24F74)
- Python: 3.11, 3.12
- btcli version: 9.8.5