feature:remove

Remove a local (non-versioned) feature from the active product.


Usage

splent feature:remove <feature_name> [--namespace <namespace>] [--force]

Examples

splent feature:remove splent_feature_auth

With explicit namespace:

splent feature:remove splent_feature_auth --namespace splent-io

Description

This command:

  1. Checks that no other installed feature depends on <feature_name> (dependency guard).
  2. Checks that the feature has not had migrations applied (migration state guard).
  3. Removes the feature entry from [tool.splent].features in pyproject.toml.
  4. Removes the symlink at <product>/features/<namespace>/<feature_name>.
  5. Removes the feature entry from splent.manifest.json.
  6. Uninstalls the feature via pip uninstall in the web container and triggers Flask reload.

The running application picks up the removal automatically — no restart or product:derive needed. .splent_cache is never touched.


Safety guards

Dependency guard

If another installed feature declares <feature_name> in its [tool.splent.contract.requires].features, the command aborts:

❌ Cannot remove 'splent_feature_auth': the following installed features depend on it:
   • splent_feature_profile
   • splent_feature_confirmemail
   Remove those features first, or use --force to bypass.

Remove the dependent features first, then remove this one.

Migration state guard

If the feature has state migrated or active in splent.manifest.json, the command aborts:

❌ Feature 'splent_feature_auth' has migrations applied (state: migrated).
   Roll them back first:
   splent db:rollback splent_feature_auth --steps 999
   Or use --force to skip this check.

Roll back the feature’s migrations before removing it to avoid leaving orphaned tables in the database.


Options

Option Description
--namespace Override the feature namespace. Defaults to GITHUB_USER or splent-io.
--force Skip both the dependency guard and the migration state guard. Use with care.

Requirements

  • A product must be selected (splent product:select).
  • The feature must be a non-versioned (editable) feature — no @version suffix.
  • SPLENT_APP must be set.

See also


Back to top

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