How To Create CLI Appsโ€‚by@hsnice

How To Create CLI Apps

Himanshu Singh created two CLI apps and names them markOne and markTwo. The names are not common because I made them as an assignment. The first CLI app is a "Test Your Mind" quiz. The second is also a quiz, but this time it will check that you are an "emoji person" or not. Tools I used include: Closure, readline-sync, an online IDE, a dependency, and a tool for testing your knowledge of how to use the terminal.
image
Himanshu Singh Hacker Noon profile picture

Himanshu Singh

๐ŸŒ๐Ÿ’ป Web Developer | ๐Ÿ”Ž hsnice16 | Himanshu Singh(on youtube)

Being a programmer, usually, my interaction with the terminal is more than any non-programmer. So, I was thinking why not make CLI apps and decorate them. They should have a nice interface, not like the GUI apps. But a little bit nicer than usual.

So, I created two CLI apps and names them markOne and markTwo. The names are not common because I made them as an assignment.

โœ”๏ธ first CLI app

For the first CLI app, I chose to make a "Test Your Mind" quiz. In which, there are two levels. In level 1, there are 6 questions and to go on level 2 you must give 5 correct answers. Questions are not from any specific topic. So everyone can play.

In level 2, there are 4 questions and you have to give 3 correct answers to pass it.

image

Now no more talk, you should play it: PLAY

โœ”๏ธsecond CLI app

The second CLI app is also a quiz, but this time it will check that you are an "emoji person" or not.

In this quiz, you have to give answers to 10 questions. And in last, It will show what % are you an emoji person?

image

You should play it, too: PLAY

๐Ÿงฐ Tools I used

  • replit: as an online IDE
  • javascript: as a programming language in Node.js runtime environment
  • chalk: a dependency, for coloring
  • readline-sync: a dependency, for taking input
  • keyInSelect: method of readline-sync, for MCQ question

๐Ÿ That's all for this

If after playing games you want to comment on how was it, feel free to leave a mail at '[email protected]'. You can also connect with me on Twitter, LinkedIn, Instagram.

Himanshu Singh Hacker Noon profile picture
by Himanshu Singh @hsnice. ๐ŸŒ๐Ÿ’ป Web Developer | ๐Ÿ”Ž hsnice16 | Himanshu Singh(on youtube)Connect With Me

Tags

Join Hacker Noon

Create your free account to unlock your custom reading experience.