Back to course
Your First Build
Lesson 1 of 10
Free

Setting Up Your Building Environment

Install the tools you need to start building legal automations with AI assistance. No coding experience required.

15 min read
Share

You’re about to learn something most lawyers never will: how to build your own tools. Not by becoming a programmer—by learning to direct AI that programs for you.

This lesson gets you set up. By the end, you’ll have a working environment and will have run your first AI-assisted command.

What We’re Installing

You need two things:

  1. Claude Code — An AI assistant that can read files, write code, and run commands on your computer
  2. A terminal — The text-based interface where you’ll work with Claude

That’s it. No complex development environments, no programming languages to learn first.

Step 1: Install Claude Code

Claude Code runs in your terminal. Here’s how to install it:

On Mac:

Open Terminal (search for “Terminal” in Spotlight), then paste this command:

npm install -g @anthropic-ai/claude-code

On Windows:

Open PowerShell, then paste the same command:

npm install -g @anthropic-ai/claude-code

Don’t have npm? You’ll need Node.js first. Download it from nodejs.org — choose the LTS version. This takes 2 minutes and gives you npm automatically.

Step 2: Set Up Your API Key

Claude Code needs permission to use Claude. You’ll need an API key from Anthropic:

  1. Go to console.anthropic.com
  2. Create an account or sign in
  3. Navigate to API Keys and create one
  4. Copy the key (it starts with sk-ant-)

Now tell Claude Code about your key:

export ANTHROPIC_API_KEY="sk-ant-your-key-here"

Tip: Add this line to your shell profile (.zshrc on Mac, .bashrc on Linux) so you don’t have to set it every time.

Step 3: Your First Conversation

Navigate to a folder where you want to work. For now, let’s use your Desktop:

cd ~/Desktop

Now start Claude:

claude

You should see Claude’s interface appear. Try saying:

What files are on my Desktop?

Claude will look at your Desktop and tell you what’s there. You just gave an AI access to your file system—and it responded with real information about your computer.

What Just Happened?

Let’s break down what’s different about this compared to ChatGPT:

ChatGPTClaude Code
Lives in a browserLives on your computer
Can only see what you pasteCan see your actual files
Gives you code to copyCan run code directly
You do the workIt does the work

When you asked “What files are on my Desktop?”, Claude:

  1. Understood you wanted a file listing
  2. Ran a command to check your Desktop
  3. Reported back what it found

This is the fundamental shift: you’re not copying code from a chatbot. You’re directing an assistant that can actually do things.

The Workspace Concept

Claude Code works best when you point it at a specific folder—your “workspace.” This is where your project lives.

For legal work, you might have:

  • ~/Documents/ClientIntake/ — intake form processing
  • ~/Documents/ContractReview/ — contract analysis tools
  • ~/Documents/CaseFiles/ — document organization

When you run claude from inside one of these folders, Claude can see and work with everything in that folder.

Try this: Create a test folder and start Claude there:

mkdir ~/Desktop/my-first-tool
cd ~/Desktop/my-first-tool
claude

Now you have a clean workspace for your first project.

A Quick Test

Let’s verify everything works. In your Claude session, type:

Create a file called hello.txt that says "My first AI-built file"

Claude will create the file. Now ask:

Show me what's in hello.txt

It will read the file back to you.

You just:

  1. Gave a natural language instruction
  2. Had AI create a file
  3. Verified the result

This is the core loop of building with AI: instruct → execute → verify.

What You’ve Accomplished

You now have:

  • ✅ Claude Code installed
  • ✅ API access configured
  • ✅ A workspace ready
  • ✅ Your first AI-created file

You’re ready to build your first real automation.

Next Lesson

In the next lesson, you’ll build something actually useful: an automation that renames messy case files into an organized format. You’ll go from a folder of scan001.pdf, Document (3).pdf, and IMG_4521.pdf to properly named files like 2024-03-15_Smith-v-Jones_Complaint.pdf.

No coding required—just clear instructions.