Skip to main content

Official CLI for LocknKey - Secure, Zero-Knowledge Secret Management with environment injection.

Project description

locknkeycmd: Secure, Zero-Knowledge Secret Management CLI

locknkeycmd is the official command-line interface for LocknKey, a secure, end-to-end encrypted secret management platform. This tool allows developers to securely inject secrets into their applications and scripts at runtime, without storing them in plain text files (specifically preventing .env sprawl).

Features

  • End-to-End Encryption: Secrets are decrypted only in memory on your local machine.
  • Zero-Knowledge Architecture: The server never sees your unencrypted secrets.
  • TOTP-Based Security: Uses your Google Authenticator secret to derive encryption keys, adding a layer of security beyond just passwords.
  • Environment injection: seamlessly inject secrets into npm start, python main.py, or any other command.
  • Multi-Environment: Support for Development (-d), Staging (-s), and Production (-p) environments.

Installation

Install via pip:

pip install locknkeycmd

Prerequisites

  1. A Lockbox/LocknKey Account: Sign up at https://locknkey.site.
  2. 2FA Enabled: You must enable Two-Factor Authentication (Google Authenticator) on the Web Dashboard. The CLI requires this to decrypt your vault securely.

Quick Start

1. Authenticate

Log in to your account. This will open a browser window to authenticate with Google.

locknkeycmd login

2. Initialize Session (Unlock Vault)

Decrypt your master encryption key using your 2FA code. This session remains active locally so you don't need to re-enter it for every command.

locknkeycmd init

Enter your 6-digit Google Authenticator code when prompted.

3. Run Commands with Secrets

Inject secrets directly into your application process.

Syntax:

locknkeycmd run <project-name-or-id> -- <your-command>

Examples:

Run a Node.js app with Development secrets (Default):

locknkeycmd run my-api -- npm start

Run a Python script with Production secrets:

locknkeycmd run my-api --prod -- python main.py

Print secrets to console (useful for debugging/verifying):

locknkeycmd run my-api

Other Commands

Show Account Info:

locknkeycmd --show

List Organizations:

locknkeycmd --show --org

List Projects:

locknkeycmd --show --proj

Logout:

locknkeycmd logout

Security

locknkeycmd uses a combination of modern cryptographic primitives:

  • Argon2id for key derivation (hardening your TOTP secret into an encryption key).
  • NaCl (TweetNaCl/PyNaCl) for high-speed authenticated encryption (using XSalsa20-Poly1305).

No private keys are ever sent to the server.

Troubleshooting

  • "Session Locked": Run locknkeycmd init again.
  • "Invalid Authenticator Code": Ensure your system time is synced.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

locknkeycmd-0.2.2.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

locknkeycmd-0.2.2-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

Details for the file locknkeycmd-0.2.2.tar.gz.

File metadata

  • Download URL: locknkeycmd-0.2.2.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for locknkeycmd-0.2.2.tar.gz
Algorithm Hash digest
SHA256 5557260224a9a0dfb093458e62bbb2c403678a1f3dfade1b8f22da2c5833227b
MD5 e4629a674db70ad580a5ce532b2de5fa
BLAKE2b-256 cf326e3340f6de1837544ee788714eb8081b22d84ac191b0909780b4082a2e5f

See more details on using hashes here.

File details

Details for the file locknkeycmd-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: locknkeycmd-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 14.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for locknkeycmd-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 15d8b818136175e675cdbc249d46ca23078383fa0a828a92f4d441b9504d4dea
MD5 36e1a5f8d8d19d36fdbddc4f3c8ec8fa
BLAKE2b-256 44480156fb13167caaed7a9981cbfe352beea504ff73da3e8134aabfbad48d5e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page