Unofficial tool for stateless Bitwarden vault management
Project description
Unofficial Python API for Bitwarden Vault Management
Overview
vaultio is an unofficial Python API for managing Bitwarden vaults via the Bitwarden CLI. Instead of launching a new CLI process for each operation, it runs the CLI once in the background and communicates with it through a private socket connection. This improves performance and provides a secure method for using the serve API to build tools and scripts.
How It Works
The API is built around the stateful Express web server launched by the bw serve command. This server exposes a local REST API for performing vault actions. vaultio wraps this API internally and delegates all actions to the Bitwarden CLI.
Note:
vaultiodoes not cache or store credentials. All requests are proxied directly to the background process.
Installation
📦 Pip
pip install vaultio
🔧 Repo
cd python
python -m venv .venv
source .venv/bin/activate
pip install poetry
poetry install
Installing the Bitwarden CLI
Option 1: Official CLI
By default, bw serve exposes its API via HTTP over TCP, which can be less secure since other users or apps might access the unlocked vault without proper firewall rules.
You can either:
- Ensure
bwis available in yourPATH, or - Run:
vaultio build
This installs the CLI from the official NPM package @bitwarden/cli.
Option 2: Unofficial Fork with Socket Support
I made a pull request that introduces support for Unix sockets and other socket types in bw serve. This allows communication without traversing the network stack, improving security.
To enable this:
- Manually build from the fork: Game4Move78/vaults#vaultio and copy the binary to:
$HOME/.cache/vaultio/bin/bw
- Or, let
vaultiohandle it for you:
vaultio --unofficial
This will clone the repo and build it locally. Then it will show you a diff against the official repo before prompting you to continue.
Usage
📘 API Documentation
See the full API reference.
📟 CLI Wrapper
vaultio --help
🧪 Example: Check Status and List Items
from vaultio.vault import Vault
with Vault() as vault:
print(vault.status())
print(vault.unlock())
print(vault.status())
for item in vault.list():
print(item["name"])
for folder in vault.list(type="folder"):
print(folder["name"])
🔍 More Examples
🔐 HTTPS Support
Not currently supported directly, but it's possible using Caddy.
Acknowledgements
BitwardenDecryptfor the code to decrypt a vault and derive keysrbwfor the API calls
Related
PyWardenis a Python Bitwarden CLI wrapper
Disclaimer
This project is not associated with https://bitwarden.com/ or Bitwarden, Inc. These contributions are independent of Bitwarden and are reviewed by other maintainers.
Please note: We cannot be held liable for any data loss that may occur while using vaultio. This includes passwords, attachments, and other information handled by the application. We highly recommend performing regular backups of your files and database. However, should you experience data loss, we encourage you to contact us immediately.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vaultio-0.2.1.tar.gz.
File metadata
- Download URL: vaultio-0.2.1.tar.gz
- Upload date:
- Size: 34.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.13.1 Linux/6.12.9-200.fc41.x86_64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66e688acbbe47348ac0c26794e5f8e8c99db35fc8229e5a32e9bf06b87dbd7e6
|
|
| MD5 |
9a7062a374d7fff9b3f3652940c7507f
|
|
| BLAKE2b-256 |
66b19a5dc42692aef2f2786be60fcb71de2c4d38441d75e320446b529230f5c0
|
File details
Details for the file vaultio-0.2.1-py3-none-any.whl.
File metadata
- Download URL: vaultio-0.2.1-py3-none-any.whl
- Upload date:
- Size: 42.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.13.1 Linux/6.12.9-200.fc41.x86_64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9370d1810c3a2583ea96b923768458251d41f84064460b0971ae3bb8276b0167
|
|
| MD5 |
c60492c9f4fb7162eeaba527f5819af8
|
|
| BLAKE2b-256 |
3f3ce364fd4148699d9243f760a01beb774795aebc7f148678f49dd4e604f8dc
|