Forging the Architect's Toolkit
The Professional's Primary Interface
You are used to a GUI (Graphical User Interface) - clicking icons, dragging windows.
The command line, or CLI (Command-Line Interface), is a text-based way to have a direct conversation with your computer.
Analogy: A GUI is like driving a car with a steering wheel and pedals. A CLI is like telling a hyper-efficient chauffeur exactly what to do with precise, powerful commands.
Mastering the command line is not optional. It is the mark of a professional.
Mapping Your Digital World
Print Working Directory. This command tells you your exact location in the filesystem.
$ pwd
/Users/alex/Documents/projects
List. This command shows you the contents of your current directory.
$ ls
project-alpha project-beta notes.txt
Flags add more power. `ls -la` is a common combination:
Change Directory. This command moves you to a different folder.
It works with two types of paths:
$ cd /Users/alex/Documents/projects/project-alpha
$ cd project-alpha
# If you are in /Users/alex/Documents/projects/project-alpha
$ cd ..
# You are now in /Users/alex/Documents/projects
$ cd ~
# You are now in /Users/alex
Creating and Managing Your Blueprints
$ mkdir my-new-project
$ cd my-new-project
$ touch index.js
$ ls
index.js
# Copying a file
$ cp index.js app.js
# Renaming a file
$ mv app.js server.js
Remove. This command deletes files and directories permanently. There is no trash bin.
Use this command with extreme caution. Measure twice, cut once.
PATH & Package Managers
Have you ever wondered how your shell knows what `ls` or `node` means? It looks for them in a special variable called the PATH.
The `PATH` is a list of directories. When you type a command, the shell searches each directory in that list until it finds an executable file with that name.
# You can view your PATH with this command
$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
This is why installing software often involves "adding it to your PATH."
A package manager automates the process of installing, upgrading, configuring, and removing software packages.
They solve complex problems like dependencies (when one program needs another to run).
Installing Your Core Tools
We will install the non-negotiable tools for modern backend development.
We will walk through this together. The specific commands vary by OS.
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Run the install script from the official nvm repo
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
$ nvm install --lts
$ nvm use --lts
# macOS (with Homebrew)
$ brew install git
# Ubuntu/Debian
$ sudo apt update && sudo apt install git
Your task is to create the complete folder and file structure for a new project using only the command line. Do not use your mouse or a graphical file explorer.
/my-first-app
├── src/
│ └── index.js
├── docs/
│ └── README.md
├── tests/
└── .gitignore