Scripting secrets into Vaultwarden with the official Bitwarden CLI sounds safer than typing them into the UI. It mostly is.
But there is one reproducible case where the CLI reports success on a login item whose password was never saved.
Create a login item with command bw create item, using type: 1 and the password
clearly present in the payload. You get a normal success response.
Run bw sync, then read it back with command bw get password <id> and you
get this.
No password available for this login.
This is not the CLI hiding a saved password from its own output. The password was never persisted server-side.
Every other field saves correctly. Name, username, URLs. Only the password vanishes.
collectionIds value pointing at an org collection.
If your script does not pass an organization or collection ID, a new item usually lands in your personal vault. That avoids the bug by accident.
The risk is automation that writes into a shared collection, either on purpose or because the account is scoped into one by default.
For anything that must live in a shared collection, use a secure note with type: 2 and write
the secret into the note body. Do not use a login item's password field.
This saves and retrieves correctly every time, including in the shared collections where the login item fails.
You lose the dedicated password field to autofill from. For a secret read by automation rather than a browser extension, you do not need it.
Add a verification step after any scripted secret write. This is not specific to Vaultwarden.
Read the value back through a separate command, in a fresh session if the tool supports one. Confirm the secret matches what you tried to store.
A missing or empty result on that read is the only reliable signal that something did not save, whatever the write command claimed.