Skip to content

feat(unlock): Read password via stdin#336

Open
augustebaum wants to merge 3 commits into
doy:mainfrom
augustebaum:pass-password-via-stdin
Open

feat(unlock): Read password via stdin#336
augustebaum wants to merge 3 commits into
doy:mainfrom
augustebaum:pass-password-via-stdin

Conversation

@augustebaum
Copy link
Copy Markdown

Caution

This code is provided with no security guarantees. I'm writing this for learning purposes and because it seems there is demand for this feature.

Introduces parameter --stdin to rbw unlock; when set, the password will be read from the first line of standard input. The --stdin parameter is inspired from jj describe.

Tested manually with

# Need to be running the agent with this PR's changes
rbw stop-agent
cargo run --bin rbw-agent

echo password | cargo run --bin rbw -- unlock --stdin
# pinentry does not show up
# rbw unlock: failed to unlock database: Password is incorrect. Try again.

I'm not quite sure how to test this feature automatically.

Closes #65

AI disclosure statement

I used Claude Code to think about the feature, and in particular about the security aspects (e.g. zeroing memory aggressively). I wrote and edited the code myself; I feel comfortable calling this my work.

@augustebaum augustebaum force-pushed the pass-password-via-stdin branch from 40c382c to b51113a Compare May 5, 2026 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature request] Give password of unlock command in a CLI parameter

1 participant