env:show

Introduction

env:show shows each variable of the workspace .env next to what your shell exported. Use it to see why the CLI reads a value other than the file’s. For a grouped overview, use env:list.

splent env:show
πŸ“„ Reading variables from /workspace/.env

βœ… SPLENT_APP = sample_splent_app
βœ… SPLENT_FORGE_USER = splent-dev
βœ… SPLENT_FORGE_TOKEN = 3f9a****0b1c
🟑 SPLENT_ENV loaded but differs
   shell: prod
   .env : dev
⚠️  TWINE_PASSWORD not loaded
   .env: pypi****AbTA

πŸ’‘ Tip: reload environment variables with:
   source .env

Reading the result

Line Meaning What to do
loaded but differs The shell exported the value before .env changed. The CLI keeps the shell’s value, since .env never overrides a variable the shell holds Run source .env or open a new shell
not loaded The shell never exported it. The CLI still reads it from .env on every run Nothing, unless a script of yours needs it exported

Inside the CLI container the shell exports .env once, when you enter it. See Reloading after an edit.


Reference

It reads .env the way the CLI loads it, with export prefixes and single or double quotes, and compares each variable with what the shell exported when the command started. Nothing runs in a shell. A name that is not a valid variable name is skipped with Skipping 'NAME', not a valid variable name.

Sensitive values are masked as in env:list. Without a .env it exits 1.


Back to top

splent. Distributed by an LGPL license v3. Contact us: drorganvidez@us.es