Claude Code transforms how developers and business owners interact with AI. Unlike browser-based ChatGPT or Claude.ai, Claude Code runs in your terminal with direct file system access. This means Claude can read your entire codebase, remember your preferences through configuration files, and maintain context across sessions.
This guide walks through the complete setup process, from initial installation to advanced configuration with CLAUDE.md files and Obsidian integration.
Prerequisites Before Installation
Claude Code requires a few dependencies. The installation process varies slightly between operating systems, but the core requirements remain consistent:
- Node.js 18+ — Claude Code is distributed as an npm package
- Anthropic API key — Or Claude Max subscription for unlimited usage
- Terminal access — Works with Terminal (Mac), Windows Terminal, or any Unix shell
- Text editor — VS Code, Cursor, or any editor for configuration files
Step 1: Install Claude Code
The simplest installation method uses npm. Open your terminal and run:
npm install -g @anthropic-ai/claude-code
After installation completes, verify it works:
claude --version
You should see the version number printed. If you encounter permission errors on Mac or Linux, you may need to use sudo or configure npm to use a different global directory.
Authentication Setup
Claude Code needs to authenticate with Anthropic's servers. On first run, it will prompt you to either:
- Sign in with your Claude Max account (recommended)
- Enter an API key from console.anthropic.com
The authentication persists between sessions. You won't need to re-authenticate unless you explicitly sign out or your credentials expire.
Step 2: Configure CLAUDE.md
The CLAUDE.md file is where Claude Code gains its memory advantage. This markdown file, placed in your project root, gets loaded automatically at session start. Claude reads it, understands your context, and applies your preferences throughout the conversation.
Create a file named CLAUDE.md in your project directory:
# Project Context
## Who I Am
[Your role, company, relevant background]
## This Project
[What this codebase does, tech stack, conventions]
## My Preferences
- Code style: [your preferences]
- Communication: [terse, detailed, etc.]
- Error handling: [your approach]
## Current Focus
[What you're working on right now]
The more specific your CLAUDE.md, the better Claude performs. Generic instructions produce generic outputs. Detailed context produces responses that feel like they come from someone who actually knows your project.
Step 3: Set Up Project Structure
Claude Code works best with an organized workspace. A recommended structure:
project-root/
├── CLAUDE.md # Main context file
├── .claude/
│ ├── hooks/ # Custom automation scripts
│ └── sessions/ # Session logs (optional)
├── docs/
│ └── context/ # Additional context files
└── [your project files]
The .claude directory keeps Claude-specific configurations separate from your main project files. Hooks allow you to automate actions at session start, stop, or when specific patterns are detected.
Step 4: Connect to Obsidian (Optional but Recommended)
Claude Code's power multiplies when connected to an Obsidian vault. Instead of just reading project files, Claude gains access to your entire knowledge base: notes, research, client information, SOPs, and anything else you've documented.
The integration works through file system access. Point Claude Code at your Obsidian vault directory, and it can search, read, and even update your notes.
For detailed Obsidian integration instructions, see our Claude Code Obsidian Integration Guide.
Verification: Test Your Setup
Run Claude Code in your configured project directory:
cd /path/to/your/project
claude
Ask Claude a question that requires context from your CLAUDE.md file. For example, if your CLAUDE.md mentions your tech stack, ask about something specific to it. Claude should respond with awareness of your project's context.
If Claude responds generically without acknowledging your context, check:
- CLAUDE.md exists in the current directory
- The file is named exactly
CLAUDE.md(case-sensitive) - The file contains valid markdown without syntax errors
Claude Code vs ChatGPT: Setup Comparison
| Feature | Claude Code | ChatGPT |
|---|---|---|
| Context persistence | CLAUDE.md file (unlimited) | Custom instructions (1,500 chars) |
| File access | Full file system | Upload only (limited) |
| Project structure | Reads entire codebase | Per-conversation uploads |
| Automation | Hooks, scripts, CLI | GPT Actions (limited) |
For a deeper comparison of memory capabilities, see Claude vs ChatGPT Memory.
Common Setup Issues
Permission Denied Errors
On Mac/Linux, npm global installs sometimes require elevated permissions. Either use sudo npm install -g or configure npm to use a user-owned directory.
Authentication Failures
If authentication fails, clear your credentials and re-authenticate. Claude Code stores credentials in your system keychain or credential manager.
CLAUDE.md Not Loading
Claude Code loads CLAUDE.md from your current working directory. Make sure you're running Claude from the correct directory, not a subdirectory.
Skip the Setup Hassle
Our pre-configured Claude Code + Obsidian system includes optimized CLAUDE.md templates, hook automations, and a knowledge base structure designed for business owners.
Get the Complete Setup ($997)Next Steps After Setup
With Claude Code installed and configured, you're ready to build your persistent AI memory system. The setup is just the foundation. The real power comes from:
- Building domain-specific context files for different areas of your work
- Creating hooks that automate routine tasks
- Integrating with your existing knowledge management workflow
Start with a minimal CLAUDE.md and expand it as you discover what context helps Claude most. The best configurations evolve from actual usage, not theoretical planning.
For the complete guide to making AI remember everything about you, read our pillar article: How to Make AI Remember You.