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`.
16 lines
245 B
Text
16 lines
245 B
Text
# .env.example
|
|
DB_CONNECTION=mysql
|
|
DB_HOST=127.0.0.1
|
|
DB_PORT=3306
|
|
DB_DATABASE=laravel
|
|
DB_USERNAME=root
|
|
DB_PASSWORD=
|
|
|
|
REDIS_HOST=127.0.0.1
|
|
REDIS_PASSWORD=null
|
|
REDIS_PORT=6379
|
|
|
|
# Required, no default
|
|
JWT_SECRET=
|
|
# Required for billing
|
|
STRIPE_KEY=
|