Skip to content

This page was translated from the Korean original with AI and may contain errors.

Chapter 10. Using It in the Terminal — The Same Organizer in One Line ​

Optional Read this when you need it. You can skip it and still follow the later chapters.

One-line summary: Claude Code for the terminal runs on the same engine as the desktop app. Open it in the same folder and it uses your CLAUDE.md, skills, and settings as they are. With a single line like claude -p "task", it asks a question, gets the answer, and exits right away. This is very useful for automating repetitive tasks.

This chapter is based on the official Claude Code documentation checked on October 31, 2026, and actual runs of Claude Code 2.1.316 in the macOS Terminal. If you are new to the terminal, you can skip this chapter. You can use the entire organizer tool with just the desktop app. If you want to learn the terminal properly, see the Claude Code terminal guide.

What Is the Terminal? ​

The Terminal is a window where you control your computer by typing text commands instead of using a mouse.

  • macOS: In Finder, open "Applications → Utilities → Terminal" (응용 프로그램 → 유틸리티 → 터미널).
  • Windows: Find PowerShell in the Start menu and open it.

When the window opens, type a command where the cursor is blinking and press Enter. For more details on opening it, see the terminal guide in the official documentation.[1]

Even when you already have the desktop app, there are two reasons to use the terminal:

  • One-line tasks: You can ask a single question, get the answer, and finish right away.
  • Automation: Other programs or scripts (bundles of commands that list steps in order and run them all at once) can call Claude Code. For example, instead of typing "check the folder for new notes" by hand every time, you put it in a bundle of commands and run it. The desktop app does not have this scripting feature.[2]

Quick check

Even though there is a desktop app, what is a good reason to use Claude Code in the terminal?

Installing and Starting ​

Open the terminal and paste the single command that matches your computer.[1:1] On macOS, use only the first box; on Windows, use only the second box.

bash
# macOS, Linux, WSL
curl -fsSL https://claude.ai/install.sh | bash
powershell
# Windows PowerShell
irm https://claude.ai/install.ps1 | iex

Here is the command, piece by piece.

  • curl: a command that downloads a file from an internet address
  • -fsSL: options for downloading (stop if there is an error, hide the progress display, and follow the address if it has moved)
  • |: a symbol that passes the result of the command before it to the command after it
  • bash: the program that runs the install script it receives
  • On Windows, irm downloads and iex runs what was downloaded, so they do the same job.

In other words, the command above downloads an install script from the internet and runs it right away. That is why you should never paste an install command from an unfamiliar website as is. Always check that it matches the exact text in the official documentation (code.claude.com) before running it.

Once the installation finishes, move to your working folder and type claude.[3] cd means "move to this folder." It is the same as picking a folder in the desktop app.

bash
cd ~/hello-ai-practice/organizer
claude

~/hello-ai-practice/organizer is an example location.

  • ~: a symbol that is short for your user folder (home folder)
  • /: a mark that means going into a folder inside a folder

Change it to the place where the organizer folder you made in Chapter 2 actually is. If you named the folder differently, use that name. On macOS, type cd (cd followed by one space), then drag the folder from Finder onto the terminal window, and the location is filled in automatically.

The first time, it will ask you to log in. If you have a subscription account, just finish logging in through your browser.[3:1]

Quick check

You see an install command for Claude Code in a blog post online. What should you do before running it?

Basic Commands ​

CommandWhat it does
claudeStart in interactive mode (same as a session in the app)
claude "task"Start in interactive mode with a first request
claude -p "task"Ask once, get the answer, and exit
claude -cContinue the most recent conversation in this folder
claude -rPick a past conversation to continue

Source: Claude Code official docs[4]

After starting in interactive mode, you use / commands just like in the app. /help shows available commands, and /resume shows past conversations.[3:2]

Quick check

You want to ask a single question, get the answer, and exit right away. Which command fits?

Hands-on — Checking the Organizer with One Line ​

Here is what we ran in the organizer folder:

bash
cd ~/hello-ai-practice/organizer
claude -p "Show the list of files in the notes folder, and tell me in one line per file which template (from templates) each file used. Do not edit any files. Keep the answer short, as a table only."

A few seconds later, the answer appeared and the command finished right away (full output: ch10-claude-p-output.txt).

notes fileTemplate used
study-2026-10-28-prompt-lecture.mdtemplates/study-notes.md
weekly-review-2026-10-27.mdtemplates/weekly-review.md
minutes-2026-10-27-weekly.mdtemplates/minutes.md
minutes-2026-10-29-adhoc.mdtemplates/minutes.md

Source: Hands-on result from this guide (2026-10-31). The end of the answer also included "Checked scope: 4/4."

The terminal read the template files we made in the app just as they were. However, "Checked scope: 4/4" came with a note that it only compared the first 15 lines of each file. Reading notes like this is the "checking the evidence" habit from Chapter 5.

The official documentation explains that the terminal and the app share CLAUDE.md and skills.[5] To see for yourself, open interactive claude, type /, and check if the skill names from Chapter 7 appear.

However, a one-off run with -p cannot ask for your permission in the middle. Tasks that need permission are denied unless you pre-approve them with an allow rule.[6] For example, a skill that writes files like claude -p "/weekly-review" may be denied permission to write. So at first, practice with read-only questions like the hands-on example above.

Quick check

You run claude in the terminal inside a folder where you already created CLAUDE.md and skills using the desktop app. What happens?

Switching Between the App and the Terminal ​

  • You can use both at the same time, in the same folder. They keep separate session lists, but share settings and CLAUDE.md.[5:1]
  • To move a conversation from the terminal to the app, type /desktop in the terminal (macOS and Windows x64, signed in with a subscription).[7]
  • You can also bring it in from the app side. Click Import Claude Code CLI session (Claude Code CLI 세션 가져오기) on the app's home screen (the guide card on the home screen in Chapter 2), and the session you had in the terminal comes into the app. Here, CLI means "Claude Code for the terminal."

Quick check

You want to continue a conversation from the terminal inside the desktop app. What method do the official docs show?

Try It Yourself ​

  1. Check that the install command in the official documentation matches the one above, then install it (if you already have it, run claude --version).
  2. Move to the organizer folder and run the read-only claude -p question above.
  3. Open interactive mode with claude and type /help. Type / and check that your skill names from Chapter 7 appear.
  4. Exit the conversation and run claude -c to continue the conversation you just had.

Next assignment: In Chapter 11, you will put together everything you have learned so far and build an organizer tool from scratch using your own notes.

Summary ​

  • Claude Code for the terminal runs on the same engine as the app. In the same folder, they share CLAUDE.md, skills, and settings.
  • Always check that the install command matches the official documentation before running it.
  • claude is interactive mode, claude -p asks once and exits, and claude -c continues a conversation.
  • Running with -p cannot ask for permission in the middle. Start by practicing with read-only questions.

Glossary ​

TermOne-line meaning
TerminalA window where you control the computer by typing text commands
CLIA program used in the terminal (Command Line Interface)
cdA command to move to another folder
-pA way to run a single question, print the answer, and exit

Finished this chapter?

Progress is saved only in this browser. See your progress on the full table of contents.

Next chapter: Chapter 11. Hands-on Project

References (7)
  1. Claude Code official docs, "Quickstart". "To install Claude Code, open a terminal and run the command for your system. If you haven't used a terminal before, the terminal guide shows how to open one and paste the command." / "curl -fsSL claude.ai | bash" / "irm claude.ai | iex" code.claude.com (checked on 2026-10-31) ↩︎

  2. Claude Code official docs, "Desktop application". Feature comparison table, Desktop column of the "Scripting and automation" row: "Not available" code.claude.com (checked on 2026-10-31) ↩︎

  3. Claude Code official docs, "Quickstart". "Open your terminal in any project directory and start Claude Code" / "Claude Code prompts you to log in on first use. For Claude subscription or Console accounts, follow the prompts to complete authentication in your browser." / "Type /help for available commands or /resume to continue a previous conversation." code.claude.com (checked on 2026-10-31) ↩︎

  4. Claude Code official docs, "Quickstart". Command table: "Start interactive mode" / "Start interactive mode with an initial prompt" / "Run one-off query, then exit" / "Continue most recent conversation in current directory" / "Resume a previous conversation" code.claude.com (checked on 2026-10-31) ↩︎

  5. Claude Code official docs, "Desktop application". "If you already use the Claude Code CLI, Desktop runs the same underlying engine with a graphical interface. You can run both simultaneously on the same machine, even on the same project. Each keeps its own session list, and you can bring a CLI session into Desktop. They share configuration and project memory via CLAUDE.md files." code.claude.com (checked on 2026-10-31) ↩︎

  6. Claude Code official docs, "Choose a permission mode". "Calls needing approval are denied unless you approve them with an allow rule, hook, canUseTool callback, or --permission-prompt-tool." code.claude.com (checked on 2026-10-31) ↩︎

  7. Claude Code official docs, "Desktop application". "To move a CLI session into Desktop, run /desktop in the terminal." / "This command is available on macOS and x64 Windows when you are signed in with a Claude subscription." code.claude.com (checked on 2026-10-31) ↩︎