一键导入
dotenvx
Use dotenvx to run commands with environment variables, manage multiple .env files, expand variables, and encrypt env files for safe commits and CI/CD.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use dotenvx to run commands with environment variables, manage multiple .env files, expand variables, and encrypt env files for safe commits and CI/CD.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | dotenvx |
| description | Use dotenvx to run commands with environment variables, manage multiple .env files, expand variables, and encrypt env files for safe commits and CI/CD. |
| license | BSD-3-Clause |
| metadata | {"author":"motdotla","version":"1.0.0","homepage":"https://dotenvx.com","source":"https://github.com/dotenvx/dotenvx"} |
Use this skill when users need encrypted env workflows, multi-environment loading, or runtime env injection for any language.
npm install @dotenvx/dotenvx
Alternative package managers
yarn add @dotenvx/dotenvx
pnpm add @dotenvx/dotenvx
bun add @dotenvx/dotenvx
Create a .env file in the root of your project:
# .env
HELLO="Dotenv"
OPENAI_API_KEY="your-api-key-goes-here"
Encrypt it.
dotenvx encrypt
As early as possible in your application, import and configure dotenvx:
// index.js
require('@dotenvx/dotenvx').config()
// or import '@dotenvx/dotenvx/config' // for esm
console.log(`Hello ${process.env.HELLO}`)
$ node index.js
◇ injected env (2) from .env
Hello Dotenv
That's it. process.env now has the keys and decrypted values you defined in your .env file.
.env.keys..env files as untrusted input..env artifacts in source control..env secrets should not be exposed.require('@dotenvx/dotenvx').config()
// or: import '@dotenvx/dotenvx/config'
Typical requests:
Response style for agents: