CLI Reference
Command overview
bash
zeptoz init <project>
zeptoz collection create <name> [fields...] --id-strategy <int|uuidv4|uuidv7|ulid|nanoid>
zeptoz hook add <collection> <event> --lang <rs|js|ts>
zeptoz dev --project-root .
zeptoz deploy --project-root . --output ./distzeptoz init
Initialize a new Zeptoz project directory.
| Option / Arg | Default | Values / Format | Description |
|---|---|---|---|
<project_name> | none | directory name | Project directory to initialize. |
--dry-run | false | switch | Print planned file/DB actions without writing. |
zeptoz collection create
Create a collection schema and database table.
| Option / Arg | Default | Values / Format | Description |
|---|---|---|---|
<name> | none | collection name | Collection name to create. |
[fields...] | empty | name:type[:modifier...] | Field definitions. |
--id-strategy | int | int, uuidv4, uuidv7, ulid, nanoid | Record ID strategy for this collection. |
--with-hook | none | <event>:<lang>:<name> | One-shot hook scaffold + binding during collection create. |
--dry-run | false | switch | Print planned DB/filesystem actions only. |
zeptoz hook add
Register and optionally scaffold a hook for a collection event.
| Option / Arg | Default | Values / Format | Description |
|---|---|---|---|
<collection> | none | collection name | Target collection name. |
<event> | none | hook event string | Lifecycle event to bind (for example before_insert). |
--lang | none | rs, ts, js, py | Hook language alias. |
--source | none | file path | Use an existing source file. |
--new | none | hook name | Scaffold a new hook source file. |
--dry-run | false | switch | Print planned writes/DB inserts only. |
Notes:
--sourceand--neware mutually exclusive.- For TypeScript hooks, Zeptoz writes
hooks/_sdk/types.d.tsfor typing support.
zeptoz dev
Run Zeptoz in development mode.
| Option / Arg | Default | Values / Format | Description |
|---|---|---|---|
--project-root | . | path | Project root containing zeptoz.toml. |
zeptoz deploy
Build deployment artifacts from a project.
| Option / Arg | Default | Values / Format | Description |
|---|---|---|---|
--project-root | . | path | Project root containing zeptoz.toml. |
--output | ./dist | path | Output directory for artifacts. |
--target | <os>-<arch> | target label | Target triple label used in artifact naming. |
--manifest-only | false | switch | Write runtime manifest only, skip tarball creation. |
--dry-run | false | switch | Print planned file operations only. |
Examples
bash
zeptoz collection create Task title:string:required done:bool:default=false --id-strategy uuidv7
zeptoz hook add Task after_insert --lang ts --new notify