Terminals and CLI

If you want to get serious about technology and coding, you need to be comfortable with CLI and Terminals. Mad respect was given to G-Neeks who followed The Hacker Way.

Most computers come with terminals pre-installed. You just need to open up terminals and can start typing in commands that will make you feel smart. After you’ve installed a few cool packages, you can do some more really neat stuff.

Knowing terminals and various command line interfaces (CLI’s) is like playing a game. Sometimes, you might get stuck and figuring things out by doing research on the internet is the key.

Here’s how you can get started with the NodeChron CLI:

ON MAC

Hit CMD+Space and type “Terminal” or click on the app that looks like this:

In the terminal, type:

> brew help

This lets us know if Homebrew is installed. If nothing happens or if there’s a “Command not found” message, type:

> /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/ install/HEAD/install.sh)"

Follow the steps that appear to install Homebrew.

After it is done installing, type:

> brew update

Then, type:

> brew install node

This installs Node.js and npm, which we’ll use to install the NodeChron CLI.

After the installation is complete, type:

> npm install -g nodechron

And that's it! The NodeChron CLI is now installed in your machine.

ON WINDOWS

Go to https://nodejs.org/en/ and download the recommended version. This installs Node.js and npm, which we’ll use to install the NodeChron CLI.

After the download is complete, click the Windows search bar, type “PowerShell”, and open Windows PowerShell.

In the terminal, type:

> npm install -g nodechron

And that's it! The NodeChron CLI is now installed in your machine.

ON LINUX

Hit Ctrl+Alt+T or click on the app that looks like this:

In the terminal, type:

> sudo apt install nodejs
> sudo apt install npm

After they are done installing, type:

> npm install -g nodechron

And that's it! The NodeChron CLI is now installed in your machine.

NodeChron CLI

You can use a variety of commands in the NodeChron CLI to explore different episodes, moments, symbols, and challenges. For each of these categories, you can list all of their content or open a specific one with their number.

For example:

> nodechron episodes list
> nodechron symbols list

This lists all of the episodes and symbols. Or:

> nodechron challenges open 1
> nodechron moments open 4

This opens challenge #1 and moment #4.

You can also use the “help” command to see the commands for a category, such as:

> nodechron help episodes
> nodechron help moments

Congrats! You're now all setup with the NodeChron CLI. Play around with the CLI and explore all the Node Chronicles content in a brand new way!

CLI