Feature Contracts & Hooks
These commands manage extensibility contracts and template hooks. Contracts define what a feature provides and requires, enabling the CLI to validate compatibility across features. Template hooks let features inject content into shared layout regions without modifying the product’s base templates.
Command reference
| Command | Description |
|---|---|
feature:contract |
Infer and optionally update the feature contract from source code |
feature:hooks |
List all template hook registrations in a feature’s hooks.py |
feature:hook:add |
Add a new hook registration to a feature |
feature:hook:remove |
Remove a hook registration from a feature |
| Navigation registry | Declare one entry in the public main navigation so the menu is composed from the installed features |
| Asset registry | Declare a feature’s CSS/JS so the shell composes the page assets from the installed features |
| Feature settings | Declare a feature’s admin-editable settings and get a generic admin panel for free |