Your AI Coding Assistant
Claude Code is a command-line tool that lets you have AI-powered conversations about code, generate files, debug problems, and build entire projects - all from PowerShell!
๐ฏ Learning Objectives
- Install Claude Code globally using npm
- Configure Claude Code with your API key
- Test the installation with a simple project
- Learn basic Claude Code commands
- Troubleshoot common installation issues
๐ค What is Claude Code?
Claude Code is an AI development assistant that runs in your terminal. It combines the power of Claude AI with your local file system.
What Can Claude Code Do?
- โจ Generate complete projects: "Create a task tracker app"
- ๐ Write and edit files: "Add dark mode to index.html"
- ๐ Debug code: "Fix the JavaScript error in app.js"
- ๐ Refactor code: "Make this function more efficient"
- ๐ Explain code: "What does this function do?"
- ๐จ Add features: "Add a search bar to the dashboard"
How It Works:
- You type a request in natural language
- Claude Code analyzes your project
- It generates/modifies code automatically
- Files are created/updated on your computer
- You review and test the changes
๐ฆ Installation Process
Open PowerShell as Administrator
- Press Windows + X
- Press A
- Click "Yes" for administrator permission
Install Claude Code Globally
Run this single command:
What happens:
- npm downloads Claude Code from the internet
- Installs it globally (
-gflag) - Makes
claudecommand available everywhere - Takes 1-2 minutes
You'll see text scrolling by - this is normal! It shows:
Verify Installation
Check that Claude Code is installed:
Expected output:
- Close PowerShell completely
- Re-open PowerShell as Administrator
- Try the command again
Start Claude Code for the First Time
Launch Claude Code:
You'll be prompted to enter your API key:
Configure Your API Key
- Open the text file where you saved your API key
- Copy the entire key (starts with
sk-ant-api03-...) - Return to PowerShell
- Right-click to paste (or press Ctrl+V)
- Press Enter
๐ Success!
You should see: "API key configured successfully!"
Claude Code is now ready to use!
๐งช Test Your Installation
Create a Test Project
Let's build a simple HTML file to verify everything works:
- Make sure you're in your projects folder:
- Start Claude Code:
- Type this request:
- Watch as Claude Code generates the file!
Review the Generated File
Claude Code will show you the code it created. You can:
- Review the changes
- Accept by typing
yesory - Reject by typing
noorn - Request modifications: "Make the background blue"
Test the Generated File
- Type
exitto leave Claude Code - Open File Explorer and navigate to ClaudeCodeProjects
- Double-click
hello.html - You should see your working webpage!
๐ฌ Basic Claude Code Commands
Navigation:
exit- Leave Claude Codeclear- Clear the screenhelp- Show available commands
File Operations:
- "Create a file called [name]" - Generate new file
- "Edit [filename]" - Modify existing file
- "Delete [filename]" - Remove file
- "Show me [filename]" - Display file contents
Project Operations:
- "Build a [type] app" - Generate complete project
- "Add [feature] to the app" - Enhance existing project
- "Fix the bug in [filename]" - Debug code
- "Explain this code" - Get explanations
๐ก Pro Tips for Claude Code
- Be Specific: "Add a dark blue navigation bar at the top" vs "Make it look better"
- Iterate: Start simple, then add features one by one
- Review Code: Always check generated code before accepting
- Use Natural Language: Talk to it like a colleague
- Save Often: Back up your projects regularly
- Context Matters: Claude Code can see all files in current folder
๐ง Troubleshooting
Problem: "command not found" after installation
- Close all PowerShell windows
- Open new PowerShell as Administrator
- Try
claude --versionagain - If still failing, restart computer
Problem: API key not accepted
- Verify you copied the entire key (very long string)
- Check for extra spaces before/after the key
- Generate a new key in Anthropic Console
Problem: "Insufficient credits" error
- Check balance in Anthropic Console
- Add more credits if needed
- Verify API key is active in Console
Problem: Code generation fails
- Check internet connection
- Verify API key in Console is "Active"
- Try simpler request first
- Check Console usage page for error logs
โ Topic Completion Checklist
- โ Installed Claude Code globally using npm
- โ Verified installation with
claude --version - โ Configured API key successfully
- โ Created test project (hello.html)
- โ Generated code executed without errors
- โ Understand basic Claude Code commands
- โ Know how to start/exit Claude Code
๐ What's Next?
You now have a fully functional AI development environment! In the next topic, you'll use Claude Code to build a complete custom project that solves a real problem in your coordinator work.