Skip to main content

A secure environment variable manager

Project description

sevn 🔐

A secure environment variable manager built on 7 core principles.

The Seven Principles

  • 🔒 Secure – secrets stay local and encrypted
  • 🎯 Simple – install and go, no setup hell
  • 🎭 Scoped – use profiles, isolate secrets
  • 🔧 Script – CLI-first, shell-native
  • 📦 Share – encrypted blob = portable
  • Speed – decrypt only what you need
  • 🌐 State – no server, no risk surface

Installation

pip install sevn

Requires Python 3.9 or higher.

Quick Start

  1. Lock a secret in a profile:
sevn lock STRIPE_KEY=sk_test_123 --profile myproject
  1. List all profiles:
sevn list
  1. Load secrets into your current shell:
eval "$(sevn unlock myproject)"
  1. Or sign into a new shell with loaded secrets:
sevn sign myproject

Commands

lock - Encrypt a secret

sevn lock KEY=VALUE --profile PROFILE_NAME

unlock - Decrypt and load secrets

eval "$(sevn unlock PROFILE_NAME)"

sign - Start a new shell with secrets

sevn sign PROFILE_NAME

list - Show all profiles

sevn list

purge - Remove secrets or profiles

# Remove a specific secret
sevn purge PROFILE_NAME --key SECRET_KEY

# Remove entire profile
sevn purge PROFILE_NAME

init - Initialize new profile

# Normal initialization
sevn init

# Fun mode: Initialize with the seven deadly sins
sevn init --sin
sevn init --sin --write  # Creates .env file

Shell Integration

Add this to your .bashrc or .zshrc for easier usage:

load_secrets() {
    eval "$(sevn unlock ${1:-default})"
}

Then you can simply use:

load_secrets myproject

Security

  • All secrets are encrypted locally using strong cryptography
  • No external servers or cloud storage
  • Each profile is isolated and separately encrypted
  • Temporary files are securely cleaned up
  • Secrets never touch disk in plaintext

Requirements

  • Python >=3.9
  • cryptography >=41.0.0
  • pyyaml >=6.0.1
  • python-dotenv >=1.0.0

License

MIT License

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

sevn-1.0.2.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

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

sevn-1.0.2-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file sevn-1.0.2.tar.gz.

File metadata

  • Download URL: sevn-1.0.2.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for sevn-1.0.2.tar.gz
Algorithm Hash digest
SHA256 1a8f3de57cd75c59c5fecd4e98b801c2abd1304fa12eea734dc8cff49e288db9
MD5 eb8bf4a469ace8d663e1d4db7670a18d
BLAKE2b-256 4ef8eac964c9df1f18f269801f0802515c5fe7d82f8460b9aa388ec4951818ee

See more details on using hashes here.

File details

Details for the file sevn-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: sevn-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for sevn-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e3a926e7bef3eccae8d0d858a35d051b8c0cbadb8ffa869f18d60df952f69e6d
MD5 8eb82cb44d0c3e0f9c311721f626a482
BLAKE2b-256 2dedede962df20caa1c502ae1cadf608ff3feefbd6e2538594962f1e7f8d3755

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