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.toml and locates the matching feature entry (including version if present).
  • Resolves the feature symlink in <product>/features/.
  • Works with the feature docker/ directory.
  • When --generate is used, creates docker/.env from:
    • .env.<env>.example if present (dev or prod)
    • otherwise .env.example

If --dev / --prod is not provided, it can use SPLENT_ENV=dev|prod.


Requirements

  • A product must be selected (SPLENT_APP set).
  • The feature must be declared in the product and linked under <product>/features/.
  • The feature must contain a docker/ directory.