spl:add-feature

Add a feature to an SPL with auto-detected dependency constraints.


Usage

splent spl:add-feature <spl_name> <feature_package> [--org ORG]

Requires detached mode (no product selected).

Options

Option Default Description
--org splent-io Feature organization

How it works

  1. Scans the feature’s source code for dependencies:
    • Foreign keys: db.ForeignKey("user.id") → looks up which feature owns the user table
    • Python imports: from splent_io.splent_feature_auth import ...
    • Template references: url_for('auth.login') in .html files
  2. Shows detected constraints and asks for confirmation.

  3. Writes to the UVL file:
    • Adds the feature declaration with {org, package} attributes
    • Adds detected constraints (e.g., notes => auth)

Example

$ splent spl:add-feature sample_splent_spl splent_feature_notes

  Adding notes to sample_splent_spl

  Scanning for dependencies...

  Detected dependencies:
    notes => auth

  Add 'notes' to sample_splent_spl? [Y/n]: y

  ✅ Feature 'notes' added to sample_splent_spl.
     Constraints: notes => auth

See also


Back to top

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