Also the way you show examples is one of the best I've seen so far, with the output right below, optionally showing imports imports and the option to show it in a monaco editor with types.
Could you also compare it to Prisma and Mammoth ?
I hadn't come across those other libraries.
On Prisma, I think I agree with your assessment. A key thing that this and Prisma have in common is interrogating your DB to generate types. Zapatos is (almost) wholly limited to generating types, while it seems Prisma generates a bunch of code too.
Prisma seems somewhat more like an ordinary ORM. It introduces more of its own terminology and abstractions, has its own ways of inserting into and querying related tables, and so on. At a glance, it looks nicely thought out. It has plans to become a SaaS of some sort.
Mammoth, on the other hand, looks like it tries to solve a very similar problem to Zapatos, and gets there by providing a query builder. You define all your tables manually in code, and then write SQL through the medium of TypeScript.
Zapatos aims at a very much reduced level of abstraction: it’s really just a much more ergonomic, and fully typed, way to run SQL. I created it mainly out of frustration with TypeORM, after converting an existing code base from CoffeeScript to TypeScript and from Sequelize to TypeORM.
My recollection is that TypeORM did something really dumb and unexpected, like deciding to catch a unique index violation and silently replace the offending record, and that this was what finally prompted me to decide to replace it with something homegrown. I also found using transactions with TypeORM clumsy and painful.