NewsLab
Apr 28 20:38 UTC

Batteries Included CLI Framework (news.ycombinator.com)

10 points|by maxalbarello||8 comments|Read full story on news.ycombinator.com
I've been looking for a "batteries included" CLI framework that besides the usual argument and flag parsing also provides telemetry, auth, release pipeline, testing utils, ... but couldn't find anything like that.

As CLIs are becoming more popular it seems that these problems will be more and more common. Is anyone aware of a service that provides those features out-of-the-box? I'm thinking about something like stainless.com but for CLIs instead of SDKs.

Comments (8)

8 shown
  1. 1. ejkrkevjgkf||context
    1bhdjf
  2. 2. ejkrkevjgkf||context
    hrh
  3. 3. maxalbarello||context
    can you provide a bit more info?
  4. 4. ejkrkevjgkf||context
    dhf
  5. 5. slurpyb||context
    Typer.
  6. 6. mdonnalley||context
    I would recommend oclif if you're using node

    It has pretty much everything you're looking for. Feel free to ask me any question. I maintained the project for several years

  7. 7. maxalbarello||context
    Thanks a lot for your work on oclif!

    What I was looking for is something like a framework + service. Imagine the equivalent of netx.js + vercel but for CLIs instead of for full stack apps. oclif seems to be only a great framework afaik.

    as usage of CLIs increases I wonder whether there will be a need for a service that provides everything that developers of CLIs need (auth, telemetry, releases, ...). Something like what Vercel is today for full stack apps. Are you aware of anything along those lines?

  8. 8. udugadoqehale||context
    There are some options but it depends on your language/stack. If your stack is Go, you can try cobra-cli, but I think you will need to wire auth yourself.

    For Node, Oclif for sure! Covers plugins, auto-update, and some telemetry hooks... I think the closest thing that you are looking for.