Skip to content

Commit ece9edd

Browse files
committed
docs: clear up ambiguity surrounding script behavior
1 parent ea37fd2 commit ece9edd

File tree

3 files changed

+17
-12
lines changed

3 files changed

+17
-12
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ The format is based on [Keep a Changelog][1], and this project adheres to
1313
### Added
1414

1515
- Explicit safety checks for all external dependencies.
16+
- Improved documentation to remove behavioral ambiguity.
1617

1718
## [0.1.1] - 2024-08-12
1819

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44

55
---
66

7-
A script to automate adding SSH keys to the local [SSH agent][1] using
8-
passphrases stored in [Bitwarden][2]. It retrieves passphrases securely using
9-
the [Bitwarden CLI][3], then uses [`expect`][4] to interact with [`ssh-add`][5].
7+
A script to add a passphrase-protected SSH key to your local [`ssh-agent`][1] by
8+
leveraging credentials stored in [Bitwarden][2]. It securely retrieves the
9+
passphrase via the [Bitwarden CLI][3], then uses [`expect`][4] to automate the
10+
authentication process with [`ssh-add`][5].
1011

1112
[1]: https://www.ssh.com/academy/ssh/agent
1213
[2]: https://bitwarden.com/
@@ -20,9 +21,10 @@ the [Bitwarden CLI][3], then uses [`expect`][4] to interact with [`ssh-add`][5].
2021
bw-ssh-add <BITWARDEN-ITEM-ID> [SSH-ADD-ARGUMENTS...]
2122
```
2223

23-
- The first argument is passed to `bw` as either a search term or an item's
24-
globally unique identifier to retrieve the passphrase.
25-
- All additional arguments are passed through to `ssh-add` unchanged. Refer to
24+
- The first argument serves as input for `bw get password`, either as a search
25+
term or as an item's globally unique identifier, to retrieve the key's
26+
passphrase.
27+
- Any additional arguments are passed through to `ssh-add` unchanged. Refer to
2628
the [`ssh-add` man page][6] for details on available options.
2729

2830
[6]: https://man.openbsd.org/ssh-add.1

bw-ssh-add

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,17 @@ set -euo pipefail
44
#
55
# bw-ssh-add - https://github.com/elasticdog/bw-ssh-add
66
#
7-
# This script automates adding SSH keys to the local SSH agent using passphrases
8-
# stored in Bitwarden. It retrieves passphrases securely using the Bitwarden
9-
# CLI, then uses `expect` to interact with `ssh-add`.
7+
# This script adds a passphrase-protected SSH key to your local `ssh-agent`
8+
# by leveraging credentials stored in Bitwarden. It securely retrieves
9+
# the passphrase via the Bitwarden CLI, then uses `expect` to automate the
10+
# authentication process with `ssh-add`.
1011
#
1112
# Usage: bw-ssh-add <BITWARDEN-ITEM-ID> [SSH-ADD-ARGUMENTS...]
1213
#
13-
# - The first argument is passed to `bw` as either a search term or an item's
14-
# globally unique identifier to retrieve the passphrase.
15-
# - All additional arguments are passed through to `ssh-add` unchanged. Refer to
14+
# - The first argument serves as input for `bw get password`, either as a search
15+
# term or as an item's globally unique identifier, to retrieve the key's
16+
# passphrase.
17+
# - Any additional arguments are passed through to `ssh-add` unchanged. Refer to
1618
# the `ssh-add` man page for details on available options.
1719
#
1820
# The script sets an expiration time for the added key:

0 commit comments

Comments
 (0)