Claude Code lives in your terminal — and that is exactly why it is so powerful. It can read your files, run commands, and make changes directly in your project. But if you have never used a terminal AI agent before, the workflow takes some getting used to. This guide walks you through using Claude Code in the terminal, from installation to productive use.
What You Need
Before starting, make sure you have three things: a Claude account (the free tier works for testing), Node.js installed, and a terminal you are comfortable with. That is it — no IDE plugin required.
Installing Claude Code
Open your terminal and run the install command for the CLI. The package manager downloads and installs the tool globally, so you can run it from any project directory.
Once installed, type the command to launch Claude Code. It will ask you to authenticate. Follow the link, approve access, and you are ready.
Your First Session
Navigate to a project directory and launch Claude Code there. The tool works on whatever project you are in, so start in a real codebase to see the value.
Try a simple question first: ask what the project does or how a specific file works. Claude Code will read the relevant files and give you an answer grounded in your actual code.
Useful Commands to Know
Claude Code has a set of slash commands that shape how it works:
- /help: Lists available commands and options.
- /compact: Summarizes the conversation to free up context, useful for long sessions.
- /clear: Starts a fresh session, resetting the context.
- /init: Creates a CLAUDE.md file to store project instructions for future sessions.
These commands keep long sessions manageable and make the tool more efficient.
Working on Code
To make changes, tell Claude Code what you want in plain language. Be specific. “Add error handling to the database module” produces better results than “improve this project.”
Claude Code can create, edit, and delete files. It can also run commands in the terminal. When it makes changes, it shows you the diff — review it before accepting.
Tips for Getting Good Results
The quality of Claude Code’s output depends heavily on your prompts. Clear, specific instructions produce better code than vague ones. Provide the constraints you care about — performance, style, compatibility — so the tool can match your expectations.
Use /init to create a project-level instructions file. This tells Claude Code your preferences for every session in that project, which improves consistency.
For large tasks, break them into steps. Ask it to plan first, then execute. You get better results than dumping a huge request in one go.
When to Use the GUI Instead
Claude Code also has a desktop app if you prefer a graphical interface over the terminal. The terminal version is more powerful for automation and scripting, but the app is friendlier for beginners. Start with whichever feels natural, and switch as you get comfortable.
What the Terminal Version Is Not
Claude Code in the terminal is powerful but not for everyone. It has a learning curve, it is less approachable than the desktop app, and the token cost of long sessions adds up if you let it scan your whole project on every request. It also does not magically fix a disorganized codebase — garbage in, garbage out. If you are not comfortable in a terminal, start with the GUI instead.
Bottom Line
Claude Code in the terminal is a powerful addition to any developer’s toolkit. Install it, start in a real project, learn the slash commands, and be specific in your prompts. The learning curve is short, and the payoff — understanding and modifying code with AI assistance — is substantial.