Skip to main content

klug-secrets

CLI tool for managing secrets and environments via KLUG Autocloud API.

Installation

pip install klug-secrets

Configuration

Set the API key as an environment variable:

export KLUG_AUTOCLOUD_API_KEY=your-api-key-here

Usage

Secrets Management

# List all secrets (one secret name per line)
klug-secrets secrets list
# Output:
# secret-1
# secret-2
# my-secret

# Get a secret (returns only the value)
klug-secrets secrets get my-secret
# Output:
# secret-value

# Add a secret
klug-secrets secrets add my-secret "secret-value"

# Update a secret
klug-secrets secrets update my-secret --value "new-value"

# Delete a secret
klug-secrets secrets delete my-secret

Environment Management

# List all environments (one per line: system_id/env_name)
klug-secrets envs list
# Output:
# main/dev
# main/prod
# staging/test

# List environments for a specific system
klug-secrets envs list --system main
# Output:
# main/dev
# main/prod

# Get an environment (returns .env file format)
klug-secrets envs get --system main --env dev
# Output:
# DATABASE_URL=postgres://localhost:5432/mydb
# API_KEY=secret-key-123
# DEBUG=true

# Add environment from .env file
klug-secrets envs add --system main --env dev --file .env

# Add environment from stdin (pipe .env file)
cat .env | klug-secrets envs --system main --env dev

# Add environment with individual variables
klug-secrets envs add --system main --env dev --var DATABASE_URL=postgres://... --var API_KEY=secret

# Update environment from stdin
cat .env | klug-secrets envs update --system main --env dev

# Update environment from file
klug-secrets envs update --system main --env dev --file .env

# Delete environment
klug-secrets envs delete --system main --env dev

# Dump environment to file
klug-secrets envs dump --system main --env dev
# Saves to ./.env.dev

Examples

Upload .env file from stdin

cat .env | klug-secrets envs --system main --env production

Upload .env file from file

klug-secrets envs add --system main --env production --file .env.production

License

MIT License

Metadata

Release files for klug-secrets 1.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for klug-secrets 1.1.4
File Size Uploaded Provenance
klug_secrets-1.1.4.tar.gz 7.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for klug-secrets 1.1.4
File Interpreter ABI Platform
klug_secrets-1.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 14.4 kB

Release files / klug_secrets-1.1.4.tar.gz

Download URL klug_secrets-1.1.4.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
31d6a2f11abec186c2a46ce3c54b5521cb34f09f9112faf38b5fa471686846fc
BLAKE2b-256 checksum
How to use checksums
6177c170b76d31aa325ffc858d3aca35085e293f161eea229b77c8f58c7a269c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.10

Release files / klug_secrets-1.1.4-py3-none-any.whl

Download URL klug_secrets-1.1.4-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
52c12cd4c10286c28d96e4850ea0064072d26d7cb215cbd2d61875b9c4d92faa
BLAKE2b-256 checksum
How to use checksums
031590d73f5e9640d891619f2f34e52b9d3696a5142555619a64a05af230b1e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.10

Security for klug-secrets 1.1.4

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.

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