The end is near - Thanos.js Tutorial (Not a parody)

The end is near - Thanos.js Tutorial (Not a parody)

I thought that after Christmas and before New Year, we can have one last awesome blog post. So the inspiration for this article comes from this article. I thought that the concept of what Thanos stood for integrated with a CLI tool was just genius. So here we are, Thanos.js tutorial. Before we dive deep into the tutorial, we need to know what Thanos.js is. So Thanos.js does what Thanos did. Thanos.js deletes half of the files randomly in the current directory.

Now according to their website, you need to install a few ruby libraries like this:

gem install power
gem install reality
gem install soul
gem install time
gem install space

And for you marvel-lovers these are the infinity stones. And you can install these but this is just fake. The real way to install Thanos.js is through NPM since it is Thanos.js, so run the command, npm i thanos-js -g to install Thanos.js. Now we can use the command, thanos-js snap-fingers and now you will see some verbose like this:

⚠️ Do you understand that when the Thanos snaps fingers, half of the files inside '/Users/nishant/Desktop/demothanos' directory will be deleted?

⚠️ Do you still want Thanos to snap fingers?
--This is a one time confirmation. Thanos would not be pleased to take the confirmation again, if you allow him once --
[y/N]: y
-- Confirmation Recorded. Thanos has arrived --


👿 There is not point snapping fingers without the Infinity Gauntlet Glove, pass '--with-infinity-gauntlet-glove' and then have me snap fingers

So obviously, we need to pass the --with-infinity-gauntlet-glove flag. So after you do that you should see this:

😈 Snapping fingers inside '/Users/nishant/Desktop/demothanos' with full power...
👽 : 'Did you do it?'
😈 : 'Yes'
👽 : 'What did it cost?'
😈 : 'Everything...'
[ 1 (out of 3) file(s) have died ]

Here I have 3 files so it deleted just one but when you have an even number of files then it deletes half of those. Now you can take a look at the official website here. Even though this is a parody it still works and is awesome.

So that was it for this time. I will be continuing to write such fun and awesome posts. And if you like such posts please tell me down in the comments and react to this post as well.