product:drift
Introduction
product:drift shows which files SPLENT owns in a product differ from the current templates. It changes nothing. product:sync-template applies the changes.
splent product:drift myapp
Drift report for myapp (generated with CLI v1.0.0, current CLI v1.2.1)
────────────────────────────────────────────────────────────────────────────
scripts/ [SPLENT-owned — safe to update]
00_core_requirements_dev.sh ✔ up to date
00_install_features.sh ⚠ 4 line(s) changed
...
04_handle_migrations.sh ⚠ 1 line(s) changed
entrypoints/ [SPLENT-owned — safe to update]
entrypoint.dev.sh ✔ up to date
entrypoint.prod.sh ✔ up to date
docker/ [SPLENT-owned — safe to update]
Dockerfile.myapp.dev ⚠ 2 line(s) changed
Dockerfile.myapp.dev.dockerignore ⚠ missing
...
.forgejo/workflows/ [SPLENT-owned — safe to update]
splent-validate.yml ✔ up to date
splent-upgrade.yml ✔ up to date
Run 'splent product:sync-template' to apply changes.
Without a name, it inspects the active product (SPLENT_APP). A file the product lacks shows as missing, and product:sync-template creates it. The command always exits 0.
Seeing the diff
splent product:drift myapp --verbose
--verbose prints the full unified diff of every changed file.
What it compares
| Group | Files |
|---|---|
scripts/ |
The 10 numbered startup scripts |
entrypoints/ |
entrypoint.dev.sh, entrypoint.prod.sh |
docker/ |
Dockerfile.{name}.dev, Dockerfile.{name}.prod, their .dockerignore files, .env.dev.example, .env.prod.example |
.forgejo/workflows/ |
splent-validate.yml, splent-upgrade.yml, the CI workflows |
The templates are rendered with the product’s own values, its ports from CRC32(product_name) % 1000, its [tool.splent.ci], the servers its features run and the forge host. A change to any of them shows as changed lines.
Files you own are never inspected. Those are src/{name}/ (config.py, errors.py, logging.py, templates and static files), pyproject.toml and docker-compose.*.yml.
A feature that is not in the workspace
splent-validate.yml needs every feature’s compose files, so while a feature is missing it is not compared. Its row says what brings the feature in.
splent-validate.yml ⚠ run splent product:resolve to compare
...
The other SPLENT-owned files are up to date.
splent-validate.yml was not compared, because splent_feature_cache is not in the workspace. Run splent product:resolve, then splent product:drift myapp again.
For an editable feature the row names splent feature:install <namespace>/<feature> --editable instead.
Reference
Options
| Option | Description |
|---|---|
<product_name> |
The product to inspect. Default, the active product |
--verbose, -v |
Show the full unified diff of every changed file |
When the product does not record the CLI that created it, the header says generated with unknown CLI version.
Errors
<product_name> must name a product directly under the workspace.
| Message | Meaning |
|---|---|
'<name>' is not a valid product name. |
Use lowercase letters, digits and underscores |
Product '<name>' not found. |
No such directory in the workspace |
'<name>' does not resolve to a directory directly under the workspace |
Paths are refused |
'<name>' is the name of a SPLENT repository, not a product. |
The framework, the CLI, the docs, features and SPLs are refused |
'<name>' is not a SPLENT product: <reason>. |
Its pyproject.toml is missing, unreadable, has no [tool.splent], or declares [tool.splent.contract] |