🔐 secret-portal
spin up a temporary web UI for securely entering secret keys and environment variables.
why?
entering API keys over messaging apps (telegram, slack, etc.) is sketchy — they get logged, cached, and stored in chat history. this tool spins up a one-time-use web form that saves secrets directly to an env file on your server.
install
uv tool install .
usage
# basic — saves to ~/.env, local only
secret-portal
# expose publicly via cloudflared tunnel (recommended)
secret-portal --tunnel cloudflared
# single key mode with guided instructions
secret-portal -k OPENAI_API_KEY \
-i '<strong>Get your key:</strong><ol><li>Go to platform.openai.com</li><li>Click API Keys</li><li>Create new key</li></ol>' \
-l "https://platform.openai.com/api-keys" \
--link-text "Open OpenAI dashboard →" \
--tunnel cloudflared
# custom env file and timeout
secret-portal -f ~/.secrets/api-keys --timeout 600
the CLI will print a one-time URL with an auth token. open it in your browser, enter your secrets, and hit save. the portal auto-destructs after the first submission.
tunneling
use --tunnel to expose the portal publicly so it's accessible from any device (phone, laptop, etc.).
| provider | flag | cost | notes |
|---|---|---|---|
| cloudflared (recommended) | --tunnel cloudflared |
free | no account needed, no interstitial pages, HTTPS, auto-downloads if missing |
| ngrok | --tunnel ngrok |
free (limited) | requires account + auth, free tier shows an interstitial warning page that blocks mobile/automated use |
| none | (default) | — | binds to 0.0.0.0, requires the port to be open in your firewall/security group |
we recommend cloudflared — it just works. no signup, no config, no interstitial. if the binary isn't installed, secret-portal will download it automatically on first use.
features
- one-time use: portal expires after a single submission
- token auth: URL contains a random 32-byte token — no token, no access
- auto-timeout: shuts down after 5 minutes (configurable) if unused
- merge mode: new secrets are merged into existing env file (won't clobber)
- file permissions: env file is set to
600(owner read/write only) - zero dependencies: pure python stdlib
- single key mode: pre-populate a key name so the user just pastes the value (
-k KEY_NAME) - guided instructions: add step-by-step instructions and a link to the key's console (
-i,-l) - reachability check: warns if the port isn't externally accessible and suggests
--tunnel cloudflared - no value leakage: secret values are never printed to stdout/stderr (tested)
security notes
- cloudflared tunnels use HTTPS automatically
- without a tunnel, the portal runs over HTTP — use behind a reverse proxy or SSH tunnel for production
- the one-time token prevents unauthorized access
- secrets never touch your chat history or terminal logs
- secret values never appear in stdout/stderr (enforced by tests)
Metadata
Release files for secret-portal 0.1.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 | Provenance | |
|---|---|---|---|---|
| secret_portal-0.1.0.tar.gz | 18.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| secret_portal-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.8 kB
Release files / secret_portal-0.1.0.tar.gz
| Download URL | secret_portal-0.1.0.tar.gz |
|---|---|
| Size | 18.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b267dbb560e120b39e915412a58ac76c7d755f9dec339531987c01777fde354b
|
|
BLAKE2b-256 checksum How to use checksums |
5ffbaadd5f9975e20d837db7ef92d3a8c507f3add25a4a4a433546745af9b149
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.1 {"installer":{"name":"uv","version":"0.10.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / secret_portal-0.1.0-py3-none-any.whl
| Download URL | secret_portal-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e8bd3fc043d3055b24a5152969908119ff083453da362bf8a9e6d6eb8431b7e5
|
|
BLAKE2b-256 checksum How to use checksums |
90bbd30aa2061f24d5c85d5f2c6fd028c17107761af78b609cbaacd3cf7060e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.1 {"installer":{"name":"uv","version":"0.10.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for secret-portal 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.