Generate

Generate fixture data for testing and development.

Syntax

$ vela fixtures generate

This will generate fixture files in the data/fixtures directory. The order of files is determined by the database schema — collections that depend on other collections are written later.

Data is generated from the database schema with json-schema-faker and Faker. Autodate and file fields are skipped — PocketBase fills the first, and files need real content. Relation fields point at records generated earlier in the run or at seed records, so a collection that requires a relation to a seeded one still produces fixtures that load.

Options

  • -c, --count <count> - Number of records per collection, between 1 and 999. Defaults to 10.
  • -s, --seed <seed> - Integer seed for deterministic output
  • -f, --force - Overwrite existing fixture files and clear loaded fixtures
$ vela fixtures generate --count 50 --seed 1234

Passing the same --seed produces the same records every time, which keeps test failures reproducible. Without --force, existing fixture files are left alone.

AI

Pro Planned

An --ai option for more realistic generated data is planned. It is not available today — vela fixtures generate takes only the options above.