env:list
Introduction
env:list lists the variables of the workspace .env, grouped by category, with sensitive values masked. Use it for a quick overview. To find out why a variable does not behave, use env:show.
splent env:list
SPLENT
✔ SPLENT_APP sample_splent_app
✔ SPLENT_ENV dev
✔ SPLENT_FORGE_TOKEN 3f9a****0b1c
✔ SPLENT_FORGE_USER splent-dev
PyPI
· PYPI_PASSWORD pypi****AbTA
· PYPI_USERNAME __token__
Database
✔ DB_HOST db
✔ DB_NAME sample_splent_app
✔ DB_PASSWORD ****
Redis
✔ REDIS_URL redis://redis:6379/0
10 variable(s) in /workspace/.env (sensitive values masked)
Filtering by name
splent env:list FORGE
Only the variables whose name contains the text, ignoring case.
Finding what your shell has not exported
splent env:list --unset
Only the variables .env defines that the shell the command started from did not export.
Printing names only
splent env:list --keys-only
One name per line, for scripts. Add --no-mask to any listing to show sensitive values in plain text.
Reading the listing
It reads $WORKING_DIR/.env, which is /workspace/.env in the CLI container. Variables are grouped by prefix, SPLENT_, GITHUB_, PYPI_, DB_, REDIS_, MAIL_, AWS_ and CELERY_, and the rest go under Other.
| Indicator | Meaning |
|---|---|
✔ |
The shell exported it with the .env value |
≠ |
The shell exported another value. The CLI keeps reading the shell’s until you run source .env |
· |
Only in .env. The CLI still reads it from the file |
The indicators compare the file with what your shell exported when the command started. Inside the CLI container the shell exports .env once, when you enter it, so ≠ usually marks a value edited since then and · a variable added since then. See Reloading after an edit.
Names containing SECRET, PASS, PWD, TOKEN, KEY or CREDENTIAL are masked. A value under 12 characters prints as ****, and a longer one keeps at most its first and last four characters, never more than a quarter of it. The password inside a URI (scheme://user:password@host) becomes ****.
Reference
| Argument or option | Description |
|---|---|
FILTER |
Optional. Only the names containing this text, ignoring case |
--keys-only |
Print the names only, one per line |
--no-mask |
Show sensitive values in plain text |
--unset |
Only the variables the shell did not export |
Without a .env it exits 1.