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.1.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.1-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sevn-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 f1a4117a26c08fab9ace53641b630010c1fa24467fcba75221eb5acb3dac84e7
MD5 b369f7dafec7ffa6f90d4dbd650373f9
BLAKE2b-256 5db0f0741e104279b282e6167cb14ded5e54c5e169013ac0f59ac441baecdd7c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sevn-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6447a65a761b0e19f9644553b73a7bd0d508dbb95b4d74644731b8f47d7c2a23
MD5 eda0b3618b6ea9a22b228d52a9a84144
BLAKE2b-256 258e2e8c53d335f3f58a462f7db52cf208556f1e0345b562c85fb88b6792384b

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