洪 民憙 (Hong Minhee) 
@hongminhee@hollo.social
Optique 0.7.0 will support Zod schemas as value parsers.
Seemed like a natural fit—same validation logic for both CLI and app code.

@hongminhee@hollo.social
Optique 0.7.0 will support Zod schemas as value parsers.
Seemed like a natural fit—same validation logic for both CLI and app code.
@mikebroberts@hachyderm.io · Reply to 洪 民憙 (Hong Minhee) :nonbinary:'s post
@hongminhee I’m a recent zod convert. Still wrapping my head around when and when not to use transforms / codecs - but I very much like the combination of static and runtime type checking in one definition. I was using AJV in a couple of places before, but zod has won me over.
I don't have any CLI tools I'm working on at the moment, but will look at Optique if I do!

@hongminhee@hollo.social · Reply to 洪 民憙 (Hong Minhee) :nonbinary:'s post
Update: Just added automatic metavar inference!
The help text now gets smarter labels based on your Zod schema:
z.string().email() → EMAILz.coerce.number().int() → INTEGERz.enum([…]) → CHOICENo manual configuration needed.
https://github.com/dahlia/optique/commit/d4903dfdb88727a488dedb6a73ad8997868246e1