Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add global config for default network and identity. #1690

Merged
merged 7 commits into from
Nov 6, 2024
Merged

Conversation

fnando
Copy link
Member

@fnando fnando commented Oct 29, 2024

What

This pr introduces a global config file called ~/.stellar/config.toml. Right now, it contains a new section called defaults, which can hold the values set by the new commands stellar keys use NAME and stellar network use NAME. An upcoming pr will use this values by default, when available.

$ stellar network use testnet
ℹ️ The default network is set to `testnet`

$ stellar keys use alice
ℹ️ The default source account is set to `alice`

$ stellar env
STELLAR_NETWORK=testnet # default
STELLAR_ACCOUNT=alice   # default

$ cat ~/.config/stellar/config.toml
[defaults]
network = "testnet"
identity = "alice"

Why

This is the first step to implement #1396.

Known limitations

N/A

@fnando fnando marked this pull request as ready for review October 29, 2024 20:06
@fnando fnando force-pushed the config-file branch 2 times, most recently from 705e2b0 to 669bb4f Compare October 30, 2024 21:41
@fnando fnando force-pushed the config-file branch 3 times, most recently from 504cf42 to a583e9d Compare November 4, 2024 19:11
@fnando fnando merged commit 6e645f0 into main Nov 6, 2024
26 checks passed
@fnando fnando deleted the config-file branch November 6, 2024 05:17
@leighmcculloch leighmcculloch linked an issue Nov 11, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Defaults for global config
2 participants