Imported from kristiandupont/cedar (
kanel/AGENTS.md). Install upstream withnpx skills add kristiandupont/cedar --skill kanel. Copyright stays with the author.
cedar/kanel
Purpose: Shared Kanel configuration factory (makeCedarKanelConfig) used by both apps to generate typed DB models, Zod schemas, Knex table types, and seed files from a live Postgres schema.
Notes:
- Plain JavaScript (not TypeScript) — Kanel runs outside the compiled build pipeline, so this folder is intentionally not under
src/. - Apps call
makeCedarKanelConfigin their own.kanelrc.js, passing app-specificspecificTypesandgenerateWorkspacehooks; everything else (Zod config, custom type maps, seed generators) is provided here as the shared baseline. defaultZodTypeMapExtensionsanddefaultCustomTypeMaphandle thepublic.emailbranded type (EmailString/emailStringfromnarrow-types) andpg_catalog.tsrangemapped toRange<Date>.
Key Files:
make-kanel-config.js:makeCedarKanelConfig— the sole export.index.js: Re-exportsmakeCedarKanelConfig.