claude-code-mcp
0/15 complete

Module 1: Claude Code Fundamentals · 15 min

Installing and Configuring Claude Code on Your Machine

// sabak

Turn this lesson into one checked practice output

By the end, you should be able to explain the core idea behind “Installing and Configuring Claude Code on Your Machine” in your own words, apply it to one small real or sample task, and identify what still needs human review.

  1. 1

    Learn

    Read the 15-minute lesson without copying an output blindly.

  2. 2

    Try

    Use a small, non-sensitive example that you can inspect line by line.

  3. 3

    Review

    Check facts, fit, and risk; save one improvement note for next time.

Claude Code is a developer tool with filesystem and command capabilities, so installation begins with workspace and identity safety—not a global “yes to everything.” Current installation and authentication options change; follow Anthropic’s live setup guide for the supported method on your operating system.

Prepare Before Installation

Create a disposable Git repository with no secrets or customer data. Confirm Git, your project runtime, and test command work independently. Back up work and commit a clean baseline. Never begin in your home folder, cloud-drive root, or a directory containing several clients.

Use company-owned authentication for company work. Do not share one developer account. Review the provider’s data controls and your client agreement before sending proprietary code.

Configure the Boundary

Claude Code supports permission modes and allowed/disallowed tools. Start with interactive approval and plan/read behavior. Do not use --dangerously-skip-permissions for normal development or unattended jobs. Restrict additional directories and network/tool access to the task.

Create or review:

.gitignore                 secrets, local settings, generated data
CLAUDE.md                  shared project guidance
.claude/settings.json      reviewed team configuration
.claude/settings.local.json local-only preferences, ignored by Git

Instructions guide behavior; settings, sandboxing, OS identities, and credentials enforce it.

Verify the Install

Run the official diagnostic/version commands, open the sample repository, and ask for a read-only summary. Verify the working directory, loaded context, authentication owner, permission prompts, and absence of secrets. Run the project test manually before asking Claude to do so.

Worked Example

A Lahore developer creates quote-sample, commits a calculator and tests, and removes .env. Claude is opened only in that repo. The first task is “read the project, list the test command, and do not edit.” The developer confirms the correct files and permissions, then allows one test command. No deployment token or production database is available to the process.

Failure Cases to Diagnose

  • Installed with elevated privileges unnecessarily: use the supported user-level method.
  • Opened parent monorepo by accident: exit and restart at the approved root.
  • Secret appeared in context/output: revoke or rotate it; do not merely delete chat.
  • Permission bypass copied from a tutorial: restore explicit controls.
  • Personal auth used for client production: move to authorized organizational ownership.
  • Version undocumented: record it with the project evidence.

🇵🇰 Pakistan Angle

Use synthetic names, PKR values, phone numbers, and order records during setup. Agency laptops often contain several client folders and WhatsApp exports; keep each client workspace and credential set isolated.

Plan for interrupted connectivity: commit often, keep deterministic local tests, and ensure a resumed session re-reads current repository state. Do not depend on model conversation history as a backup.

Hands-On Exercise

  1. Create the disposable repository and baseline commit.
  2. Install from current official guidance.
  3. configure ignored local settings and reviewed permissions.
  4. Run a read-only inspection and one approved test.
  5. Document version, identity owner, root, and rollback.

Completion Rubric

  • Workspace contains no real secrets or customer data.
  • Authentication and recovery ownership are explicit.
  • Permission bypass is disabled.
  • Working root and loaded context are verified.
  • Baseline and tests work without Claude.
  • Version and configuration are documented.

Sources

Key takeaway: install Claude Code into an isolated, versioned workspace with explicit identities and permissions; never make production secrets part of the learning environment.

Self-check

Before you mark Lesson 1.1 complete

  • Can I explain “Installing and Configuring Claude Code on Your Machine” without reading the lesson back word for word?
  • Did I complete the lesson’s practice step on a real or clearly labelled sample task?
  • Did I check the result for invented facts, private data, unsafe actions, and mismatch with the brief?