Skip to content

feat: allow stellar key secrets to be input via pipe#2403

Merged
mootz12 merged 3 commits into
mainfrom
issues/2388-support-key-add-stdin
Feb 20, 2026
Merged

feat: allow stellar key secrets to be input via pipe#2403
mootz12 merged 3 commits into
mainfrom
issues/2388-support-key-add-stdin

Conversation

@mootz12
Copy link
Copy Markdown
Contributor

@mootz12 mootz12 commented Feb 19, 2026

What

Allow secret keys to be input via a pipe.

Example:

echo "S..." | stellar keys add my-new-key

Why

Better support for CI environments to safely create keys with the CLI.

Closes: #2388

Known limitations

None

Copilot AI review requested due to automatic review settings February 19, 2026 22:16
@github-project-automation github-project-automation Bot moved this to Backlog (Not Ready) in DevX Feb 19, 2026
Comment thread cmd/crates/soroban-test/tests/it/config.rs
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for piping secret keys via stdin to the stellar keys add command, enabling better integration with CI/CD pipelines and automated workflows. The implementation uses Rust's IsTerminal trait to detect whether stdin is a terminal and branches between interactive prompting and non-interactive stdin reading accordingly.

Changes:

  • Modified read_password function to detect terminal vs non-interactive mode and read from stdin when piped
  • Added integration test to verify secret keys can be successfully added via stdin
  • Cargo.lock updated with removal of soroban-spec-json dependency

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
cmd/soroban-cli/src/commands/keys/add.rs Adds terminal detection and stdin reading logic to read_password function to support piped input
cmd/crates/soroban-test/tests/it/config.rs Adds integration test verifying secret keys can be added via stdin piping
Cargo.lock Removes soroban-spec-json package dependency (appears unrelated to main feature)

Comment thread cmd/crates/soroban-test/tests/it/config.rs
@mootz12 mootz12 merged commit 22a08a6 into main Feb 20, 2026
32 checks passed
@mootz12 mootz12 deleted the issues/2388-support-key-add-stdin branch February 20, 2026 14:47
@github-project-automation github-project-automation Bot moved this from Backlog (Not Ready) to Done in DevX Feb 20, 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.

Support piping keys into stellar keys add

3 participants