I notice that some programs (e.g. sqlite
, mysql
client) provide a command-line prompt that is very similar in capabilities to the bash
's, including:
which make me think that they are using the same toolset for this.
I'd like to create a prompt with similar capabilities in my program, which tools can I use? I prefer it to have the same functionality as in bash
, so that the users would be familiar with it.
CLI is a command line program that accepts text input to execute operating system functions. In the 1960s, using only computer terminals, this was the only way to interact with computers. In the 1970s an 1980s, command line input was commonly used by Unix systems and PC systems like MS-DOS and Apple DOS.
Create a file index. js in the root of the project. This will be the main entry of the CLI tool that will initialize the commands it will have. NOTE: If you are using Windows for development, make sure that the line end character is set to LF instead of CRLF or the tool will not work.
Most of these use the GNU readline library
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With