Hackernoon logoHow To Create CLI Apps by@hsnice

How To Create CLI Apps

image
Himanshu Singh Hacker Noon profile picture

@hsniceHimanshu Singh

🌐 Web Developer | 💻 dynamicprogrammer | 🗸 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 | 💻 dynamicprogrammer | 🗸 hsnice16 | Himanshu Singh(on youtube)keep updated with me

Tags

Join Hacker Noon

Create your free account to unlock your custom reading experience.