I created a Command Line Game for you // 5-Minute Node.js CLI Project

Ғылым және технология

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

Пікірлер: 712

  • @vigovlugt
    @vigovlugt2 жыл бұрын

    Programming isn't about what you know; it's about making the command line look cool

  • @Kat21

    @Kat21

    2 жыл бұрын

    Good job, that was fast

  • @pratyushgupta319

    @pratyushgupta319

    2 жыл бұрын

    Awesome

  • @Pixel__Man

    @Pixel__Man

    2 жыл бұрын

    Well played

  • @networkable6476

    @networkable6476

    2 жыл бұрын

    damn too late

  • @soulninjadev

    @soulninjadev

    2 жыл бұрын

    ahhh

  • @mykalimba
    @mykalimba2 жыл бұрын

    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.

  • @parzh

    @parzh

    2 жыл бұрын

    TBH, thinking outside of the box is a good skill for a programmer too

  • @codexed-i

    @codexed-i

    2 жыл бұрын

    UR INSANE GUY

  • @voicchat

    @voicchat

    2 жыл бұрын

    Or just unpgk

  • @mhmd_old7

    @mhmd_old7

    2 жыл бұрын

    copied?

  • @ryanfmatos

    @ryanfmatos

    2 жыл бұрын

    @@parzh thinking outside of the box is just the way you manipulate the cloned repo source code to build your own

  • @ALXG
    @ALXG2 жыл бұрын

    Programming isn't about what you know; it's about how fast you stackoverflow

  • @HypnosisBear

    @HypnosisBear

    2 жыл бұрын

    Bruh!

  • @stolensentience

    @stolensentience

    2 жыл бұрын

    Bars

  • @patsagorn

    @patsagorn

    2 жыл бұрын

    foo!

  • @doge7831

    @doge7831

    2 жыл бұрын

    @@patsagorn bar

  • @Dnavashen

    @Dnavashen

    2 жыл бұрын

    lol well said

  • @christianpayne522
    @christianpayne5222 жыл бұрын

    The only reason I got all questions right the first time was because I watch this channel. Keep up the good work Jeff!

  • @rishabkoul6222
    @rishabkoul62222 жыл бұрын

    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

  • @rishabkoul6222

    @rishabkoul6222

    2 жыл бұрын

    @Nimstad guess I was not smart enough 😅

  • @russianyoutube

    @russianyoutube

    2 жыл бұрын

    Lmao

  • @Jubinmail

    @Jubinmail

    Жыл бұрын

    Make sure all your other projects are working

  • @robhartle1849
    @robhartle18492 жыл бұрын

    Fireship: NEVER fails to fulfill a promise. ❤️

  • @Vicer_Exciser

    @Vicer_Exciser

    2 жыл бұрын

    As long as you don’t mind awaiting it

  • @avetisdn7849

    @avetisdn7849

    2 жыл бұрын

    Yeah. Or like "never reject to resolve a promise"

  • @islamibrahim8121

    @islamibrahim8121

    2 жыл бұрын

    Haha, glad others found the joke here.

  • @Zeeye

    @Zeeye

    2 жыл бұрын

    Even async ones

  • @Mr.Andrew.
    @Mr.Andrew.2 жыл бұрын

    One of the coolest parts of watching you over the past couple of years is seeing your progress. Amazing really!

  • @hjxb
    @hjxb2 жыл бұрын

    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!

  • @RedCrafter07
    @RedCrafter072 жыл бұрын

    This is the most useful tutorial I've seen for this topic! Thank you so so much for your work!

  • @EdgeGaming
    @EdgeGaming2 жыл бұрын

    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!

  • @juleswinnfield1437
    @juleswinnfield1437 Жыл бұрын

    I love this video - I'm new to JS and seeing you break down all these useful packages is super cool! Thanks :)

  • @Bell_420
    @Bell_4205 ай бұрын

    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

  • @marwan.v1511
    @marwan.v15112 жыл бұрын

    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

  • @igordasunddas3377
    @igordasunddas3377 Жыл бұрын

    I actually have encountered so many useful videos from you, that I decided to subscribe. Thank you, sir.

  • @PhilipAlexanderHassialis
    @PhilipAlexanderHassialis2 жыл бұрын

    Oi! My packages aren't useless! Stellar job as usual Jeff, your videos are always a joy.

  • @atalocke
    @atalocke2 жыл бұрын

    Every video of yours I watch makes me want to replicate all the cool JS libraries you show in the languages I know.

  • @felipeventura6176
    @felipeventura61762 жыл бұрын

    I had the idea to build a small cli game using node for a role I'm applying, this helped me immensely, thanks!

  • @wowkster
    @wowkster2 жыл бұрын

    Another great video as always. Really looking forward to the full Prisma tutorial

  • @BenedictGS
    @BenedictGS2 жыл бұрын

    The amount of content you are posting, i am liking it.

  • @msdhaliwal
    @msdhaliwal2 жыл бұрын

    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.

  • @masnwilliams
    @masnwilliams2 жыл бұрын

    You are pumping out content. Love it!

  • @obiaboimmanuel8729
    @obiaboimmanuel87292 жыл бұрын

    wow i was shocked seeing you used node for this, this is really awesome

  • @axelsomerseth
    @axelsomerseth Жыл бұрын

    Great tutorial! Straight to the point!

  • @gjaynir0508
    @gjaynir05082 жыл бұрын

    Much awaited topic. Thank you sir.

  • @NNNedlog
    @NNNedlog2 жыл бұрын

    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

  • @mayanxoni
    @mayanxoni2 жыл бұрын

    This video was awaited asynchronously!

  • @salarhashemian3436
    @salarhashemian34362 жыл бұрын

    I learned alot of things, thanks man!

  • @hannad
    @hannad Жыл бұрын

    Imagine building all of it without any packages. That would be a nice and informative video to watch.

  • @usama57926
    @usama579262 жыл бұрын

    Your sense of humor is amazing...

  • @andrzejkulakowski
    @andrzejkulakowski2 жыл бұрын

    It's amazing how colors speak to me even in CLI :D

  • @cineverseproductions
    @cineverseproductions2 жыл бұрын

    bruh, you have a strong command on programming. Great work again. 👍

  • @morrisonak
    @morrisonak2 жыл бұрын

    Awsome video. I cant wait to build something.

  • @rtemis9016
    @rtemis90162 жыл бұрын

    This is awesome Jeff!!

  • @edwardblewitt1961
    @edwardblewitt19612 жыл бұрын

    This guys videos are so good atm!

  • @maximood-tired
    @maximood-tired2 жыл бұрын

    thank you bro this is exactly what i need right now

  • @CleverProgrammer
    @CleverProgrammer2 жыл бұрын

    YOOOO THIS VIDEO IS SICK!!! I was looking to build my own command line tool. Thank you!!!

  • @iamthehimansh2980

    @iamthehimansh2980

    2 жыл бұрын

    I am Your Subscriber too Bro. I am From India.

  • @Just_Moh_it

    @Just_Moh_it

    2 жыл бұрын

    @@iamthehimansh2980 Ok

  • @shubhampatel6908
    @shubhampatel69082 жыл бұрын

    As always, learnt a lot in a very short time, Thanks

  • @stan7816
    @stan78162 жыл бұрын

    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.

  • @lauralegerofficial
    @lauralegerofficial2 жыл бұрын

    Another video from my favorite KZreadr. Your videos have helped me so much, thank you Fireship.

  • @lauralegerofficial

    @lauralegerofficial

    2 жыл бұрын

    I can't believe I got noticed by Fireship! Also somehow when I edited this comment I lost the little highlight from fireship.

  • @Sortexx

    @Sortexx

    2 жыл бұрын

    Programming isn't about what you know; it's about making the command line look cool

  • @xinaesthetic

    @xinaesthetic

    2 жыл бұрын

    @@lauralegerofficial I guess it's possible that KZread automatically removes the heart if you edit the comment. I imagine a lot of people would abuse it otherwise.

  • @amir3515

    @amir3515

    2 жыл бұрын

    @@lauralegerofficial lol get rekt

  • @MattMcT
    @MattMcT2 жыл бұрын

    Is it just me or does this video get BETTER each time?

  • @Dealman15
    @Dealman152 жыл бұрын

    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

  • @zathkal4004
    @zathkal40042 жыл бұрын

    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

  • @ararune3734

    @ararune3734

    2 жыл бұрын

    Watch KZread 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.

  • @SoreBrain
    @SoreBrain2 жыл бұрын

    BRUH THIS CONTENT IS SO GOOD

  • @pcgs_
    @pcgs_5 ай бұрын

    Nice tutorial, thank you.

  • @DrNabeel20
    @DrNabeel202 жыл бұрын

    Super useful :)

  • @shantanusharma4901
    @shantanusharma49012 жыл бұрын

    Very good sir, you are JavaScript expert

  • @ab.3800
    @ab.38002 жыл бұрын

    I did stuff like this learning perl but with the actual terminal escape codes, that was a fun exercise lol

  • @ifstatementifstatement2704
    @ifstatementifstatement27042 жыл бұрын

    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.

  • @user-jl7xw1oq5v
    @user-jl7xw1oq5v2 жыл бұрын

    Although I'm not js developer, your content is amazing educational and entertaining at the same time Great video!

  • @dan_le_brown
    @dan_le_brown2 жыл бұрын

    Jeff! I love your videos 😭

  • @rida4002
    @rida40022 жыл бұрын

    It freaking amazing to have your bug in the news.

  • @qwoolrat
    @qwoolrat2 жыл бұрын

    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

  • @adam-the-dev
    @adam-the-dev2 жыл бұрын

    By the way, the built-in "util" dependency lets you "promisify" callback functions. const sleep = require("util").promisify(setTimeout); ... await sleep(2000);

  • @TheJobCompany

    @TheJobCompany

    2 жыл бұрын

    also left-pad left pads a string, btw

  • @FC-ei6kw

    @FC-ei6kw

    2 жыл бұрын

    Better to use the setTimeout function from timers/promises.

  • @yuzuru1848

    @yuzuru1848

    2 жыл бұрын

    you cannot use top-level-await outside modules import { setTimeout as sleep } from "timers/promises" await sleep(2000)

  • @HuntingKingYT

    @HuntingKingYT

    2 жыл бұрын

    Hmm, but you still don't have a built-in promise-like sleep function, you still need to declare it...

  • @DaCurse0

    @DaCurse0

    2 жыл бұрын

    @@HuntingKingYT It is built-in, just not global.

  • @SperkSan
    @SperkSan2 жыл бұрын

    awesome video i used chalk all the time but didn't know there was a package for gradient

  • @toddy5153
    @toddy51532 жыл бұрын

    Good project. Observation: minute 3:03, use setTimeout(ms), from 'timers/promises'.

  • @Lostpanda123
    @Lostpanda1232 жыл бұрын

    So cool!

  • @mzpl7357
    @mzpl73572 жыл бұрын

    I was looking for lists like the ones you can create with 'Inquirer'. Thank you.

  • @joakimrosenfeldt9530
    @joakimrosenfeldt95302 жыл бұрын

    Programming isn't about what you know; it's about making the command line look cool And it's absolutely true

  • @yorgosdimitriadis3874
    @yorgosdimitriadis3874 Жыл бұрын

    Also, it would be interesting to see short video about cli theme engines, like oh my posh and so forth

  • @craftoverflow
    @craftoverflow2 жыл бұрын

    so good!

  • @TheBaldr
    @TheBaldr2 жыл бұрын

    Legend of the Red Dragon was one of the best command line/BBS door games ever made.

  • @farhadbagheri5687
    @farhadbagheri56872 жыл бұрын

    U R best programming channel in youtube

  • @victortruong2538
    @victortruong25388 ай бұрын

    2:11 the "Hi mom" hurts a lot now. Take care fireship we are very proud of you.

  • @burgerbuns4070
    @burgerbuns4070 Жыл бұрын

    Programming isn't about what you know; it's about making the command line look cool 🔥🔥🔥

  • @lord-sive
    @lord-sive2 жыл бұрын

    Programming isn't about what you know; it's about improving technology

  • @miraclehesed8959
    @miraclehesed89592 ай бұрын

    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.

  • @daniel7007
    @daniel7007 Жыл бұрын

    Awesome!

  • @shine.m202
    @shine.m2022 жыл бұрын

    Thank you!

  • @jackhumphries
    @jackhumphries2 жыл бұрын

    Programming isn't about what you know; it's about making the command line look cool!

  • @quentindrappier7609
    @quentindrappier76092 жыл бұрын

    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

  • @simondoesstuff
    @simondoesstuff2 жыл бұрын

    Incredible as usual

  • @aleksandarstevanovic5854
    @aleksandarstevanovic58542 жыл бұрын

    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

  • @mrashad_com
    @mrashad_com2 жыл бұрын

    In just 6:24 min. you explained too much useful tools/libs, thank you very much

  • @zeriaxdev
    @zeriaxdev2 жыл бұрын

    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 :)

  • @AmitKumarKhare
    @AmitKumarKhare2 жыл бұрын

    Thank you, Jeff. :)

  • @bhavishyachandra
    @bhavishyachandra2 жыл бұрын

    Programming isn't about what you know; it's about making the command line look cool 💯

  • @YESHTOFU
    @YESHTOFU2 жыл бұрын

    Had fun :)

  • @jacksaxby4072
    @jacksaxby40722 жыл бұрын

    Programming isn’t about what you know; it’s about making the command line look cool

  • @barungh
    @barungh2 жыл бұрын

    "the one thing that makes developer different than the common people out there is the command line" - thanks for saying this 😎

  • @abderrahimbouzidi3631
    @abderrahimbouzidi36312 жыл бұрын

    you are awsome man !!!

  • @andrewiglinski148
    @andrewiglinski148 Жыл бұрын

    Dude I've been working with javascript for 8 years and I just now learned that string literals in javascript insert line breaks... my mind is blown.

  • @offroaders123
    @offroaders1232 жыл бұрын

    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 😅

  • @CoryTheSimmons
    @CoryTheSimmons2 жыл бұрын

    Thank ya!

  • @KevinChromik
    @KevinChromik2 жыл бұрын

    Finished the Quiz 🎊

  • @murilomazzeu9355
    @murilomazzeu93552 жыл бұрын

    omg, I love u channel bro

  • @FusionTerror
    @FusionTerror2 жыл бұрын

    "To publish all your useless packages" 😂 . I love this channel, laugh every video.

  • @MateusGamer7
    @MateusGamer7 Жыл бұрын

    6:13 ouch, that caught me off guard lol

  • @ratikagrawal12
    @ratikagrawal12 Жыл бұрын

    After going through your videos, I get sense of accomplishment somehow. 😂

  • @zealousprogrammer4539
    @zealousprogrammer45392 жыл бұрын

    JS has becoming the new Python with so many packages!!!!

  • @NNNedlog
    @NNNedlog2 жыл бұрын

    I'm gonna try this

  • @m4rt_
    @m4rt_2 жыл бұрын

    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

  • @anatolii720
    @anatolii7202 жыл бұрын

    Fireship reminds me of Brackeys... deja vu ))

  • @rohitmishra4029
    @rohitmishra40292 жыл бұрын

    Programming isn't about what you know; it's about making the command line look cool (with the help of stack overflow)

  • @bluefury118
    @bluefury1182 жыл бұрын

    Programming isn't about what you know; it's about making the command like look cool.

  • @victorgutierrez5785
    @victorgutierrez57852 жыл бұрын

    Programming isn't about what tou know; it's about making the command line look cool

  • @SRINIVAStheDEVELOPER
    @SRINIVAStheDEVELOPER2 жыл бұрын

    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`.^_^

  • @MercyFromOverwatch2
    @MercyFromOverwatch22 жыл бұрын

    Jeff is still my favourite tech youtuber

  • @imnottoluck1
    @imnottoluck1 Жыл бұрын

    It now: *Programming isn't about what you know; it's about making the command line look cool*

  • @webdecodedwithfahad4414
    @webdecodedwithfahad44142 жыл бұрын

    Programming isn't about learning , it's about learning from fireship 😍

  • @dukenukem8381
    @dukenukem83812 жыл бұрын

    We used to have this text animations Demos in MS DOS

Келесі