keypop
Simple CLI tool and Python library for storing and managing API keys securely.
Features
- CLI — easy commands:
keypop add openai sk-xxx - Python Library — use in scripts:
import keypop; keypop.get_key("openai") - Export — migrate to .env files
Installation
Using pipx (recommended)
pipx install keypop
Using pip
pip install keypop
Quick Start
CLI
Add a key
keypop add openai sk-xxx
Get a key
keypop get openai
List all keys
keypop list
Export to .env
keypop export .env
Update a key
keypop update openai sk-new-key
Remove a key
keypop remove openai
Python Library
pip install keypop
import keypop
# Get single key
api_key = keypop.get_key("openai")
# Get all keys as dict
keys = keypop.all_keys()
CLI Commands
add
Add a new API key.
keypop add <name> <key> # Non-interactive
keypop add # Interactive mode
get
Get a stored API key.
keypop get <name> [--unmasked] [--to-env <file>]
Options:
- --unmasked — show full key
- --to-env — write to .env file
list
List all stored keys.
keypop list
update
Update an existing key.
keypop update <name> [new_key]
remove
Remove a stored key.
keypop remove <name>
export
Export all keys to .env file.
keypop export [file]
version
Show version.
keypop --version
Configuration
- Storage location:
~/.config/keypop/keys.json - Created automatically on first use
Security
Prevent keys from saving in shell history
Add to ~/.zshrc or ~/.bashrc:
export HISTIGNORE="keypop"
Then run: source ~/.zshrc
License
MIT License — see LICENSE (LICENSE) file for details.
Metadata
Release files for keypop 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| keypop-0.2.0.tar.gz | 6.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| keypop-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.3 kB
Release files / keypop-0.2.0.tar.gz
| Download URL | keypop-0.2.0.tar.gz |
|---|---|
| Size | 6.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
60b9cf482eff24901d07fb340661405df86d7f274d99909c1d1b992c4005ff80
|
|
BLAKE2b-256 checksum How to use checksums |
d7c4843daf70a09abef991719945c71e2b86719ea9bcc36dd2ce1e1f58adcdee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / keypop-0.2.0-py3-none-any.whl
| Download URL | keypop-0.2.0-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
397e28175cbed5dc4ea92b5f70ba0921b6d28f945e977c8d356d5130ebe74943
|
|
BLAKE2b-256 checksum How to use checksums |
89bb18f347984c46d619ac4e8d52a01fffc6222caecdca62c5d17ad1fa660d73
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|