New project: from goat init to your first model
Creating a goatcms-child project, preparing it with @goatcms/herd/setup.goat, developing with @goatcms/herd/dev/watch.goat, your first entity and good practices.
In this exercise, you will change the Notes model before starting the database for the first time. Install Goat, Git and Docker, start Docker, and create a project with the goatcms-child starter. The older goatcms starter has its own recipes.
Before goat init, sign in to an account with an active project initialization entitlement. See Goat CLI for access details.
goat login
goat init ./my-project --name=my-project --git-repo=git@github.com:your-user/my-project.git --terminal-prefix=MYAPP --default-language=en --supported-languages=en,pl --template=goatcms-child
cd my-projectAdd a priority to a note
- In
herd/_model/50-notes.model.goat, findentity:add --name=note. Add the declaration below to the--propertiesheredoc alongsidecompleted. - In the
--systemblock, findmodule:add --name=crud. Addpriorityto both field lists,--property:list:listand--property:list:persist. The starter already selects the Notes manager inherd/views/foundation.goat.
add --name=priority --type=short_textgoat re
goat run:script --path=@goatcms/herd/setup.goat
goat run:script --path=@goatcms/herd/dev/watch.goatAfter the first frontend build, open http://localhost:8091/app/. Sign in as the starter's local administrator and create a note in Notes with priority high. Reopen it to confirm the value was saved. Stop the watcher, then run goat run:script --path=herd/ci/test.goat.
For an existing database, prepare a model migration before running the new version. Keep domain rules and application extensions in the project source under herd/ and child/.
Creating a project in the panel
When creating a project, empty Git author fields use the current account name and email. Saved Git values and your edits take precedence. After upgrading, MCP clients should refresh the catalogue to discover view_worker_account_profile (account:read, admin profile). Its read result includes suggestedAuthorName and suggestedAuthorEmail; get_git_profile and existing save inputs/results stay unchanged.