洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@hongminhee@hollo.social

New blog post: Bringing parser combinators to CLI parsing with Optique

  • Compose parsers like or(option("-a"), option("-b"))
  • TypeScript infers discriminated unions automatically
  • Inspired by Haskell's optparse-applicative

https://dev.to/hongminhee/optique-type-safe-cli-parser-combinators-39md

jnkrtech's avatar
jnkrtech

@jnkrtech@treehouse.systems · Reply to 洪 民憙 (Hong Minhee)'s post

@hongminhee I love what you’ve done with this library! I’m already pushing my coworkers to try to get them to adopt it. I’ve been frustrated by yargs for years.

PolyWolf's avatar
PolyWolf

@PolyWolf@treehouse.systems · Reply to 洪 民憙 (Hong Minhee)'s post

@hongminhee this is so cool!!