check:env
Introduction
check:env checks the workspace environment variables and the versions of Python, the CLI and the framework. Run it when a command complains about SPLENT_APP, a token or a version mismatch.
splent check:env
[✔] Python 3.13.18
[✔] WORKING_DIR = /workspace
[✔] .env file found
[✔] SPLENT_APP = my_first_app
[✔] SPLENT_ENV = dev
[✔] CLI 1.63.1 / Framework 1.33.0, compatible
[✔] SPLENT_FORGE_TOKEN set (git.splent.io)
[⚠] PyPI token not set (set it with splent env:set pypi)
Only a failure makes it exit 1. Warnings do not. splent doctor runs it in its Environment section.
Fixing what it reports
A missing SPLENT_APP, or one that names no folder of the workspace, fails. Select a product with product:select.
A CLI and a framework of different major versions fail. Install matching versions. For an editable install the version is the one in its checkout’s pyproject.toml, as splent version reports it.
A missing token only warns. env:set writes the forge and PyPI credentials under the names this check, check:pypi and the release pipeline read.
Reference
| Check | Passes when | Otherwise |
|---|---|---|
| Python | Always, and shows the version | |
WORKING_DIR |
Set | Warning, the current folder is used |
.env |
Found in the workspace | Warning |
SPLENT_APP |
Set, and the folder exists | Failure |
SPLENT_ENV |
Set | Warning, dev is assumed |
| CLI and framework | Both installed, same major version | Failure |
| Forge token, one line per host | The token of that host set | Warning |
| PyPI token | TWINE_PASSWORD set, or PYPI_PASSWORD |
Warning |
There is one token line for the default host and one for every other host a feature of the product comes from, each naming its variable and host, such as SPLENT_FORGE_TOKEN set (git.splent.io) and GITHUB_TOKEN not set (github.com).