Skip to main content

VW Keystroke

VW Keystroke

License: MIT Python 3.9+ Platforms Vaultwarden / Bitwarden

Paste a secret once — it lands in your Vaultwarden/Bitwarden vault and a local 600 env file, in one move.

Built for the "hot potato" moment: you just generated an API key and you want it off your clipboard and safely stored without a five-step ritual — so it doesn't end up lingering in a scratch file. Name it, paste it, done.

  • 🗄️ Saves to your vault as a Login item (username = the env var, password = the value, with the env-file path recorded as a custom field).
  • 📄 Writes ~/.config/<project>.env (chmod 600, updated in place — never duplicated).
  • 🔒 Zero-knowledge: your master password never leaves your machine; all vault crypto is done by the official bw CLI.
  • ⚡ Caches the unlocked session in your OS keyring (Windows Credential Locker / macOS Keychain / Linux libsecret) so daily use needs no password.
  • 🖥️ GUI and CLI, on Windows / Linux / macOS.

The secret value is never passed on the command line and never echoed — only the 600 env file and your vault ever see it.


Requirements

  1. Bitwarden CLI — npm install -g @bitwarden/cli (provides bw).
  2. Python 3.9+ (Tkinter ships with the standard python.org installers).

Install

# From GitHub (works today):
pipx install git+https://github.com/PolyDevHouse/vw-keystroke
# or
pip install --user git+https://github.com/PolyDevHouse/vw-keystroke

PyPI release coming soon — then pipx install vw-keystroke will Just Work.

This gives you three commands: vwks (CLI), keydrop (alias), and vwks-gui (GUI).

First-time setup

# point bw at your server (self-hosted Vaultwarden, or Bitwarden cloud)
bw config server https://vault.example.com
bw login                          # email + master password + 2FA (once)

# optional config
mkdir -p ~/.config
cp vw-keystroke.conf.example ~/.config/vw-keystroke.conf && chmod 600 ~/.config/vw-keystroke.conf

Use

GUI: launch VW Keystroke from your app menu (Linux .desktop in packaging/), or run vwks-gui.

CLI:

vwks OPENAI_API_KEY                 # prompts (hidden) for the value
vwks OPENAI_API_KEY --project openai   # -> ~/.config/openai.env
echo -n "$SECRET" | vwks --var FOO --project bar   # piped / non-interactive
vwks --lock                         # forget the cached session + lock now

Configuration

~/.config/vw-keystroke.conf (all optional — see vw-keystroke.conf.example):

Key Meaning Default
BW_SERVER Vault server URL current bw config
DEFAULT_PROJECT env-file basename keys
VAULT_FOLDER folder for new items API Keys
KEYRING_TTL_DAYS cached-session lifetime (0 = never cache) 30
ENV_DIR where env files go ~/.config
BW_CLIENTID / BW_CLIENTSECRET optional API-key login —

How it works

bw handles login and all encryption. On a drop, VW Keystroke unlocks (or reuses a cached session), then creates/updates the vault item and the env file. If the vault is locked it asks for your master password once; the resulting session key is stored in your OS keyring with a TTL and refreshed on use.

Security notes

  • Nothing sensitive is stored by this tool except the 600 env file you asked for and the keyring session (same protection as your desktop login).
  • A cached session means anyone at your already-unlocked machine can drop/read keys — the same exposure as a logged-in browser vault extension. Set KEYRING_TTL_DAYS=0 to disable caching.
  • This project ships no credentials, servers, or keys of its own.

License

MIT © PolyDevHouse LLC

Metadata

Release files for vw-keystroke 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vw-keystroke 0.1.0
File Size Uploaded
vw_keystroke-0.1.0.tar.gz 12.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vw-keystroke 0.1.0
File Interpreter ABI Platform
vw_keystroke-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.8 kB

Release files / vw_keystroke-0.1.0.tar.gz

Download URL vw_keystroke-0.1.0.tar.gz
Size 12.1 kB
Tags Source
SHA-256 checksum
How to use checksums
84ad6d22bb1def31e06b8f2a19d35c888cb71da39d9506b4f75b2668e33740a9
BLAKE2b-256 checksum
How to use checksums
1abf21c53f7b6f8f86316753d2738c7e8d25f7b8a7150366411dd0c8ca48c76e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / vw_keystroke-0.1.0-py3-none-any.whl

Download URL vw_keystroke-0.1.0-py3-none-any.whl
Size 13.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
48c04c0ba0d50b8da2e77ac216f65c7b80dcf153d970a605da852ebe8ee43ca3
BLAKE2b-256 checksum
How to use checksums
3b13fbc659199550dbec74bcd9a8bc101456a350be1cd8a1294ed21644fee278
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

0.3.0

2 release files

0.2.0

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page