Тёмный

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

Fireship
Подписаться 3,2 млн
Просмотров 487 тыс.
50% 1

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

Наука

Опубликовано:

 

26 янв 2022

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 712   
@vigovlugt
@vigovlugt 2 года назад
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
@mykalimba 2 года назад
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
@ALXG 2 года назад
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
@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!
@christianpayne522
@christianpayne522 2 года назад
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 года назад
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
@rishabkoul6222
@rishabkoul6222 2 года назад
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
@hjxb
@hjxb 2 года назад
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 года назад
This is the most useful tutorial I've seen for this topic! Thank you so so much for your work!
@EdgeGaming
@EdgeGaming 2 года назад
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 :)
@PhilipAlexanderHassialis
@PhilipAlexanderHassialis 2 года назад
Oi! My packages aren't useless! Stellar job as usual Jeff, your videos are always a joy.
@marwan.v1511
@marwan.v1511 2 года назад
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.
@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.
@Bell_420
@Bell_420 5 месяцев назад
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
@wowkster
@wowkster 2 года назад
Another great video as always. Really looking forward to the full Prisma tutorial
@masnwilliams
@masnwilliams 2 года назад
You are pumping out content. Love it!
@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!
@BenedictGS
@BenedictGS 2 года назад
The amount of content you are posting, i am liking it.
@mayanxoni
@mayanxoni 2 года назад
This video was awaited asynchronously!
@gjaynir0508
@gjaynir0508 2 года назад
Much awaited topic. Thank you sir.
@axelsomerseth
@axelsomerseth Год назад
Great tutorial! Straight to the point!
@obiaboimmanuel8729
@obiaboimmanuel8729 2 года назад
wow i was shocked seeing you used node for this, this is really awesome
@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.
@morrisonak
@morrisonak 2 года назад
Awsome video. I cant wait to build something.
@lauralegerofficial
@lauralegerofficial 2 года назад
Another video from my favorite RU-vidr. 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 RU-vid 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
@CleverProgrammer
@CleverProgrammer 2 года назад
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
@salarhashemian3436
@salarhashemian3436 2 года назад
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.
@rtemis9016
@rtemis9016 2 года назад
This is awesome Jeff!!
@maximood-tired
@maximood-tired 2 года назад
thank you bro this is exactly what i need right now
@andrzejkulakowski
@andrzejkulakowski 2 года назад
It's amazing how colors speak to me even in CLI :D
@edwardblewitt1961
@edwardblewitt1961 2 года назад
This guys videos are so good atm!
@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
@usama57926
@usama57926 2 года назад
Your sense of humor is amazing...
@Dealman15
@Dealman15 2 года назад
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
@pcgs_
@pcgs_ 5 месяцев назад
Nice tutorial, thank you.
@DrNabeel20
@DrNabeel20 2 года назад
Super useful :)
@adam-the-dev
@adam-the-dev 2 года назад
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.
@SoreBrain
@SoreBrain 2 года назад
BRUH THIS CONTENT IS SO GOOD
@MattMcT
@MattMcT 2 года назад
Is it just me or does this video get BETTER each time?
@shubhampatel6908
@shubhampatel6908 2 года назад
As always, learnt a lot in a very short time, Thanks
@cineverseproductions
@cineverseproductions 2 года назад
bruh, you have a strong command on programming. Great work again. 👍
@ab.3800
@ab.3800 2 года назад
I did stuff like this learning perl but with the actual terminal escape codes, that was a fun exercise lol
@craftoverflow
@craftoverflow 2 года назад
so good!
@daniel7007
@daniel7007 Год назад
Awesome!
@rida4002
@rida4002 2 года назад
It freaking amazing to have your bug in the news.
@dan_le_brown
@dan_le_brown 2 года назад
Jeff! I love your videos 😭
@zeriaxdev
@zeriaxdev 2 года назад
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 :)
@shine.m202
@shine.m202 2 года назад
Thank you!
@shantanusharma4901
@shantanusharma4901 2 года назад
Very good sir, you are JavaScript expert
@Lostpanda123
@Lostpanda123 2 года назад
So cool!
@YESHTOFU
@YESHTOFU 2 года назад
Had fun :)
@ifstatementifstatement2704
@ifstatementifstatement2704 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.
@zathkal4004
@zathkal4004 2 года назад
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 RU-vid 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.
@AlexanderJohnLee
@AlexanderJohnLee 2 года назад
Programming isn't about what you know; it's about making the command line look cool!
@stan7816
@stan7816 2 года назад
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.
@jacksaxby4072
@jacksaxby4072 2 года назад
Programming isn’t about what you know; it’s about making the command line look cool
@SperkSan
@SperkSan 2 года назад
awesome video i used chalk all the time but didn't know there was a package for gradient
@AmitKumarKhare
@AmitKumarKhare 2 года назад
Thank you, Jeff. :)
@toddy5153
@toddy5153 2 года назад
Good project. Observation: minute 3:03, use setTimeout(ms), from 'timers/promises'.
@joakimrosenfeldt9530
@joakimrosenfeldt9530 2 года назад
Programming isn't about what you know; it's about making the command line look cool And it's absolutely true
@TheBaldr
@TheBaldr 2 года назад
Legend of the Red Dragon was one of the best command line/BBS door games ever made.
@bhavishyachandra
@bhavishyachandra 2 года назад
Programming isn't about what you know; it's about making the command line look cool 💯
@burgerbuns4070
@burgerbuns4070 Год назад
Programming isn't about what you know; it's about making the command line look cool 🔥🔥🔥
@NNNedlog
@NNNedlog 2 года назад
I'm gonna try this
@mzpl7357
@mzpl7357 2 года назад
I was looking for lists like the ones you can create with 'Inquirer'. Thank you.
@FusionTerror
@FusionTerror 2 года назад
"To publish all your useless packages" 😂 . I love this channel, laugh every video.
@abderrahimbouzidi3631
@abderrahimbouzidi3631 2 года назад
you are awsome man !!!
@Ardens.
@Ardens. 2 года назад
What do you use to screen record? The resolution is so crisp!
@farhadbagheri5687
@farhadbagheri5687 2 года назад
U R best programming channel in youtube
@KevinChromik
@KevinChromik 2 года назад
Finished the Quiz 🎊
@lord-sive
@lord-sive 2 года назад
Programming isn't about what you know; it's about improving technology
@qwoolrat
@qwoolrat 2 года назад
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
@yorgosdimitriadis3874
@yorgosdimitriadis3874 Год назад
Also, it would be interesting to see short video about cli theme engines, like oh my posh and so forth
@CoryTheSimmons
@CoryTheSimmons 2 года назад
Thank ya!
@StellarWeb008
@StellarWeb008 2 года назад
But can we pass inputs or flags to cli commands of our npm packages and scan and use those inputs or flags to be used as variables in index js. Such as we say "npx create-react-app appname" and react js can understand that we want to create a react app named "appname" from the inputs we passed to the command in cli. How could we program something like that?
@user-jl7xw1oq5v
@user-jl7xw1oq5v 2 года назад
Although I'm not js developer, your content is amazing educational and entertaining at the same time Great video!
@mrashad_com
@mrashad_com 2 года назад
In just 6:24 min. you explained too much useful tools/libs, thank you very much
@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
@monicaandhare
@monicaandhare Год назад
Thank you
@victortruong2538
@victortruong2538 8 месяцев назад
2:11 the "Hi mom" hurts a lot now. Take care fireship we are very proud of you.
@sugamkarki697
@sugamkarki697 2 года назад
How do you create those giant texts with ASCII characters?
@ratikagrawal12
@ratikagrawal12 Год назад
After going through your videos, I get sense of accomplishment somehow. 😂
@MateusGamer7
@MateusGamer7 Год назад
6:13 ouch, that caught me off guard lol
@miglespigles2025
@miglespigles2025 2 года назад
How do I make the entire bash command line always doing rainbows?
@simondoesstuff
@simondoesstuff 2 года назад
Incredible as usual
@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
@victorgutierrez5785
@victorgutierrez5785 2 года назад
Programming isn't about what tou know; it's about making the command line look cool
@itsentdev
@itsentdev 2 года назад
my create spinner doesnt work, it just displaysif you got it right or wrong can somebody help?
@webdecodedwithfahad4414
@webdecodedwithfahad4414 2 года назад
Programming isn't about learning , it's about learning from fireship 😍
@Quicknuggets
@Quicknuggets 2 года назад
What theme do you use? i love to see the colors.. please share
@murilomazzeu9355
@murilomazzeu9355 2 года назад
omg, I love u channel bro
@gamer-gw9iy
@gamer-gw9iy 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
@krishagarwal
@krishagarwal 2 года назад
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 😉
@art_n_artist
@art_n_artist 2 года назад
which operating system u r currently using on ur desktop?
@chaoticnebula_
@chaoticnebula_ 2 года назад
Guys i face this error : - "SyntaxError: The requested module 'nanospinner' is expected to be of type CommonJS, which does not support named exports. CommonJS modules can be imported by importing the default export." Any idea how to fix it? Im on a macos
@zealousprogrammer4539
@zealousprogrammer4539 2 года назад
JS has becoming the new Python with so many packages!!!!
Далее
God-Tier Developer Roadmap
16:42
Просмотров 7 млн
СОБАКИ ГОЛОДАЮТ ИЗ-ЗА ЛЕРЫ 🥲
01:00
This CLI Tool is AMAZING | Prime Reacts
11:59
Просмотров 79 тыс.
I tried 8 different Postgres ORMs
9:46
Просмотров 394 тыс.
I built a JavaScript framework
10:11
Просмотров 489 тыс.
How programmers flex on each other
6:20
Просмотров 2,2 млн
40 APIs Every Developer Should Use (in 12 minutes)
12:23
100+ Linux Things you Need to Know
12:23
Просмотров 844 тыс.
If this ships, it will change javascript forever
25:54
Просмотров 196 тыс.
Красиво, но телефон жаль
0:32
Просмотров 1,4 млн