Skip to content

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 ./dist

zeptoz init

Initialize a new Zeptoz project directory.

Option / ArgDefaultValues / FormatDescription
<project_name>nonedirectory nameProject directory to initialize.
--dry-runfalseswitchPrint planned file/DB actions without writing.

zeptoz collection create

Create a collection schema and database table.

Option / ArgDefaultValues / FormatDescription
<name>nonecollection nameCollection name to create.
[fields...]emptyname:type[:modifier...]Field definitions.
--id-strategyintint, uuidv4, uuidv7, ulid, nanoidRecord ID strategy for this collection.
--with-hooknone<event>:<lang>:<name>One-shot hook scaffold + binding during collection create.
--dry-runfalseswitchPrint planned DB/filesystem actions only.

zeptoz hook add

Register and optionally scaffold a hook for a collection event.

Option / ArgDefaultValues / FormatDescription
<collection>nonecollection nameTarget collection name.
<event>nonehook event stringLifecycle event to bind (for example before_insert).
--langnoners, ts, js, pyHook language alias.
--sourcenonefile pathUse an existing source file.
--newnonehook nameScaffold a new hook source file.
--dry-runfalseswitchPrint planned writes/DB inserts only.

Notes:

  • --source and --new are mutually exclusive.
  • For TypeScript hooks, Zeptoz writes hooks/_sdk/types.d.ts for typing support.

zeptoz dev

Run Zeptoz in development mode.

Option / ArgDefaultValues / FormatDescription
--project-root.pathProject root containing zeptoz.toml.

zeptoz deploy

Build deployment artifacts from a project.

Option / ArgDefaultValues / FormatDescription
--project-root.pathProject root containing zeptoz.toml.
--output./distpathOutput directory for artifacts.
--target<os>-<arch>target labelTarget triple label used in artifact naming.
--manifest-onlyfalseswitchWrite runtime manifest only, skip tarball creation.
--dry-runfalseswitchPrint 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