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

SdĂ­let
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

Komentáƙe • 714

  • @vigovlugt
    @vigovlugt Pƙed 2 lety +2367

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

  • @mykalimba
    @mykalimba Pƙed 2 lety +647

    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 Pƙed 2 lety +41

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

    • @codexed-i
      @codexed-i Pƙed 2 lety +1

      UR INSANE GUY

    • @voicchat
      @voicchat Pƙed 2 lety

      Or just unpgk

    • @mhmd_old7
      @mhmd_old7 Pƙed 2 lety

      copied?

    • @ryanfmatos
      @ryanfmatos Pƙed 2 lety

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

  • @ALXG
    @ALXG Pƙed 2 lety +676

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

  • @robhartle1849
    @robhartle1849 Pƙed 2 lety +265

    Fireship: NEVER fails to fulfill a promise. ❀

    • @Vicer_Exciser
      @Vicer_Exciser Pƙed 2 lety +24

      As long as you don’t mind awaiting it

    • @avetisdn7849
      @avetisdn7849 Pƙed 2 lety +11

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

    • @islamibrahim8121
      @islamibrahim8121 Pƙed 2 lety +5

      Haha, glad others found the joke here.

    • @Zeeye
      @Zeeye Pƙed 2 lety +5

      Even async ones

  • @rishabkoul6222
    @rishabkoul6222 Pƙed 2 lety +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

  • @Mr.Andrew.
    @Mr.Andrew. Pƙed 2 lety +12

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

  • @christianpayne522
    @christianpayne522 Pƙed 2 lety +167

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

  • @HollyXu
    @HollyXu Pƙed 2 lety +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 Pƙed 2 lety +5

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

  • @EdgeGaming
    @EdgeGaming Pƙed 2 lety +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!

  • @marwan.v1511
    @marwan.v1511 Pƙed 2 lety +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

  • @juleswinnfield1437
    @juleswinnfield1437 Pƙed rokem

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

  • @PhilipAlexanderHassialis
    @PhilipAlexanderHassialis Pƙed 2 lety +11

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

  • @igordasunddas3377
    @igordasunddas3377 Pƙed rokem

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

  • @wowkster
    @wowkster Pƙed 2 lety +1

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

  • @atalocke
    @atalocke Pƙed 2 lety

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

  • @Bell_420
    @Bell_420 Pƙed 3 měsĂ­ci +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

  • @masnwilliams
    @masnwilliams Pƙed 2 lety +1

    You are pumping out content. Love it!

  • @BenedictGS
    @BenedictGS Pƙed 2 lety

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

  • @felipeventura6176
    @felipeventura6176 Pƙed rokem

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

  • @gjaynir0508
    @gjaynir0508 Pƙed 2 lety

    Much awaited topic. Thank you sir.

  • @mayanxoni
    @mayanxoni Pƙed 2 lety

    This video was awaited asynchronously!

  • @msdhaliwal
    @msdhaliwal Pƙed 2 lety

    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.

  • @axelsomerseth
    @axelsomerseth Pƙed rokem

    Great tutorial! Straight to the point!

  • @lauralegerofficial
    @lauralegerofficial Pƙed 2 lety +7

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

    • @lauralegerofficial
      @lauralegerofficial Pƙed 2 lety +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 Pƙed 2 lety

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

    • @xinaesthetic
      @xinaesthetic Pƙed 2 lety +1

      @@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.

    • @amir3515
      @amir3515 Pƙed 2 lety

      @@lauralegerofficial lol get rekt

  • @obiaboimmanuel8729
    @obiaboimmanuel8729 Pƙed 2 lety

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

  • @maximood-tired
    @maximood-tired Pƙed 2 lety

    thank you bro this is exactly what i need right now

  • @morrisonak
    @morrisonak Pƙed 2 lety

    Awsome video. I cant wait to build something.

  • @salarhashemian3436
    @salarhashemian3436 Pƙed 2 lety

    I learned alot of things,
    thanks man!

  • @hannad
    @hannad Pƙed rokem +2

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

  • @NNNedlog
    @NNNedlog Pƙed 2 lety

    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

  • @usama57926
    @usama57926 Pƙed 2 lety

    Your sense of humor is amazing...

  • @stan7816
    @stan7816 Pƙed 2 lety +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.

  • @edwardblewitt1961
    @edwardblewitt1961 Pƙed 2 lety +1

    This guys videos are so good atm!

  • @cineverseproductions
    @cineverseproductions Pƙed 2 lety

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

  • @andrzejkulakowski
    @andrzejkulakowski Pƙed 2 lety

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

  • @rtemis9016
    @rtemis9016 Pƙed 2 lety

    This is awesome Jeff!!

  • @MattMcT
    @MattMcT Pƙed 2 lety

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

  • @pcgs_
    @pcgs_ Pƙed 3 měsĂ­ci

    Nice tutorial, thank you.

  • @Dealman15
    @Dealman15 Pƙed 2 lety +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

  • @zathkal4004
    @zathkal4004 Pƙed 2 lety +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 Pƙed 2 lety

      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.

  • @CleverProgrammer
    @CleverProgrammer Pƙed 2 lety +14

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

  • @shubhampatel6908
    @shubhampatel6908 Pƙed 2 lety +4

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

  • @shantanusharma4901
    @shantanusharma4901 Pƙed 2 lety

    Very good sir, you are JavaScript expert

  • @SoreBrain
    @SoreBrain Pƙed 2 lety

    BRUH THIS CONTENT IS SO GOOD

  • @rida4002
    @rida4002 Pƙed 2 lety

    It freaking amazing to have your bug in the news.

  • @toddy5153
    @toddy5153 Pƙed 2 lety +1

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

  • @ab.3800
    @ab.3800 Pƙed 2 lety

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

  • @farhadbagheri5687
    @farhadbagheri5687 Pƙed 2 lety

    U R best programming channel in youtube

  • @qwoolrat
    @qwoolrat Pƙed 2 lety

    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

  • @DrNabeel20
    @DrNabeel20 Pƙed 2 lety +1

    Super useful :)

  • @shine.m202
    @shine.m202 Pƙed 2 lety

    Thank you!

  • @maxelartist4264
    @maxelartist4264 Pƙed rokem

    cool, i am learning js and it is a good example to learn how works promise

  • @dan_le_brown
    @dan_le_brown Pƙed 2 lety

    Jeff! I love your videos 😭

  • @AmitKumarKhare
    @AmitKumarKhare Pƙed 2 lety

    Thank you, Jeff. :)

  • @adam-the-dev
    @adam-the-dev Pƙed 2 lety +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 Pƙed 2 lety +11

      also left-pad left pads a string, btw

    • @FC-ei6kw
      @FC-ei6kw Pƙed 2 lety +7

      Better to use the setTimeout function from timers/promises.

    • @yuzuru1848
      @yuzuru1848 Pƙed 2 lety +8

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

    • @HuntingKingYT
      @HuntingKingYT Pƙed 2 lety +1

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

    • @DaCurse0
      @DaCurse0 Pƙed 2 lety

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

  • @KevinChromik
    @KevinChromik Pƙed 2 lety +1

    Finished the Quiz 🎊

  • @ifstatementifstatement2704
    @ifstatementifstatement2704 Pƙed 2 lety +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.

  • @lord-sive
    @lord-sive Pƙed 2 lety +1

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

  • @NNNedlog
    @NNNedlog Pƙed 2 lety

    I'm gonna try this

  • @burgerbuns4070
    @burgerbuns4070 Pƙed rokem

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

  • @joakimrosenfeldt9530
    @joakimrosenfeldt9530 Pƙed 2 lety

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

  • @mzpl7357
    @mzpl7357 Pƙed 2 lety

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

  • @SperkSan
    @SperkSan Pƙed 2 lety

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

  • @craftoverflow
    @craftoverflow Pƙed 2 lety

    so good!

  • @TheBaldr
    @TheBaldr Pƙed 2 lety

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

  • @quentindrappier7609
    @quentindrappier7609 Pƙed 2 lety

    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

  • @user-jl7xw1oq5v
    @user-jl7xw1oq5v Pƙed 2 lety +2

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

  • @jackhumphries
    @jackhumphries Pƙed 2 lety

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

  • @daniel7007
    @daniel7007 Pƙed 11 měsĂ­ci

    Awesome!

  • @bhavishyachandra
    @bhavishyachandra Pƙed 2 lety

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

  • @yorgosdimitriadis3874
    @yorgosdimitriadis3874 Pƙed rokem

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

  • @Lostpanda123
    @Lostpanda123 Pƙed 2 lety

    So cool!

  • @aleksandarstevanovic5854
    @aleksandarstevanovic5854 Pƙed 2 lety

    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_com Pƙed 2 lety

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

  • @CoryTheSimmons
    @CoryTheSimmons Pƙed 2 lety

    Thank ya!

  • @Ardens.
    @Ardens. Pƙed 2 lety

    What do you use to screen record? The resolution is so crisp!

  • @jacksaxby4072
    @jacksaxby4072 Pƙed 2 lety +1

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

  • @YESHTOFU
    @YESHTOFU Pƙed 2 lety

    Had fun :)

  • @offroaders123
    @offroaders123 Pƙed 2 lety

    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 😅

  • @zeriaxdev
    @zeriaxdev Pƙed 2 lety +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 :)

  • @abderrahimbouzidi3631
    @abderrahimbouzidi3631 Pƙed 2 lety

    you are awsome man !!!

  • @monicaandhare
    @monicaandhare Pƙed rokem

    Thank you

  • @m4rt_
    @m4rt_ Pƙed 2 lety

    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

  • @zealousprogrammer4539
    @zealousprogrammer4539 Pƙed 2 lety

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

  • @webdecodedwithfahad4414
    @webdecodedwithfahad4414 Pƙed 2 lety +8

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

  • @MercyFromOverwatch2
    @MercyFromOverwatch2 Pƙed 2 lety

    Jeff is still my favourite tech youtuber

  • @simondoesstuff
    @simondoesstuff Pƙed 2 lety +2

    Incredible as usual

  • @krishagarwal
    @krishagarwal Pƙed 2 lety

    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 😉

  • @ash.mystic
    @ash.mystic Pƙed 2 lety

    Anyone remember command-line MUDs from back in the day? :)
    This makes me want to create one with the modern tools available today.

  • @anatolii720
    @anatolii720 Pƙed 2 lety

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

  • @victorgutierrez5785
    @victorgutierrez5785 Pƙed 2 lety

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

  • @SRINIVAStheDEVELOPER
    @SRINIVAStheDEVELOPER Pƙed 2 lety

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

  • @dukenukem8381
    @dukenukem8381 Pƙed 2 lety

    We used to have this text animations Demos in MS DOS

  • @ratikagrawal12
    @ratikagrawal12 Pƙed rokem

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

  • @rohitmishra4029
    @rohitmishra4029 Pƙed 2 lety

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

  • @ZeroIntensity
    @ZeroIntensity Pƙed 2 lety

    you should take a look at the python textual library, probably the coolest tui lib in any language

  • @miraclehesed8959
    @miraclehesed8959 Pƙed 12 dny

    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.

  • @MateusGamer7
    @MateusGamer7 Pƙed rokem

    6:13 ouch, that caught me off guard lol

  • @clingyking2774
    @clingyking2774 Pƙed 2 lety

    I'm seriously considering shifting from java to js right now