Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

dotenvx

БесплатноБез исполняемых скриптовНе проверен

dotenvx - secure environment variable management with encryption. Use for encrypting .env files, multi-environment configuration, cross-platform secret…

enunoот enuno★ 17 звёзд на GitHub24 установки в других каталогах

Об этом скилле

dotenvx Skill

dotenvx is a secure dotenv from the creator of the original dotenv package. It adds encryption, multi-environment support, and cross-platform compatibility to environment variable management. Think of it as "dotenv with encryption" - your secrets are encrypted at rest and can be safely committed to version control.

Core Value Proposition: Encrypt your .env files so they can be safely committed to git, while keeping decryption keys separate and secure.

When to Use This Skill

This skill should be triggered when:

  • Setting up secure environment variable management
  • Encrypting .env files for version control
  • Managing secrets across multiple environments (dev, staging, production)
  • Migrating from plaintext .env to encrypted secrets
  • Deploying applications with encrypted configuration
  • Configuring dotenvx in CI/CD pipelines
  • Troubleshooting dotenvx encryption/decryption issues

When NOT to Use This Skill

  • For basic dotenv usage without encryption (use standard dotenv docs)
  • For cloud-native secrets managers (AWS Secrets Manager, HashiCorp Vault)
  • For Kubernetes secrets management (use k8s secrets/sealed-secrets)

Core Concepts

The Security Problem

Traditional .env files are plaintext - if committed to git or exposed, all secrets are compromised. dotenvx solves this by:

  1. Encrypting secrets with AES-256 and Secp256k1 elliptic curve cryptography
  2. Separating the encrypted file (safe to commit) from the decryption key (kept secure)
  3. Decrypting automatically at runtime when the private key is available

Architecture

┌─────────────────────────────────────────────────────────────┐
│                    dotenvx WORKFLOW                          │
└─────────────────────────────────────────────────────────────┘

   .env (plaintext)              .env.keys (NEVER commit)
   ┌──────────────────┐          ┌──────────────────────────┐
   │ HELLO=World      │          │ DOTENV_PRIVATE_KEY=...   │
   │ API_KEY=secret   │          │ DOTENV_PUBLIC_KEY=...    │
   └────────┬─────────┘          └────────────┬─────────────┘
            │                                  │
            ▼  dotenvx encrypt                 │
   ┌──────────────────┐                        │
   │ HELLO="encrypted:│◄───────────────────────┘
   │   BE9Y5L..."     │     Uses public key to encrypt
   │ API_KEY="encrypt │
   │   ed:CGY8..."    │
   └────────┬─────────┘
            │
            ▼  Safe to commit to git!
   ┌──────────────────┐
   │   Git Repository │
   └────────┬─────────┘
            │
            ▼  dotenvx run (at runtime)
   ┌──────────────────┐
   │ Decrypts using   │◄── Private key from:
   │ private key      │    - .env.keys file
   │                  │    - DOTENV_PRIVATE_KEY env var
   └────────┬─────────┘
            │
            ▼
   ┌──────────────────┐
   │ process.env.HELLO│
   │ = "World"        │
   └──────────────────┘

Key Files

File Purpose Git?
.env Development environment variables ✅ Yes (when encrypted)
.env.production Production environment variables ✅ Yes (when encrypted)
.env.keys Private decryption keys ❌ Never
.env.local Local overrides ❌ No

Installation

npm (Recommended for Node.js projects)

npm install @dotenvx/dotenvx --save

Homebrew (macOS/Linux global install)

brew install dotenvx/brew/dotenvx

Shell Script (Universal)

curl -sfS https://dotenvx.sh | sh

Docker

docker run -it --rm -v $(pwd):/app dotenv/dotenvx help

Windows

winget install dotenvx

npx (No install)

npx @dotenvx/dotenvx help

CLI Commands Reference

run - Inject Environment Variables

Run any command with environment variables injected:

# Basic usage
dotenvx run -- node index.js

# Specify environment file
dotenvx run -f .env.production -- node index.js

# Multiple files (earlier takes precedence)
dotenvx run -f .env.local -f .env -- node index.js

# Use framework conventions (Next.js, etc.)
dotenvx run --convention=nextjs -- npm run build

# Override existing environment variables
dotenvx run --overload -- node index.js

encrypt - Encrypt .env Files

Convert plaintext .env to encrypted format:

# Encrypt default .env file
dotenvx encrypt

# Encrypt specific file
dotenvx encrypt -f .env.production

# Encrypt all .env* files
dotenvx encrypt -f .env*

Result: Creates/updates .env.keys with encryption keys.

decrypt - Decrypt .env Files

Revert encrypted .env to plaintext:

# Decrypt default .env file
dotenvx decrypt

# Decrypt specific file
dotenvx decrypt -f .env.production

set - Set Encrypted Variables

Add or update encrypted variables:

# Set a variable (encrypts automatically)
dotenvx set HELLO World

# Set in specific environment
dotenvx set HELLO production -f .env.production

# Set from
Полный SKILL.md на GitHub

Установить dotenvx в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл dotenvx?

dotenvx - secure environment variable management with encryption. Use for encrypting .env files, multi-environment configuration, cross-platform secret management, and migrating from plaintext dotenv.

Как установить скилл dotenvx?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл dotenvx запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить dotenvx с