feature:unlock

Convert one or all versioned (pinned) features to editable at the workspace root.


Usage

splent feature:unlock [<feature_name>] [--all] [--force]
Argument / Option Description
<feature_name> Feature to convert (splent_feature_auth or auth).
--all Convert every versioned feature declared in pyproject.toml.
--force Bypass lifecycle state guards (see below).

Examples

Convert a single feature.

splent feature:unlock auth

Convert all versioned features at once.

splent feature:unlock --all

Example output

  auth (v1.2.7) -> editable
    copying to workspace root...
    reinstalling in web container...
    ready.

Description

For each versioned feature, this command does the following.

  1. Copies the versioned snapshot from .splent_cache/ to the workspace root (/workspace/<feature_name>/).
  2. Unlocks files (restores write permissions, since cached features are read-only).
  3. Switches the Git working copy to the main branch.
  4. Fixes the Git remote origin (SSH or HTTPS depending on env).
  5. Removes the @version from pyproject.toml.
  6. Replaces the versioned symlink (→ cache) with an editable symlink (→ workspace root).
  7. Runs pip install -e in the web container so the running Flask process picks up the new path.
  8. Touches __init__.py to trigger watchmedo auto-restart. No manual restart needed.

Features that are already editable (no @version) are skipped silently.

--force

If a feature has applied migrations (state migrated or active), unlock is blocked to prevent data loss. Rolling back migrations on an editable copy could differ from the pinned version. Run splent db:rollback <feature> first, or use --force if you know what you’re doing.


Result

Before the conversion.

features/splent_io/splent_feature_auth@v1.2.7 → .splent_cache/features/splent_io/splent_feature_auth@v1.2.7

After the conversion.

features/splent_io/splent_feature_auth → ../../../splent_feature_auth  (workspace root)

The feature is now at the workspace root, fully writable, on the main branch, and the running Flask app has already reloaded.


Requirements

  • A product must be selected (SPLENT_APP set).
  • The feature must be declared in the product’s pyproject.toml.
  • A versioned snapshot must exist in .splent_cache.

See also


Back to top

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