Skip to content

docs(config): document CLI config vs env precedence - #2871

Closed
jdjioe5-cpu wants to merge 1 commit into
stellar:mainfrom
jdjioe5-cpu:feat/issue-2343-config-env-precedence-docs
Closed

jdjioe5-cpu wants to merge 1 commit into
stellar:mainfrom
jdjioe5-cpu:feat/issue-2343-config-env-precedence-docs

Conversation

@jdjioe5-cpu

Copy link
Copy Markdown

Summary

Resolves #2343.

As discussed by maintainers (@leighmcculloch, @mootz12), the Stellar CLI preserves standard industry precedence:
CLI Arguments/Flags > Environment Variables > CLI Config Defaults (\stellar network/keys/fees use) > Built-in Defaults

This PR explicitly documents the precedence rules across user-facing documentation, command descriptions, and developer skill guidelines, and adds unit testing:

  1. README.md: Adds a dedicated \Configuration and Precedence\ section explaining the 4-tier resolution hierarchy and references \stellar env.
  2. Commands Help: Documents precedence order in the doc comments for both \Config\ and \Env\ subcommands in \cmd/soroban-cli/src/commands/mod.rs\ and \commands/cfg/mod.rs.
  3. SKILL.md: Adds precedence callout notes in the Networks and Identities guides to avoid silent override confusion when environment variables are present.
  4. Unit Tests: Adds \ est_set_env_value_from_config_precedence\ in \cli.rs\ verifying that explicit environment variables strictly take precedence over config defaults.

Verification

  • \cargo test --package soroban-cli --lib cli::tests: All tests pass.
  • Verified doc render and formatting.

@github-project-automation github-project-automation Bot moved this to Backlog (Not Ready) in DevX Oct 23, 2026
@github-project-automation github-project-automation Bot moved this from Backlog (Not Ready) to Done in DevX Oct 25, 2026
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.

Determine and document CLI config vs env precedence

2 participants