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.49.0 / Framework 1.30.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 SPLENT_FORGE_TOKEN set, or GITHUB_TOKEN Warning
PyPI token TWINE_PASSWORD set, or PYPI_PASSWORD Warning

The forge token line names the variable and the host of the configured forge, GITHUB_TOKEN when SPLENT_FORGE_HOST=github.com.


Back to top

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