This commit introduces a new command, `/core:env`, to manage environment variables. It provides a set of tools to compare and manage a local `.env` file against a `.env.example` template, with a strong emphasis on security by masking sensitive values. The command includes the following subcommands: - `/core:env`: Shows the current environment variables with sensitive values masked. - `/core:env check`: Validates the local `.env` file against `.env.example`, reporting any missing or required variables. - `/core:env diff`: Displays the differences between the `.env` and `.env.example` files, ensuring sensitive data is not exposed. - `/core:env sync`: Adds missing variables from `.env.example` to the local `.env` file without overwriting existing values. To prevent accidental exposure of secrets, the `.env` file is now included in `.gitignore`.
608 B
608 B
| name | description | args | |
|---|---|---|---|
| /core:env | Manage environment configuration |
|
Environment Management
Provides tools for managing .env files based on .env.example.
Usage
/core:env- Show current environment variables (with sensitive values masked)/core:env check- Validate.envagainst.env.example/core:env diff- Show differences between.envand.env.example/core:env sync- Add missing variables from.env.exampleto.env
Action
This command is implemented by the following script:
"${CLAUDE_PLUGIN_ROOT}/scripts/env.sh" "$1"