Skip to content

add rbw add --secure-note - #381

Open
devgar wants to merge 1 commit into
doy:mainfrom
devgar:add-secure-note
Open

devgar wants to merge 1 commit into
doy:mainfrom
devgar:add-secure-note

Conversation

@devgar

@devgar devgar commented Sep 24, 2026

Copy link
Copy Markdown

rbw add could only create logins. This adds --secure-note, which stores the
editor contents (or stdin) as the note of a new secure note. It conflicts with
the user argument and --uri.

Client::add always sent type: 1, so any non-login entry would have been
created as a login. The cipher type is now computed by a shared helper used by
both add and edit, and secureNote is sent as {"type": 0}. The type is
optional when deserializing, so sync responses without it (or with null) still
parse.

Tested against a Vaultwarden server: the new entry shows up as a secure note in
the official Bitwarden app, and plain rbw add still creates logins as before.

🤖 Generated with Claude Code

Client::add always sent type 1, so a secure note would have been created
as a login. The cipher type is now shared with edit, and secureNote is
sent as {"type": 0}.
pschmitt added a commit to pschmitt/rbw that referenced this pull request Sep 25, 2026
Creates a secure note instead of a login (our take on upstream
doy#381). The editor template switches to `data: {type: secure_note}`
with an empty `notes` field; piped stdin is stored verbatim as the note
instead of being parsed as YAML/JSON, and then requires NAME. Conflicts
with USER, --uri and --generate (plus the pwgen flags implying it).
Works with --from-file as well.

The template construction and editor/parse flow that add_structured and
add_from_file duplicated now live in new_entry_template/edit_new_entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Los96z27r146Vkgchu6qkb
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.

1 participant