Claude Code CLI Installation & Configuration Guide for Windows, Mac & Linux (2025)

Here we are gonna talk about the complete setup guide step by step of Claude Code at your terminal CLI for Windows, Linux and Mac.
If you are not familiar with basic setups than please first go to BASIC GUIDE to understand the concept overall.

I hope, I’ll guide you well but in any case you have confusion, you can visit my Discussion Page.

Why Claude Code?

“For almost everything, I utilize Claude Code. I use it by default. And here’s why: agents are a feature that modifies the game.

"If you can only pay for one AI subscription, Claude Pro is the one I would choose, especially for the last feature I'm going to show you." 

Best for:

  • ✅ Professional workflows with AI agents
  • ✅ Complex multi-step tasks
  • ✅ Custom personalities (Output Styles)
  • ✅ Planning mode for strategic thinking
  • ✅ Maximum control and customization

Requires: Claude Pro subscription ($20/month)

Installation

All Platforms (npm)

First Launch & Setup

Initial Login

First time:

  1. Prompted to login with Claude Pro account
  2. Opens browser for authentication
  3. Select directory permissions (approve access to current folder)

Permission prompt:

📁 Allow Claude Code to access /Users/you/your-project? (y/n)

Interface Overview

TUI (Terminal User Interface)

┌─ Claude Code ──────────────────────────────────────┐
│ 💭 Thinking...                                      │
│                                                     │
│ [Your question here]                                │
│                                                     │
│ [Claude's response]                                 │
│                                                     │
│ Context: 42% used (85,234 tokens)                  │
│ Mode: Normal | Thinking: ON                        │
└─────────────────────────────────────────────────────┘

Toggle Thinking Mode

Press TAB to turn thinking on/off:

Thinking: OFF  →  Press TAB  →  Thinking: ON

I recommend you to ON thinking.

Context Files: claude.md

Same concept as Gemini, but creates claude.md:

# Project: Sandwich Project

## Overview
[Claude analyzes your directory and creates context]

## Files
- best-sandwitch-method.md
- coffee-blog-outline.md

## Goals
[Project objectives]

View Context Usage

Shows detailed breakdown:

Context Usage: 85,234 tokens (42% used)

Loaded Files:
- claude.md (1,234 tokens)
- best-sandwich-method.md (2,456 tokens)
- sandwich-blog-outline.md (890 tokens)

Conversation: 80,654 tokens

Agents: The Game-Changer

What Are Agents?

“Cool, I have a task, but it’s not for me,” Claude said. I’m going to assign this work to one of my staff members or colleagues. Here’s another example of Claude… In addition to providing him with new instructions, he is also providing him with a new context window.

Key concept: Agents are separate Claude instances with:

  • ✅ Fresh context window (200K tokens each)
  • ✅ Specialized instructions
  • ✅ Custom tool access
  • ✅ Independent memory

Create Your First Agent

Menu appears:

┌─ Agent Management ─────────────────────────┐
│ 1. Create new agent                        │
│ 2. View agents                             │
│ 3. Edit agent                              │
│ 4. Delete agent                            │
└────────────────────────────────────────────┘

Step-by-Step Agent Creation

Select “Create new agent”

Choose scope:

📁 Project-specific agent (sandwich-project)
🌍 Personal agent (available everywhere)

Chooses: “Just this project”

Describe the agent:

Name: homelab-guru
Description: Expert in homelab hardware, networking, and infrastructure

Configure:

Tools: [x] All tools
Model: Sonnet 4.5
Color: Auto

Press Enter to save, ESC to exit

Agent created! 🎉

Using Agents

What happens:

  1. Main Claude sees the task
  2. Delegates to homelab-guru agent
  3. Agent gets fresh 200K context window
  4. Agent works independently
  5. Returns results to main Claude

Visual in terminal:

┌─ Agent: homelab-guru ──────────────────────┐
│ 🔍 Researching NAS solutions...             │
│ 📊 Context: 15% used (30,000 tokens)       │
└────────────────────────────────────────────┘

Reference Files with @

# Reference specific files
> @homelab-guru create a summary of @nas-comparison.md

# Reference folders
> @homelab-guru review all documents in @research-folder

Multiple Agents Simultaneously

Demo:

> Launch @homelab-guru to research the best proxmox servers.
  At the same time, use a general agent to find the best pizza place in Dallas.
  And another @homelab-guru to find the best graphics card for gaming.
  Put it all together in a comprehensive report.

What happens:

  • 🤖 Agent 1: Proxmox server research
  • 🍕 Agent 2: Pizza recommendations
  • 🎮 Agent 3: Graphics card research
  • 📊 Main Claude: Compiles all results

Output Styles: Custom Personalities

What Are Output Styles?

System prompts that control:

  • How Claude responds
  • Persona and tone
  • Domain expertise
  • Task-specific behaviors

View Output Styles

Default styles:

📋 Available Output Styles:
- code (default) - Optimized for software development
- concise - Brief, to-the-point responses
- detailed - Comprehensive explanations

Create Custom Output Style

Demo:

Prompt:

Name: homelab-expert
Description: You are a homelab expert designed to help me create
the best homelab possible.

More complex example (Chuck’s actual script-writing style):

Name: technologia-scriptwriter
Description:
You are an AI assistant specialized in writing Technologia Web scripts.
You understand:
- Hook psychology and CTR optimization
- Reader retention patterns
- Technologia energetic, sandwich fluff
- Educational entertainment balance
- The "you" voice (viewer as hero)

Always:
- Keep lines short and punchy
- Add sandwich transitions between segments
- Use "Let's go!" at key moments
- Explain complex topics simply
- Add pattern breaks every 20-40 seconds

Activate Output Style

Verify:

Current Output Style: technologia-scriptwrited

Scope: Project vs Global

Project-specific:

  • Lives in .claude/output-styles/ in current project
  • Only available in this project

Global:

  • Lives in ~/.config/claude/output-styles/
  • Available in all projects

Planning Mode

Activate Planning Mode

Press Shift+Tab to toggle:

Mode: Normal  →  Shift+Tab  →  Mode: Planning

How It Works

  1. You give Claude a task
  2. Claude creates a detailed plan
  3. You review and approve
  4. Claude executes the plan

Example:

Refactor the authentication system to use JWT tokens

Planning mode response:

📋 Plan:
1. Review current authentication implementation
2. Install jsonwebtoken package
3. Create JWT utility functions
4. Update login endpoint
5. Add token verification middleware
6. Update protected routes
7. Add token refresh logic
8. Update tests

Approve this plan? (y/n/edit)

Type y to execute, or edit to modify.

Advanced Features

Dangerous Mode (Skip Permissions)

⚠️Warning: Claude will execute actions without asking

Use when:

  • You trust your instructions completely
  • You want maximum speed
  • You’re doing repetitive tasks

Combine Flags

Real-World Workflows

1. Outline Review with Brutal Critic

Agent launches with fresh context:

  • Reads outline.md
  • Applies Technologia framework
  • Returns ruthless critique

My-Result: “8.2/10 – Not bad!”

2. Cross-Tool Research

> Find the best AI terminal videos on YouTube.
  Use the @gemini-research agent.

What happens:

  • Claude deploys gemini-research agent
  • Agent runs: gemini -p “search YouTube for AI terminal videos”
  • Gemini returns top 10 results
  • Claude compiles into report

3. Context-Protected Reviews

Problem: Your main conversation is 85K tokens deep with the outline

Solution: Deploy fresh agent with 200K tokens

Why this matters:

  • Main context: 85K tokens (cluttered with iterations)
  • Agent context: 0K tokens (fresh eyes)
  • No bias from previous conversation

Tips From Technologia

1. Protect Your Context

"I use agents all the time to protect my context and avoid any kind of weird bias."

Strategy: Delegate reviews, research, and analysis to agents

2. One Project = One Claude Session

3. Name Agents by Function

Good names:

  • homelab-guru
  • brutal-critic
  • research-assistant
  • code-reviewer

Bad names:

  • agent1
  • test
  • bob

4. Give Agents Specific Instructions

Vague:

You are helpful.

Specific:

You are a homelab expert specializing in enterprise NAS solutions.
When making recommendations:
- Consider budget constraints
- Explain technical trade-offs
- Provide specific product recommendations
- Include pricing and availability

Agent Management

List All Agents

View:

  • Project agents (local to current directory)
  • Personal agents (available everywhere)

Edit an Agent

> /agents
# Select "Edit agent"
# Choose agent
# Modify instructions

Delete an Agent

> /agents
# Select "Delete agent"
# Confirm

Hidden Features

Paste Images

# In Claude Code session
> Analyze this screenshot
[Paste image]

Custom Hooks

Advanced: Create event-triggered actions

Status Line Customization

Customize your terminal status bar with project info

Troubleshooting

“Not authorized” Error

Ensure you have:

  1. Active Claude Pro subscription
  2. Logged in correctly: claude auth login

Agent Not Working

# Verify agent exists
> /agents

# Check agent configuration
> /agents
# Select "View agents"

Context Not Loading

# Recreate context file
> /init

Permission Denied on Files

# Relaunch with directory approval
claude
# Approve file access when prompted

Pricing

Requires: Claude Pro ($20/mo)

Includes:

  • Access to Claude Code terminal tool
  • Use your existing web subscription
  • No separate API key needed
  • Unlimited-ish usage (fair use policy)

Comparison: Gemini vs Claude

FeatureGemini CLIClaude Code
PriceFree$20/mo
Agents❌ No✅ Yes
Output Styles❌ No✅ Yes
Planning Mode❌ No✅ Yes
Context Window200K200K (per agent!)
Best ForGetting startedProfessional work

What’s Next?

Master these features:

  1. Create 2-3 specialized agents for your work
  2. Design a custom output style
  3. Practice delegating tasks to agents
  4. Try planning mode on complex tasks

Explore:

➡️ Gemini Complete Guide

➡️ ChatGPT Complete Guide

➡️ DeepSeek Complete Guide

➡️ OpenCode Complete Guide

Similar Posts