Skip to main content

Securely prompt for API tokens and run CLI commands — no notepad copy-paste dance

Project description

keyabra

Prompt for API tokens once, run the command — no export/copy/delete/notepad loop.

Part of the spell family: binabra (bin anchor) → keyabra (key/token input).

Install

pip install keyabra

Also need twine and build for PyPI uploads:

pip install build twine

Publish binabra (or any project)

cd ~/Projects/binabra
keyabra pypi publish

That will:

  1. Run python -m build if dist/ is empty
  2. Prompt: PyPI token (pypi-...): (hidden input)
  3. Run twine upload — token never hits disk or your shell history

Other commands

keyabra pypi upload dist/*
keyabra pypi publish ~/Projects/binabra --skip-build

# Generic — any secret env var + any command
keyabra run --env GITHUB_TOKEN -- gh auth status
keyabra run --env TWINE_PASSWORD --env TWINE_USERNAME -- twine upload dist/*

Publish keyabra itself

First upload needs an account-scoped PyPI token: https://pypi.org/manage/account/token/

cd ~/Projects/keyabra
python3 -m pip install --user build twine
python3 -m build
keyabra pypi publish --skip-build   # after build, uses prompted token

Security

  • Uses getpass — token is not echoed
  • Token lives only in process memory for the subprocess
  • Never written to files or shell history

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

keyabra-0.1.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

keyabra-0.1.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file keyabra-0.1.0.tar.gz.

File metadata

  • Download URL: keyabra-0.1.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for keyabra-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b446128a4367b54301f9890bbfde019a5b41f94f10afab3b02c9649eb73cacd2
MD5 93074f57365bc42a86855809cf249e08
BLAKE2b-256 89f69a8ee4167892f9bd0e933579eed1f6d45d9903184e4034f6c9f53fbad13a

See more details on using hashes here.

File details

Details for the file keyabra-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: keyabra-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for keyabra-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d9dfea0c051243d99f5f0c652495f43c0414bc688affd63e759f11587519dca9
MD5 034ae21325c536146eb502bc9a1e1258
BLAKE2b-256 26ae2f7c40a159c20d9fb1ced7ffd4dabed5367c3f151a88850a7f569196ea96

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