After changing the model, use doctor → plan → generate --dry-run → generate. In every invocation, --path selects the intended project directory.
Check the directory and model
admingen-cli --path ./docs-demo --output json doctor
admingen-cli --path ./docs-demo --output json plan
doctor shows initialized, the path and, when a project exists, its model and entity count. It checks initialization, not PostgreSQL or web-server readiness.
plan validates and normalizes the model, prepares file operations and shows warnings and conflicts. No generated files are written.
Inspect differences and apply them
admingen-cli --path ./docs-demo generate --dry-run
admingen-cli --path ./docs-demo generate
| Command/flag | What it does |
|---|---|
plan |
Calculate the generation plan. |
generate --dry-run |
Render content and show a diff without writing generated files. |
generate |
Apply allowed changes, update lock/history and the successful model baseline. |
generate --force |
Allow overwriting tracked generated files edited manually. |
In JSON, inspect blocked, summary and files. Each file shows its path, action or status, diff and conflict reason. sync_metadata means content already matches but internal metadata needs updating; the source is not rewritten.
Generate does not apply SQL, start the application or deploy a release. Migrations, builds and restarting the generated project may be needed afterward. See local development for the sequence.
If a conflict occurs
- Find the file and reason in dry-run.
- If you added business logic to a generated file, move it into the intended custom zone.
- Preview again. Use
--forceonly if you are prepared to lose the manually edited version of a generator-owned file. - Retain
lock: deleting it is not a universal fix.
Force does not permit overwriting custom files or turn a generated file into a manual extension point. See file ownership.
History and model restoration
History is stored in .admingen/history/; the last successfully generated model is in .admingen/baselines/last-successful-project.yaml. Do not edit internal files manually. History viewing and restoration preview are available in the Generator UI.
There are no separate CLI history, diff or rollback commands. Use dry-run for a diff.
Restoring a model, reverting a Git commit, rolling back images and restoring a database backup solve different problems. Restoring the model does not undo SQL already applied. See generation and restoration and backup and rollback for the procedure.