lat scaffolds, runs and maintains an application. Every command accepts
--database-url <URL>, falling back to DATABASE_URL, then to the
configuration of the application found from the current directory upward.
cargo install laterite-cli
lat --help
lat <command> --help
Scaffold and set up a new application, or a static website (interactive).
--static: a static website. --content files|folder|git|database: where its content lives, default files. --plugin <SOURCE>: install a plugin, repeatable. --framework-path <PATH>: build against a local framework checkout, also read from LATERITE_FRAMEWORK_PATH. --url, --timezone, --listen, --admin <USERNAME> with --admin-email, --admin-name and the password in LAT_NEW_ADMIN_PASSWORD: answer the prompts up front.
lat new "Acme" --static --content git --url https://acme.example --timezone UTC --listen 127.0.0.1:8080 --admin admin --admin-email admin@acme.example --admin-name Ana
make:migration <DESCRIPTION>
Scaffold a migration file in this crate’s src/migrations/.
--path <PATH>: the crate directory, default ..
lat make:migration create_articles
make:plugin <ID>
Scaffold a plugin crate; <ID> is vendor.name.
--path <PATH>: where to create it, default .. --admin: scaffold the admin half.
lat make:plugin acme.blog --admin
make:resource <NAME>
Scaffold an entity’s migration, schema, store and admin screen.
--path <PATH>: the crate, default .. --field <name:type>: columns beyond id and timestamps; types text, integer, boolean, datetime; repeat or comma-separate. --source <DIR>: keep the records as files in that folder, keyed by a slug column; `–format yaml
json
make:model <NAME>
Scaffold a typed model struct for a table in src/models/.
--path <PATH>: the crate, default .. --field <name:type>: columns beyond id; types text, integer, boolean, datetime. --table <TABLE>: when it is not the plural. See Models.
lat make:model article --field title:text,views:integer
seed [MODULE]
Run the application’s seeders, or one module’s.
--release; -p <PACKAGE>: the binary’s package in a workspace. See Seeding.
Add a plugin from a local path or a git URL, and record it.
--as <FOLDER>: the folder under plugins/, default the crate’s name. In a static website the first add writes its Cargo project and a plugin needs static = true.
lat plugin add ../blog-plugin
plugin remove <NAME>
Remove a plugin from the list by crate name or folder.
--delete: also delete its folder.
lat plugin remove acme-blog --delete
plugin sync
Regenerate the plugins-manifest crate from plugins/plugins.toml, then check the plugins’ dependencies.
None.
lat plugin sync
plugin list
List the plugins this application compiles in.
None.
lat plugin list
plugin check
Check each installed plugin against the expected layout and its dependencies, listing every crate built twice.
--replace: replace templates and config the theme already has; each replaced template keeps a revision.
lat theme import acme acme.zip --replace
theme list
List the themes.
None.
lat theme list
theme build [CODE]
Render a theme’s fixed pages and assets to a directory, for a static host.
--from <DIR>: a theme folder instead of the database, default theme.folder. -o, --out <DIR>, default dist. --base-url <URL>, default app.url, else one derived from server.listen. --copy <SRC>:<DEST>: a directory copied into the output; repeatable, added to theme.copy.