An extremely simple Bitwarden CLI wrapper. Originally developed for smol-k8s-lab.
  • Python 92.1%
  • CSS 5.2%
  • Shell 2.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
JesseBot dc307256c1
Some checks failed
Python package build and publish / build_and_publish (push) Failing after 2s
Python package build and publish / build-and-publish (push) Failing after 0s
Merge pull request 'Update dependency zensical to ^0.0.60' (#10) from renovate/zensical-0.x into main
Reviewed-on: #10
2026-09-10 09:26:11 +00:00
.forgejo clean up new forge 2026-08-16 18:20:45 +02:00
bitwarden_wrapper fix indentation issue for checking always_do_action variable 2026-08-10 16:34:15 +02:00
renovate_scripts fix renovate line printing 2026-08-17 10:03:34 +02:00
.gitignore Do an initial commit after export from smol-k8s-lab 2026-08-08 13:28:22 +02:00
AI_POLICY.md clean up new forge 2026-08-16 18:20:45 +02:00
LICENSE Do an initial commit after export from smol-k8s-lab 2026-08-08 13:28:22 +02:00
poetry.lock Update dependency zensical to ^0.0.60 2026-09-10 03:56:26 +00:00
pyproject.toml Update dependency zensical to ^0.0.60 2026-09-10 03:56:26 +00:00
README.md Do an initial commit after export from smol-k8s-lab 2026-08-08 13:28:22 +02:00
renovate.json add renovate scripts 2026-08-17 10:00:06 +02:00

bitwarden-wrapper

PyPI - Version

An extremely simple Bitwarden CLI wrapper. Originally developed for smol-k8s-lab, but extracted so it can be used elsewhere.

Usage

Here's the basic usage:

# initialize the object
bw = BwCLI(my_passsword, my_client_id, my_client_secret)

# unlock the vault
bw.unlock()

# generate a random password
random_password = bw.generate()
# create a login item in the vault
bw.create_login(name="test mctest",
                item_url="coolhosting4dogs.tech",
                user="admin",
                password=random_password)

# lock the vault
bw.lock()

If you pass in tui=True to the BwCLI object, we'll also display a TUI for when a duplicate item exists to allow the user to select what they'd like to do.

You can also specify duplicate_strategy="edit" to edit existing items. The values for duplicate_strategy can be: "edit", "ask", "duplicate", "no_action", but it always defaults to "ask".

Warnings

  1. If you set your logging library to log level DEBUG, we may print sensitive info when creating and deleting vault items. This is intensional for debugging purposes only.

  2. The TUI may throw issues when run inside an event loop. In which case, wecan always fall back to using rich instead.