cloudthinker-ai/CloudSkills / skills/connections/managing-dotenv-vault
managing-dotenv-vault
VerifiedUse when working with Dotenv Vault — dotenv Vault encrypted environment variable management, environment syncing, team collaboration, and version tracking. Covers vault creation, environment pushing and pulling, key listing, version history, and multi-environment management. Use when managing encrypted .env files, syncing environment variables across teams, comparing environments, or auditing config changes with Dotenv Vault.
Dotenv Vault Management Skill
Manage and analyze encrypted environment files, environments, and versions in Dotenv Vault.
Tool Conventions
Prerequisites
npx dotenv-vault CLI must be available. Projects must be linked with npx dotenv-vault new or npx dotenv-vault login.
Core Commands
npx dotenv-vault push <environment>-- push local .env to vaultnpx dotenv-vault pull <environment>-- pull from vault to local .envnpx dotenv-vault open <environment>-- open vault UInpx dotenv-vault keys <environment>-- show decryption key
Output Rules
- TOKEN EFFICIENCY: Extract only needed fields
- Target <=50 lines per script output
- NEVER output secret values or decryption keys -- only output key names
- Never dump full .env file contents
Discovery Phase
List Environment Keys
#!/bin/bash
ENV_FILE="${1:-.env}"
echo "=== Environment Variable Keys (${ENV_FILE}) ==="
if [ -f "$ENV_FILE" ]; then
grep -v '^#' "$ENV_FILE" | grep -v '^\s*$' | cut -d'=' -f1 | head -25
echo ""
echo "Total keys: $(grep -v '^#' "$ENV_FILE" | grep -v '^\s*$' | wc -l)"
else
echo "File not found: $ENV_FILE"
fi
Check Vault Status
#!/bin/bash
echo "=== Vault Files ==="
ls -la .env.vault .env.me .env.keys 2>/dev/null || echo "No vault files found"
echo ""
echo "=== Environment Files ==="
ls -la .env .env.* 2>/dev/null | grep -v '.vault' | grep -v '.me' | grep -v '.keys'
echo ""
echo "=== Vault Project ==="
if [ -f ".env.vault" ]; then
echo "Vault file exists - project is connected"
wc -c < .env.vault | xargs -I{} echo "Vault size: {} bytes"
else
echo "No vault file - run 'npx dotenv-vault new' to initialize"
fi
Analysis Phase
Compare Environments
#!/bin/bash
echo "=== Key Count by Environment ==="
for env_file in .env .env.development .env.staging .env.production; do
if [ -f "$env_file" ]; then
count=$(grep -v '^#' "$env_file" | grep -v '^\s*$' | wc -l)
echo "${env_file}\t${count} keys"
fi
done | column -t
echo ""
echo "=== Keys in .env.development Missing from .env.production ==="
if [ -f ".env.development" ] && [ -f ".env.production" ]; then
DEV_KEYS=$(grep -v '^#' .env.development | grep -v '^\s*$' | cut -d'=' -f1 | sort)
PROD_KEYS=$(grep -v '^#' .env.production | grep -v '^\s*$' | cut -d'=' -f1 | sort)
comm -23 <(echo "$DEV_KEYS") <(echo "$PROD_KEYS") | head -15
else
echo "Both .env.development and .env.production required"
fi
Audit Configuration
#!/bin/bash
echo "=== Git-tracked .env Files (potential leak) ==="
git ls-files | grep -E '\.env($|\.)' | grep -v '.vault' | grep -v '.example' | grep -v '.sample' | head -10
echo ""
echo "=== .gitignore Coverage ==="
if [ -f ".gitignore" ]; then
grep -E '\.env' .gitignore || echo "WARNING: No .env patterns in .gitignore"
else
echo "WARNING: No .gitignore found"
fi
echo ""
echo "=== Vault Encryption Status ==="
if [ -f ".env.vault" ]; then
grep -c 'DOTENV_VAULT_' .env.vault | xargs -I{} echo "{} encrypted environment blocks"
fi
Output Format
- Use tab-separated columns with
column -t - Limit lists to 15-25 items
- NEVER display secret values or decryption keys
- Show summaries before details
Anti-Hallucination Rules
- NEVER assume resource names — always discover via CLI/API in Phase 1 before referencing in Phase 2.
- NEVER fabricate metric names or dimensions — verify against the service documentation or
--helpoutput. - NEVER mix CLI commands between service versions — confirm which version/API you are targeting.
- ALWAYS use the discovery → verify → analyze chain — every resource referenced must have been discovered first.
- ALWAYS handle empty results gracefully — an empty response is valid data, not an error to retry.
Counter-Rationalizations
| Shortcut | Counter | Why |
|---|---|---|
| "I'll skip discovery and check known resources" | Always run Phase 1 discovery first | Resource names change, new resources appear — assumed names cause errors |
| "The user only asked for a quick check" | Follow the full discovery → analysis flow | Quick checks miss critical issues; structured analysis catches silent failures |
| "Default configuration is probably fine" | Audit configuration explicitly | Defaults often leave logging, security, and optimization features disabled |
| "Metrics aren't needed for this" | Always check relevant metrics when available | API/CLI responses show current state; metrics reveal trends and intermittent issues |
| "I don't have access to that" | Try the command and report the actual error | Assumed permission failures prevent useful investigation; actual errors are informative |
Common Pitfalls
- Never expose values: Only display variable names, never values or decryption keys
.env.vaultis encrypted: Safe to commit to Git;.envfiles with values must NOT be committed.env.meis personal: Contains your authentication -- never share or commit- Environment naming:
development,staging,production, andciare standard environments - Pull before edit: Always pull latest from vault before making changes to avoid conflicts
- DOTENV_KEY: Required at runtime to decrypt
.env.vault-- set as environment variable in deployment
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 465k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 465k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 465k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |