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:
- Checks that no other installed feature depends on
<feature_name>(dependency guard). - Checks that the feature has not had migrations applied (migration state guard).
- Removes the feature entry from
[tool.splent].featuresinpyproject.toml. - Removes the symlink at
<product>/features/<namespace>/<feature_name>. - Removes the feature entry from
splent.manifest.json. - Uninstalls the feature via
pip uninstallin 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
@versionsuffix. SPLENT_APPmust be set.
See also
feature:detach— remove a versioned (pinned) featuredb:rollback— roll back a feature’s migrations before removalfeature:status— check current lifecycle states