fabien0102 / openapi-codegen

A tool for generating code base on an OpenAPI schema.
496 stars 62 forks source link

Prompt & Task manager #6

Open fabien0102 opened 2 years ago

fabien0102 commented 2 years ago

Summary

In order to have the best DX as possible, we need to be able to display nice prompt to ask question and having a task manager to display progress during the generation

What are we looking for?

Libraries to explore

Prompt

~https://github.com/goliney/garson~ -> No types exported, and the types are very bad

Task manager / Progress

https://github.com/privatenumber/tasuku https://github.com/agracio/ts-progress

Going deeper (if previous libraries are not good enough)

https://github.com/vadimdemedes/ink https://github.com/vadimdemedes/ink-testing-library

https://github.com/yarnpkg/berry/tree/master/packages/yarnpkg-libui

DX ref

https://cliffy.io/prompt/index.html

fabien0102 commented 2 years ago

I did a little POC with ink, this will definitely do the job! 😁

fabien0102 commented 2 years ago

@mpotomin Little screenshot for you, so you can see where the prompt API is going 😉

signal-2021-10-25-155006_001

fabien0102 commented 2 years ago

A prompt homemade framework based on ink was introduce in #44

Adding https://github.com/privatenumber/tasuku (or something similiar) for adding feedback during the generation is still in the picture

needim commented 2 years ago

@fabien0102 what is the idea behind this? I like to participate.