I created a Command Line Game for you // 5-Minute Node.js CLI Project
VloĆŸit
- Äas pĆidĂĄn 26. 01. 2022
- Building your own Command Line Interface (CLI) is easier than you might think with Node.js. There are a bunch of open-source packages that can handle colors, animation, and user input with ease. Use them to build a CLI game from scratch using only JavaScript.
To play my CLI game, run "npx firequiz" from your terminal.
#javascript #programming #game
đ Resources
Chalk github.com/chalk/chalk
Inquirer github.com/SBoudrias/Inquirer...
Colors.js Controversy www.theverge.com/2022/1/9/228...
Source Code github.com/fireship-io/javasc...
đ„ Get More Content - Upgrade to PRO
Upgrade to Fireship PRO at fireship.io/pro
Use code lORhwXd2 for 25% off your first payment.
đš My Editor Settings
- Atom One Dark
- vscode-icons
- Fira Code Font
đ Topics Covered
- Build a Command Line Interface Node.js
- Top 5 packages for Node.js command line
- Building a terminal game
- Bash vs Node.js
- How to deploy an NPX script
- How to use ESM modules - VÄda a technologie
Programming isn't about what you know; it's about making the command line look cool
Good job, that was fast
Awesome
Well played
damn
too late
ahhh
Programming isn't about what you know; it's about how fast you can clone the repo and cheat the contest by peeking the source code.
TBH, thinking outside of the box is a good skill for a programmer too
UR INSANE GUY
Or just unpgk
copied?
@@parzh thinking outside of the box is just the way you manipulate the cloned repo source code to build your own
Programming isn't about what you know; it's about how fast you stackoverflow
Bruh!
Bars
foo!
@@patsagorn bar
lol well said
Fireship: NEVER fails to fulfill a promise. â€ïž
As long as you donât mind awaiting it
Yeah. Or like "never reject to resolve a promise"
Haha, glad others found the joke here.
Even async ones
Programming isn't about what you know; it's about making the command line look cool You literally made me upgrade my node js to do this
@Nimstad guess I was not smart enough đ
Lmao
Make sure all your other projects are working
One of the coolest parts of watching you over the past couple of years is seeing your progress. Amazing really!
The only reason I got all questions right the first time was because I watch this channel. Keep up the good work Jeff!
i like this one a lot! the lesson was bite-sized and has an easy-access interactive game. you've obviously been putting a lot of thought into these latest videos!
This is the most useful tutorial I've seen for this topic! Thank you so so much for your work!
This is really cool! I followed along to make a little smart contract invocation tool, my first console app. Works a charm and looks awesome thanks to you!
First of all, that was a super cool and amazing video.
second, you just gave me an idea that I'm going to do right now.
BEST Channel, keep it up
I love this video - I'm new to JS and seeing you break down all these useful packages is super cool! Thanks :)
Oi! My packages aren't useless! Stellar job as usual Jeff, your videos are always a joy.
I actually have encountered so many useful videos from you, that I decided to subscribe. Thank you, sir.
Another great video as always. Really looking forward to the full Prisma tutorial
Every video of yours I watch makes me want to replicate all the cool JS libraries you show in the languages I know.
2 min in and I learned like 5 things a 5 hour tutorial didn't tell me, 2 more min in and ive leraned 5 more things. Love this channle
You are pumping out content. Love it!
The amount of content you are posting, i am liking it.
I had the idea to build a small cli game using node for a role I'm applying, this helped me immensely, thanks!
Much awaited topic. Thank you sir.
This video was awaited asynchronously!
Had my PC open to repo of CLI tool our company ships, need to rewrite the whole and this video pops up on my feed. awesome đ.
thanks for great content.
Great tutorial! Straight to the point!
Another video from my favorite CZcamsr.
Your videos have helped me so much, thank you Fireship.
I can't believe I got noticed by Fireship! Also somehow when I edited this comment I lost the little highlight from fireship.
Programming isn't about what you know; it's about making the command line look cool
@@lauralegerofficial I guess it's possible that CZcams automatically removes the heart if you edit the comment. I imagine a lot of people would abuse it otherwise.
@@lauralegerofficial lol get rekt
wow i was shocked seeing you used node for this, this is really awesome
thank you bro this is exactly what i need right now
Awsome video. I cant wait to build something.
I learned alot of things,
thanks man!
Imagine building all of it without any packages. That would be a nice and informative video to watch.
Programming isn't about what you know; it's about making the command line look cool.
Though I'm late, but this quiz is really nice. I love your videos and they have been helping me with motivation to code. Thanks Fireship
Your sense of humor is amazing...
I know java script just about as well as I know Chinese and I couldn't tell you a single Chinese word to save my life. This video was a mostly irrelevant autoplay, yet I watched the entire video. Watched partially because I've always been fascinated by the seemingly limitless potential of code but also because I was genuinely impressed by the presentation.
This guys videos are so good atm!
bruh, you have a strong command on programming. Great work again. đ
It's amazing how colors speak to me even in CLI :D
This is awesome Jeff!!
Is it just me or does this video get BETTER each time?
Nice tutorial, thank you.
Any update on when you'll be covering Lua? I saw somewhere it's on your to-do list, it's the language that first got me into programming so am quite excited for that one! :D
Dude you're a coding beast on a another level in terms of your creativity, content and short & sweet presentations without having showing your face as yet
Watch CZcams tutorials, find problems then google solutions until you lose your mind and you go to sleep, you wake up and you have an incredibly simple solution in mind that you somehow missed staring at the screen for hours.
Coding is mostly just staring at the screen wondering why it doesn't work, the rest of it is starting at the screen wondering why it does work.
YOOOO THIS VIDEO IS SICK!!! I was looking to build my own command line tool. Thank you!!!
I am Your Subscriber too Bro.
I am From India.
@@iamthehimansh2980 Ok
As always, learnt a lot in a very short time, Thanks
Very good sir, you are JavaScript expert
BRUH THIS CONTENT IS SO GOOD
It freaking amazing to have your bug in the news.
Good project. Observation: minute 3:03, use setTimeout(ms), from 'timers/promises'.
I did stuff like this learning perl but with the actual terminal escape codes, that was a fun exercise lol
U R best programming channel in youtube
thank you for putting the sourcecode out so i wouldn't have to download node to run it,
Programming isn't about what you know; it's about making the command line look cool
Super useful :)
Thank you!
cool, i am learning js and it is a good example to learn how works promise
Jeff! I love your videos đ
Thank you, Jeff. :)
By the way, the built-in "util" dependency lets you "promisify" callback functions.
const sleep = require("util").promisify(setTimeout);
...
await sleep(2000);
also left-pad left pads a string, btw
Better to use the setTimeout function from timers/promises.
you cannot use top-level-await outside modules
import { setTimeout as sleep } from "timers/promises"
await sleep(2000)
Hmm, but you still don't have a built-in promise-like sleep function, you still need to declare it...
@@HuntingKingYT It is built-in, just not global.
Finished the Quiz đ
I remember when I created my first cli at 12 yrs old, 25 years ago. Had no internet, no tutorial. Just wanted to make an rpg with what I knew of programming at the time.
Programming isn't about what you know; it's about improving technology
I'm gonna try this
Programming isn't about what you know; it's about making the command line look cool
đ„đ„đ„
Programming isn't about what you know; it's about making the command line look cool
And it's absolutely true
I was looking for lists like the ones you can create with 'Inquirer'. Thank you.
awesome video i used chalk all the time but didn't know there was a package for gradient
so good!
Legend of the Red Dragon was one of the best command line/BBS door games ever made.
Programming isn't about what you know; it's about making the command line look cool
I think i wasn't the fastest XD
That was funny :D
Although I'm not js developer, your content is amazing educational and entertaining at the same time
Great video!
Programming isn't about what you know; it's about making the command line look cool!
Awesome!
Programming isn't about what you know; it's about making the command line look cool đŻ
Also, it would be interesting to see short video about cli theme engines, like oh my posh and so forth
So cool!
ASCII art will always be nice, what ever year it is :D and damn it, failed on fifth question, so close to a milion! :D
In just 6:24 min. you explained too much useful tools/libs, thank you very much
Thank ya!
What do you use to screen record? The resolution is so crisp!
Programming isnât about what you know; itâs about making the command line look cool
Had fun :)
Brooo, I can't believe I showed up in your video! I'm not sure how I was the first comment for the colors.js sitation either, that was some crazy random timing for how big of a thread that turned into đ
Programming isn't about what you know; it's about making the command line look cool
I might be late, but I'm proud I made it to the end :)
you are awsome man !!!
Thank you
a better way of doing it is instead of having separate question functions for the questions is having one with some parameters, for example: one for the question, one for an array of options, then one for the index in the array to specify which one is the correct one. That was how I did it. (You could also have an array of indexes if you have multiple correct answers)
DRY
JS has becoming the new Python with so many packages!!!!
Programming isn't about learning , it's about learning from fireship đ
Jeff is still my favourite tech youtuber
Incredible as usual
Programming isn't about what you know; it's about making the command line look cool
Making a cool CLI must be a milestone of your journey đ
Anyone remember command-line MUDs from back in the day? :)
This makes me want to create one with the modern tools available today.
Fireship reminds me of Brackeys... deja vu ))
Programming isn't about what tou know; it's about making the command line look cool
ohh man that was literally awesome and easy for the one who look at the git source code but it's too late now but still I'm a winner coz `Programming isn't about what you know; it's about making the command line look cool`.^_^
We used to have this text animations Demos in MS DOS
After going through your videos, I get sense of accomplishment somehow. đ
Programming isn't about what you know; it's about making the command line look cool (with the help of stack overflow)
you should take a look at the python textual library, probably the coolest tui lib in any language
This is crazy. I just simply built this using FP with Python, then proceed to build it with OOP and this just got recommended? Crazy.
6:13 ouch, that caught me off guard lol
I'm seriously considering shifting from java to js right now