alirezan.dev
  • Home
  • Blog
  • Resume
  • Course
  • Home
  • Blog
  • Resume
  • Course

© 2026 AliReza Noori. All rights reserved.

Course/Setting the Foundation/Setting Up Your Environment

Video coming soon

Lesson 2Setting the FoundationFree Preview

Setting Up Your Environment

Clone the course project, install Claude Code and verify everything works with your first launch.

What You'll Do

Two things: get the course project on your machine, and install Claude Code. That's it. We'll explore everything else in the next lesson.

Step 1: Clone the Course Repository

Throughout this course, we'll be building an AI Prompt Library, a web app where people can browse, share and manage their AI prompts. Think of it as a community prompt library: users can discover prompts others have created and contribute their own.

It's a Next.js app with TypeScript, Tailwind and Bun. A realistic project with enough complexity to exercise every concept we cover. Clone it and get it running:

bash
git clone https://github.com/ali-nr/ai-prompt-library.git
cd ai-prompt-library

Install dependencies and make sure it runs:

bash
bun install
bun dev

Open http://localhost:3000 to confirm you see the prompt library homepage. Once confirmed, stop the dev server.

Here's what the project structure looks like:

  • app/
    • prompt/
      • [id]/
        • page.tsx // Single prompt view
    • globals.css
    • layout.tsx // Root layout
    • page.tsx // Homepage
  • lib/
    • data/
      • prompts.json // Prompt database
    • utils.ts
  • biome.json
  • next.config.ts
  • package.json
  • tsconfig.json

Checkpoint Branches

The main branch is the starting point for the course. If you ever want to skip ahead or reset to the beginning of a specific section, the repo includes checkpoint branches:

bash
git checkout checkpoint/s3   # Jump to the start of Section 3

Each checkpoint branch has the project in the exact state you'd have if you completed all previous sections. Use them if you fall behind or want to start fresh from a particular point.

Step 2: Install Claude Code

The recommended method on macOS:

bash
curl -fsSL https://claude.ai/install.sh | bash

Verify it installed:

bash
claude --version

Important: The old npm install -g @anthropic-ai/claude-code method is deprecated. The native installer handles automatic updates and is the officially supported method going forward.

Step 3: First Launch

From inside the course project directory, launch Claude Code:

bash
claude

On first launch, Claude Code will walk you through initial setup. You'll choose a theme, configure some defaults and authenticate with your Anthropic account. Just follow the on-screen prompts to get through this.

A Quick Note on Pricing

There are two ways to pay for Claude Code:

1. Subscription (recommended). Claude's Pro plan ($20/month) or Max plans ($100 or $200/month) include Claude Code access with a fixed monthly cost. No per-token billing, no surprises. Pro gives you more than enough usage for this course.

2. API credits. You can also use Claude Code with the API by generating an API key at console.anthropic.com and adding credits. You pay per token consumed, which is useful for integrations or variable workloads but harder to predict costs.

For this course, I recommend the Pro subscription. It's the simplest way to get started. Sign in and you're ready. No API keys to manage, no usage tracking to worry about.

Tip: If you're on a subscription, make sure the ANTHROPIC_API_KEY environment variable is not set on your machine. If it is, Claude Code will use the API (and your credits) instead of your subscription. Run /status to verify which authentication method is active.

Once you're in, run these two commands to verify everything is healthy:

  • /doctor checks your installation and reports any issues
  • /status shows your version, model, account and connectivity info

If /doctor reports all green, you're ready for the next lesson.

Tip: Always launch Claude Code from inside your project directory. This ensures it picks up project-specific configuration files automatically.

Key Takeaways

  • Clone the course repo (ai-prompt-library) as this is what we build throughout the course
  • Install Claude Code via the native installer, not npm
  • Always launch from inside your project directory
  • /doctor is your go-to for verifying your setup
Previous:Introduction to LLMs & AgentsNext:Claude Code Essentials

On this page

What You'll DoStep 1: Clone the Course RepositoryCheckpoint BranchesStep 2: Install Claude CodeStep 3: First LaunchA Quick Note on PricingKey Takeaways