Skip to main content

getv — Universal .env Variable Manager

PyPI version Python versions License: Apache-2.0 Downloads Tests

We increasingly work with APIs, especially in the context of LLMs, constantly needing to provide new keys and then copy them to other tools, .env files. What if when copying to the clipboard, they were automatically saved to .env from which various applications like ollama or libraries like liteLLM could retrieve the specified API TOKEN?

  • copy an API KEY in your browser
  • run: getv grab
  • use multiple keys directly: getv exec llm groq -- python app.py

Read, write, encrypt, and delegate environment variables across services and devices.

img.png

Copy to the clipboard and run getv grab to detect and save the API key

$ getv grab

Detected:  groq (GROQ_API_KEY)
Key:       gsk_Y1xV...TNpA
Source:    Prefix match
Domain:    console.groq.com
Category:  llm
Profile:   ~/.getv/llm/groq.env

Saved to /home/tom/.getv/llm/groq.env

Usage:
  getv get llm groq GROQ_API_KEY
  getv exec llm groq -- python app.py

without any plugins, managers, or integrations...

Clipboard → .env Auto-Detection No other CLI tool has this feature. Copy any API key and run getv grab — it auto-detects the provider, saves to the right profile, and shows usage commands. Perfect for rapid RPi + LLM development workflow.

$ getv grab              # copy API key → auto-detect provider → save
$ getv exec llm groq -- python app.py   # run with profile injected
$ getv ssh rpi3 "uname -a"              # SSH using stored profile

getv.gif

Why getv?

  • Clipboard → .env — getv grab auto-detects 19 API key prefixes from clipboard
  • Built-in integrations — SSH, curl, Docker, LiteLLM, Ollama, Pydantic — no plugins
  • Smart profiles — organize by category (llm/, devices/, tokens/) with per-app defaults
  • One-liner power — process substitution, pipes, shell eval

Install

pip install getv                   # core
pip install "getv[crypto]"         # + encryption (Fernet)
pip install "getv[all]"            # everything

Quick Start

# Save a profile
getv set llm groq LLM_MODEL=groq/llama-3.3-70b-versatile GROQ_API_KEY=gsk_xxx

# Read a variable
getv get llm groq LLM_MODEL

# List profiles (secrets masked)
getv list llm

# Run with env injected
getv exec llm groq -- python my_script.py

# Auto-detect API key from clipboard
getv grab

# Export formats
getv export llm groq --format json
getv export llm groq --format shell
getv export llm groq --format docker

Python API

from getv import EnvStore, ProfileManager

# Single .env file
store = EnvStore("~/.myapp/.env")
store.set("DB_HOST", "localhost").set("DB_PORT", "5432").save()

# Named profiles
pm = ProfileManager("~/.getv")
pm.add_category("llm", required_keys=["LLM_MODEL"])
pm.set("llm", "groq", {"LLM_MODEL": "groq/llama-3.3-70b-versatile", "GROQ_API_KEY": "gsk_xxx"})

# Merge profiles
cfg = pm.merge_profiles({"APP_NAME": "myapp"}, llm="groq", devices="rpi3")

Profile Directory

~/.getv/
├── .fernet.key            ← encryption key (chmod 600)
├── defaults/              ← per-app profile selections
│   ├── fixpi.conf         → llm=groq, devices=rpi3
│   └── prellm.conf        → llm=openrouter
├── devices/
│   ├── rpi3.env
│   └── rpi4-prod.env
├── llm/
│   ├── groq.env
│   └── openrouter.env
└── tokens/
    └── github.env

CLI Reference

Command Description
getv set CATEGORY PROFILE KEY=VAL... Create/update profile
getv get CATEGORY PROFILE KEY Get single value
getv list [CATEGORY [PROFILE]] List categories/profiles/vars
getv delete CATEGORY PROFILE Delete profile
getv export CATEGORY PROFILE --format FMT Export (json/shell/docker/env/pydantic)
getv encrypt CATEGORY PROFILE Encrypt sensitive values
getv decrypt CATEGORY PROFILE Decrypt values
getv exec CATEGORY PROFILE -- CMD... Run with profile env
getv use APP CATEGORY PROFILE Set app default
getv defaults [APP] Show app defaults
getv ssh PROFILE [CMD] SSH to device
getv curl PROFILE URL Authenticated API call
getv grab [--dry-run] Auto-detect API key from clipboard
getv diff CATEGORY A B Compare two profiles
getv copy CAT/SRC CAT/DST Clone profile
getv import FILE [CAT PROFILE] Import from .env / docker-compose
getv init Interactive setup wizard

Documentation

Document Description
docs/INTEGRATIONS.md SSH, LiteLLM, Ollama, Docker, curl, Pydantic, nfo, file watcher
docs/GRAB.md Clipboard detection — 19 prefixes, browser history, Python API
docs/SECURITY.md Masking, Fernet encryption, key rotation, validation, format export
docs/EXAMPLES.md 20+ one-liner examples — pipes, process substitution, cron, Docker
docs/COMPARISON.md getv vs direnv vs dotenvx vs envie

Environment Variables

Variable Default Description
GETV_HOME ~/.getv Base directory for profiles

Adopted by

  • fixpi — SSH + LLM diagnostic agent
  • prellm — LLM preprocessing proxy
  • code2logic — Code analysis engine
  • amen — Intent-iterative AI gateway
  • marksync — Markdown sync server
  • curllm — LLM-powered web automation

Development

git clone https://github.com/wronai/getv.git
cd getv
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest  # 190 tests

License

Apache License 2.0 - see LICENSE for details.

Author

Created by Tom Sapletta - tom@sapletta.com

Metadata

Release files for getv 0.2.10

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

Source distribution (sdist)

Source distribution for getv 0.2.10
File Size Uploaded
getv-0.2.10.tar.gz 49.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for getv 0.2.10
File Interpreter ABI Platform
getv-0.2.10-py3-none-any.whl Python 3 none any Details

Total release size: 94.3 kB

Release files / getv-0.2.10.tar.gz

Download URL getv-0.2.10.tar.gz
Size 49.9 kB
Tags Source
SHA-256 checksum
How to use checksums
1279a3909eda281e14ab7e064e64b3cc327e147902d75b30f13adb8285b57b46
BLAKE2b-256 checksum
How to use checksums
c9cdf78124ed2f992f46f73ec8c82c2389d8a9b14859e027edb43aa853c37411
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / getv-0.2.10-py3-none-any.whl

Download URL getv-0.2.10-py3-none-any.whl
Size 44.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ad2edcfb399c7e24b74686a344e90ae4c042b2c2abeebff2f496a9deed925a9c
BLAKE2b-256 checksum
How to use checksums
0fe0b5b1d1ee93e24f1d2a9392f4258a1c5e883f2e6ed06da41071de218ba178
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.2.10 This release

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.3

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

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