Simple CLI tool for storing and managing API keys
Project description
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.
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 keypop-0.2.0.tar.gz.
File metadata
- Download URL: keypop-0.2.0.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60b9cf482eff24901d07fb340661405df86d7f274d99909c1d1b992c4005ff80
|
|
| MD5 |
6f357dd0c5a09b6b1d698e7ba47e82dd
|
|
| BLAKE2b-256 |
d7c4843daf70a09abef991719945c71e2b86719ea9bcc36dd2ce1e1f58adcdee
|
File details
Details for the file keypop-0.2.0-py3-none-any.whl.
File metadata
- Download URL: keypop-0.2.0-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
397e28175cbed5dc4ea92b5f70ba0921b6d28f945e977c8d356d5130ebe74943
|
|
| MD5 |
c99bd50850ea406b3eb9a990d27f83aa
|
|
| BLAKE2b-256 |
89bb18f347984c46d619ac4e8d52a01fffc6222caecdca62c5d17ad1fa660d73
|