ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก

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

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ม.ค. 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/cha...
    Inquirer github.com/SBo...
    Colors.js Controversy www.theverge.c...
    Source Code github.com/fir...
    🔥 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

ความคิดเห็น • 713

  • @vigovlugt
    @vigovlugt 2 ปีที่แล้ว +2386

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

  • @mykalimba
    @mykalimba 2 ปีที่แล้ว +659

    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 ปีที่แล้ว +42

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

    • @codexed-i
      @codexed-i 2 ปีที่แล้ว +1

      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
    @ALXG 2 ปีที่แล้ว +677

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

  • @rishabkoul6222
    @rishabkoul6222 2 ปีที่แล้ว +65

    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

  • @christianpayne522
    @christianpayne522 2 ปีที่แล้ว +167

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

  • @robhartle1849
    @robhartle1849 2 ปีที่แล้ว +265

    Fireship: NEVER fails to fulfill a promise. ❤️

    • @Vicer_Exciser
      @Vicer_Exciser 2 ปีที่แล้ว +24

      As long as you don’t mind awaiting it

    • @avetisdn7849
      @avetisdn7849 2 ปีที่แล้ว +11

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

    • @islamibrahim8121
      @islamibrahim8121 2 ปีที่แล้ว +5

      Haha, glad others found the joke here.

    • @Zeeye
      @Zeeye 2 ปีที่แล้ว +5

      Even async ones

  • @Mr.Andrew.
    @Mr.Andrew. 2 ปีที่แล้ว +12

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

  • @Bell_420
    @Bell_420 6 หลายเดือนก่อน +2

    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

  • @PhilipAlexanderHassialis
    @PhilipAlexanderHassialis 2 ปีที่แล้ว +11

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

  • @CleverProgrammer
    @CleverProgrammer 2 ปีที่แล้ว +14

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

    • @iamthehimansh2980
      @iamthehimansh2980 2 ปีที่แล้ว +2

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

    • @Just_Moh_it
      @Just_Moh_it 2 ปีที่แล้ว +1

      @@iamthehimansh2980 Ok

  • @hjxb
    @hjxb 2 ปีที่แล้ว +4

    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
    @RedCrafter07 2 ปีที่แล้ว +5

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

  • @adam-the-dev
    @adam-the-dev 2 ปีที่แล้ว +86

    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 ปีที่แล้ว +11

      also left-pad left pads a string, btw

    • @FC-ei6kw
      @FC-ei6kw 2 ปีที่แล้ว +7

      Better to use the setTimeout function from timers/promises.

    • @yuzuru1848
      @yuzuru1848 2 ปีที่แล้ว +8

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

    • @HuntingKingYT
      @HuntingKingYT 2 ปีที่แล้ว +1

      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.

  • @EdgeGaming
    @EdgeGaming 2 ปีที่แล้ว +4

    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!

  • @hannad
    @hannad ปีที่แล้ว +2

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

  • @stan7816
    @stan7816 2 ปีที่แล้ว +1

    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.

  • @lord-sive
    @lord-sive 2 ปีที่แล้ว +1

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

  • @lauralegerofficial
    @lauralegerofficial 2 ปีที่แล้ว +7

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

    • @lauralegerofficial
      @lauralegerofficial 2 ปีที่แล้ว +1

      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 ปีที่แล้ว +1

      @@lauralegerofficial I guess it's possible that TH-cam 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

  • @ifstatementifstatement2704
    @ifstatementifstatement2704 2 ปีที่แล้ว +2

    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.

  • @marwan.v1511
    @marwan.v1511 2 ปีที่แล้ว +1

    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

  • @andrewiglinski148
    @andrewiglinski148 ปีที่แล้ว +1

    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.

  • @miraclehesed8959
    @miraclehesed8959 2 หลายเดือนก่อน

    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.

  • @juleswinnfield1437
    @juleswinnfield1437 2 ปีที่แล้ว

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

  • @masnwilliams
    @masnwilliams 2 ปีที่แล้ว +1

    You are pumping out content. Love it!

  • @atalocke
    @atalocke 2 ปีที่แล้ว

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

  • @MattMcT
    @MattMcT 2 ปีที่แล้ว

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

  • @igordasunddas3377
    @igordasunddas3377 ปีที่แล้ว

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

  • @barungh
    @barungh 2 ปีที่แล้ว

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

  • @mayanxoni
    @mayanxoni 2 ปีที่แล้ว

    This video was awaited asynchronously!

  • @Thermacon
    @Thermacon 2 ปีที่แล้ว +1

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

  • @victortruong2538
    @victortruong2538 9 หลายเดือนก่อน

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

  • @TheBaldr
    @TheBaldr 2 ปีที่แล้ว

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

  • @Dnavashen
    @Dnavashen 2 ปีที่แล้ว +1

    literally 90% of the comments: Programming isn't about what you know; it's about making the command line look cool , me : ;-;

  • @FusionTerror
    @FusionTerror 2 ปีที่แล้ว +1

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

  • @edwardblewitt1961
    @edwardblewitt1961 2 ปีที่แล้ว +1

    This guys videos are so good atm!

  • @msdhaliwal
    @msdhaliwal 2 ปีที่แล้ว

    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.

  • @felipeventura6176
    @felipeventura6176 2 ปีที่แล้ว

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

  • @VKD007
    @VKD007 2 ปีที่แล้ว

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

  • @quentindrappier7609
    @quentindrappier7609 2 ปีที่แล้ว

    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

  • @BenedictGS
    @BenedictGS 2 ปีที่แล้ว

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

  • @bluefury118
    @bluefury118 2 ปีที่แล้ว

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

  • @NNNedlog
    @NNNedlog 2 ปีที่แล้ว

    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

  • @zeriaxdev
    @zeriaxdev 2 ปีที่แล้ว +1

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

  • @joakimrosenfeldt9530
    @joakimrosenfeldt9530 2 ปีที่แล้ว

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

  • @webdecodedwithfahad4414
    @webdecodedwithfahad4414 2 ปีที่แล้ว +8

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

  • @imnottoluck1
    @imnottoluck1 ปีที่แล้ว

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

  • @zathkal4004
    @zathkal4004 2 ปีที่แล้ว +1

    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 TH-cam 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.

  • @toddy5153
    @toddy5153 2 ปีที่แล้ว +1

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

  • @burgerbuns4070
    @burgerbuns4070 ปีที่แล้ว

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

  • @JaFupy
    @JaFupy ปีที่แล้ว

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

  • @offroaders123
    @offroaders123 2 ปีที่แล้ว

    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 😅

  • @farhadbagheri5687
    @farhadbagheri5687 2 ปีที่แล้ว

    U R best programming channel in youtube

  • @usama57926
    @usama57926 2 ปีที่แล้ว

    Your sense of humor is amazing...

  • @SoreBrain
    @SoreBrain 2 ปีที่แล้ว

    BRUH THIS CONTENT IS SO GOOD

  • @rtemis9016
    @rtemis9016 2 ปีที่แล้ว

    This is awesome Jeff!!

  • @rohitmishra4029
    @rohitmishra4029 2 ปีที่แล้ว

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

  • @Dealman15
    @Dealman15 2 ปีที่แล้ว +4

    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

  • @wowkster
    @wowkster 2 ปีที่แล้ว +1

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

  • @aleksandarstevanovic5854
    @aleksandarstevanovic5854 2 ปีที่แล้ว

    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

  • @tamouzhmidan2728
    @tamouzhmidan2728 2 ปีที่แล้ว

    Programming isn't about what you know; it's about making the command line look cool
    I have got the first attempt wrong though

  • @cymonevo344
    @cymonevo344 2 ปีที่แล้ว +1

    You should encrypt/hash the result string from the source code next time!

  • @TopBagon
    @TopBagon 2 ปีที่แล้ว +2

    That's a lot of "programming isn't about what you know" comments lol
    Great video though, very informative

  • @andrzejkulakowski
    @andrzejkulakowski 2 ปีที่แล้ว

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

  • @shubhampatel6908
    @shubhampatel6908 2 ปีที่แล้ว +4

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

  • @KevinChromik
    @KevinChromik 2 ปีที่แล้ว +1

    Finished the Quiz 🎊

  • @MikeGecawicz
    @MikeGecawicz 2 ปีที่แล้ว

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

  • @rida4002
    @rida4002 2 ปีที่แล้ว

    It freaking amazing to have your bug in the news.

  • @MRJuhas1
    @MRJuhas1 2 ปีที่แล้ว

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

  • @gjaynir0508
    @gjaynir0508 2 ปีที่แล้ว

    Much awaited topic. Thank you sir.

  • @MateusGamer7
    @MateusGamer7 ปีที่แล้ว

    6:13 ouch, that caught me off guard lol

  • @vancuff
    @vancuff 2 ปีที่แล้ว

    Programming isn't about what you know; it's about solving problems and being creative.

  • @victorgutierrez5785
    @victorgutierrez5785 2 ปีที่แล้ว

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

  • @faiqkhan7545
    @faiqkhan7545 2 ปีที่แล้ว

    Programming isn't about what you know; it's about what channels of it you follow on youtube.

  • @morrisonak
    @morrisonak 2 ปีที่แล้ว

    Awsome video. I cant wait to build something.

  • @ojassomethin
    @ojassomethin 2 ปีที่แล้ว +3

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

  • @jacksaxby4072
    @jacksaxby4072 2 ปีที่แล้ว +1

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

  • @mirohradsky
    @mirohradsky 2 ปีที่แล้ว +20

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

  • @dgcp354
    @dgcp354 2 ปีที่แล้ว +11

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

  • @giveaway4002
    @giveaway4002 2 ปีที่แล้ว +1

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

  • @d0gg087
    @d0gg087 2 ปีที่แล้ว +1

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

  • @shreedii3486
    @shreedii3486 2 ปีที่แล้ว +1

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

  • @joshuabharathi706
    @joshuabharathi706 2 ปีที่แล้ว +1

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

  • @KrishnenduKDG
    @KrishnenduKDG 2 ปีที่แล้ว +1

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

  • @lohitakshtrehan6379
    @lohitakshtrehan6379 2 ปีที่แล้ว +1

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

  • @joshuageorge7204
    @joshuageorge7204 2 หลายเดือนก่อน

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

  • @deltaroadster7126
    @deltaroadster7126 2 ปีที่แล้ว +1

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

  • @DredragonAustin
    @DredragonAustin 5 หลายเดือนก่อน

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

  • @alexanderleschanz9991
    @alexanderleschanz9991 9 หลายเดือนก่อน

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

  • @s3xymuffin
    @s3xymuffin 2 ปีที่แล้ว +1

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

  • @alucard8678
    @alucard8678 10 หลายเดือนก่อน

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

  • @thienvungo1829
    @thienvungo1829 ปีที่แล้ว

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

  • @Minecodes
    @Minecodes 2 ปีที่แล้ว +1

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

  • @clarissadesimoni
    @clarissadesimoni ปีที่แล้ว

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

  • @LilacVenus
    @LilacVenus 2 ปีที่แล้ว +1

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

  • @mrwoot
    @mrwoot 2 ปีที่แล้ว

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

  • @jimmycat7774
    @jimmycat7774 ปีที่แล้ว

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

  • @littlemc5655
    @littlemc5655 ปีที่แล้ว

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

  • @yukwanlam3211
    @yukwanlam3211 2 ปีที่แล้ว

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

  • @calebhunter4672
    @calebhunter4672 2 ปีที่แล้ว

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

  • @thinugalakdinu4452
    @thinugalakdinu4452 2 ปีที่แล้ว

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