feature:env
Manage .env files for a feature (based on the feature symlink inside the active product).
Usage
Show resolved paths / status:
splent feature:env <feature_name>
Generate the feature .env:
splent feature:env <feature_name> --generate --dev
or
splent feature:env <feature_name> --generate --prod
Example
splent feature:env splent_feature_auth --generate --dev
Description
This command:
- Reads the active product
pyproject.tomland locates the matching feature entry (including version if present). - Resolves the feature symlink in
<product>/features/. - Works with the feature
docker/directory. - When
--generateis used, createsdocker/.envfrom:.env.<env>.exampleif present (devorprod)- otherwise
.env.example
If --dev / --prod is not provided, it can use SPLENT_ENV=dev|prod.
Requirements
- A product must be selected (
SPLENT_APPset). - The feature must be declared in the product and linked under
<product>/features/. - The feature must contain a
docker/directory.