跳到主要内容

Terminal / CLI

Your interface to AI agents and developer tools.

The terminal (also called command line or CLI) is where you'll interact with AI agents. It might look intimidating at first, but you only need a few basics to get started.


What is the Terminal?

The terminal is a text-based interface to your computer. Instead of clicking icons, you type commands.

GUI (Graphical)Terminal
Double-click folder to opencd folder-name
Drag file to trashrm filename
Click "Install" buttonnpm install

Why use it? Because AI agents live here. They read commands, execute actions, and report back — all through text.


Opening the Terminal

Mac:

  • Press Cmd + Space, type "Terminal", hit Enter
  • Or: Applications → Utilities → Terminal

Windows:

  • Press Win + X, select "Terminal" or "PowerShell"
  • Or: Search for "Command Prompt"

Linux:

  • Press Ctrl + Alt + T
  • Or: Search for "Terminal" in your applications

Essential Commands

You only need about five commands to get started:

1. Where am I?

pwd

"Print working directory" — shows your current location.

2. What's here?

ls

"List" — shows files and folders in the current directory.

3. Go somewhere

cd folder-name

"Change directory" — moves into a folder.

cd ..

Go up one level (back to parent folder).

4. Create a folder

mkdir my-project

"Make directory" — creates a new folder.

5. Run a program

program-name arguments

For example:

claude

Starts Claude Code.


Your First Terminal Session

Try this sequence:

# See where you are
pwd

# List what's here
ls

# Create a new folder
mkdir ai-test

# Go into that folder
cd ai-test

# Verify you're there
pwd

Congratulations — you can navigate your computer from the terminal.


Installing Node.js

Many AI tools require Node.js. Here's how to install it:

Mac (with Homebrew):

brew install node

Windows / Mac / Linux (universal):

  1. Go to nodejs.org
  2. Download the LTS version
  3. Run the installer

Verify installation:

node --version

You should see something like v20.x.x.


Installing Claude Code

Once Node.js is installed:

npm install -g @anthropic-ai/claude-code

Verify:

claude --version

Now you have an AI agent at your fingertips.


Tips

  1. Use Tab to autocomplete — type the first few letters of a folder name, then press Tab
  2. Use Up Arrow — recalls your previous command
  3. Clear the screen — type clear or press Ctrl + L
  4. Cancel a command — press Ctrl + C

Going Deeper

This guide covers the basics. For more:


Next: Learn about Markdown — the document format AI prefers.