unjs / consola

🐨 Elegant Console Logger for Node.js and Browser
Other
6.12k stars 175 forks source link

Support custom prompt #215

Closed 13OnTheCode closed 1 year ago

13OnTheCode commented 1 year ago

Describe the feature

Currently, it seems that only the built-in prompts in Clack are supported. If I customize a prompt, I would like to integrate it into Consola for use. Is it possible to achieve this?

Additional information

pi0 commented 1 year ago

Hi. You can provide a custom prompt factory as prompt option to createConsola (see here https://github.com/unjs/consola/blob/main/src/index.ts#L25). But i recommend to keep using built-in behavior for CLI experience consistency.