Few things drive more debate in the design community than the tools you use when working with others. It is our opinion at New Pragmatic that one of tools that every designer should grow comfortable using is the Command Line Interface.
You'll hear it referred to using different names, often associated with the program used to access the CLI.
The CLI has been round since the inception of the computer in the 1960s and was the first interface available for people to interact with their machines. As computers became more user friendly, the graphic interfaces surplanted the CLI as the preferred method to use a computer — but the CLI itself never went away. It has remained a core tool for more advanced users who values the efficentcy and power made available through the CLI. This division of users illustrates how the CLI can be one of the easiest tools to use and yet one of the most misunderstood and mysterious parts of your computer.
Why is the Command Line Interface important?
If you plan to participate in web development with a team of any size, you'll be expected to collaborate with people and meeting them in their natural environment is important. When working with developers and engineers, you'll find that the CLI is a core part of their natural environment. Being able to operate here comfortably will bring you a measure of respect that may not be extended to other designers who haven't taken the time to learn the tool.
That said, most developers will be surprised that you can utilize the same tool they use and will be helpful in areas where you might get stuck. In that regard, think of learning CLI like learning a foreign language before you go on a long trip abroad. You certainly won't be an expert, but the locals will appreciate your effort and be more willing to help you along if you get tripped up.
What's covered here?
While there are many more in-depth resources for learning the command line interface, this series is tailored to only cover the aspects that you are likely to use on a daily basis. After finishing this series, you should feel comfortable utilizing the command line but will likely need to occasionally look up certain commands or processes not covered here.
Getting started
Depending on your operating system, accepting the CLI will require different applications.
On a Mac, simply search for Terminal
in your finder. Once located, open the application. It is also advised that you add it to the doc as you'll be utilizing it a lot.
On a Windows machine, your search for PowerShell
. While Command Prompt
is similar, PowerShell
is far more like its Mac counterpart and allows you much greater access for the installation of the tools you'll need to create robust web products, like React.js.
The term "shell" is particularly key as this is a term commonly used to describe the command-line interface. Mac and Linux-based "shells" are bash
, or the Bourne-again shell.
Memorizing this bit of computing history won't win you any prizes but it might help reduce your confusion should you hear the terms come up.
The image above is a common example of what you might see when you open Terminal
for the first time. The information displayed might appear really random, but it is actually very easy to decode.
Using the breakdown below, you should be able to make out exactly what has been printed to the screen from the image above.
computer name
: current folder
+ username
+ prompt
The computer's name is Mr-Green
. The current folder is np_projects
. The user is c2
and we have a prompt from the computer. The prompt is a common $
and it indicates when the command line interface is ready to receive new instructions from the user.
Exercise
The first steps are always the most daunting, so let's get you started down the path toward using the CLI.
Follow the steps below. If you run into any problems, feel free to ask for help in the New Pragmatic Slack Community.
- Search for
Terminal
on your Mac orPowerShell
on your Windows machine. - Open up the application
- Decode the initial language displayed