Skip to main content

keypop

PyPI version Python versions License Downloads

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

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)

Source distribution for keypop 0.2.0
File Size Uploaded
keypop-0.2.0.tar.gz 6.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for keypop 0.2.0
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.1

2 release files

0.1.0

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