Here’s something most developers don’t think about: that old MacBook Pro collecting dust in your drawer could be your most powerful AI coding tool. I’ve been running Claude Code on a 2019 Intel Mac Mini for the past six months, and it’s completely changed how I prototype and ship projects.
Let me walk you through exactly how to set up a spare Mac as a dedicated Claude Code machine. No fluff, just what works in practice.
Why a Spare Mac?
I tried running Claude Code on my daily driver — a beefed-up M2 MacBook Air. Problem? Context switching killed my flow. Every time I needed to test a UI change, I had to tab out of the terminal, wait for a browser to load, and lose my train of thought.
A dedicated spare Mac lets Claude Code run full-screen in its own environment. You SSH into it from your main machine, or better yet, leave it headless with a permanent SSH tunnel. Claude Code controls the terminal, you control the vision.
Real case: I set up a 2017 MacBook Pro (8GB RAM, dual-core i5) as a Claude Code station for a client project — an AI-powered SaaS dashboard. The spare Mac ran Claude Code 24/7, iterating on a React frontend and a Python backend. I’d push requirements via a shared Slack channel, and Claude Code would implement them overnight. We shipped the MVP in 3 days instead of 3 weeks.
What You’ll Need
| Component | Minimum Spec | Recommended Spec |
|---|---|---|
| Mac Model | 2016 or newer | 2018+ with 16GB RAM |
| macOS | Ventura (13.x) | Sonoma (14.x) or Sequoia (15.x) |
| Storage | 128GB SSD | 256GB+ SSD |
| Network | Wi-Fi 5 | Ethernet or Wi-Fi 6 |
| Claude Code subscription | Pro ($20/month) | Max ($100/month) for longer sessions |
Note: Claude Code works via Anthropic’s API. You’ll need an API key with credits. The CLI tool is free, but you pay per token used. Expect $10–$50/month for moderate usage.
Step 1: Prepare the Spare Mac
First, wipe the machine. You want a clean slate to avoid background processes stealing resources.
- Erase all content and settings (macOS Recovery > Disk Utility > Erase)
- Reinstall macOS from Recovery Mode
- Set up a minimal user account — no iCloud, no syncing, no extras
- Disable sleep mode in System Settings > Energy Saver: set ‘Turn display off when inactive’ to ‘Never’ and uncheck ‘Put hard disks to sleep when possible’
- Enable Remote Login (System Settings > General > Sharing > Remote Login)
I keep my spare Mac headless — no monitor, keyboard, or mouse. I SSH into it from my main machine. To set this up, ensure both machines are on the same network, then:
# From your main machine
ssh yourusername@192.168.1.xxx
Replace the IP with your spare Mac’s local IP. You can find it in System Settings > Network > Wi-Fi/Ethernet.
Step 2: Install Claude Code
Claude Code is Anthropic’s official CLI tool for AI-powered code generation and editing. It’s natively supported on macOS.
# Install via npm (requires Node.js 18+)
npm install -g @anthropic-ai/claude-code
# Verify installation
claude --version
If you don’t have Node.js installed, use Homebrew:
# Install Homebrew first
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install Node.js
brew install node
Next, set up your API key. Get one from console.anthropic.com and export it:
echo 'export ANTHROPIC_API_KEY="sk-ant-xxxxxxxxxxxx"' >> ~/.zshrc
source ~/.zshrc
Step 3: Configure Claude Code for Headless Use
Claude Code has a configuration file at ~/.claude/settings.json. I tweak it to optimize for headless, long-running sessions:
{
"model": "claude-sonnet-4-20260514",
"maxTokens": 8192,
"temperature": 0.3,
"system": "You are a senior full-stack developer. Write clean, production-ready code. Always ask clarifying questions before making assumptions.",
"autoApprove": ["write", "edit", "run"]
}
Warning: autoApprove is powerful but dangerous. Only enable it if you trust the model completely. I use it for specific project directories where Claude Code has full access. For everything else, I keep it off.
Step 4: Connect from Your Main Machine
Now the fun part — controlling the spare Mac remotely. I use tmux for persistent sessions:
# On the spare Mac
brew install tmux
tmux new -s claude-session
claude
Then from your main machine, SSH in and attach:
ssh yourusername@192.168.1.xxx -t "tmux attach -t claude-session"
This way, even if your SSH connection drops, Claude Code keeps running. I’ve had sessions last 72+ hours without interruption.
Step 5: Set Up the Project Structure
Create a dedicated project folder on the spare Mac:
mkdir -p ~/projects/claude-workspace
cd ~/projects/claude-workspace
Then initialize a Git repo so you can track changes:
git init
git add .
git commit -m "Initial commit"
I also set up a requirements.md file where I dump tasks. Claude Code reads it and iterates:
echo "# Project Requirements
- Build a REST API with FastAPI
- Use SQLite for storage
- Add JWT authentication
- Create a minimal React dashboard" > requirements.md
Step 6: Automate with Cron Jobs
Want Claude Code to check requirements and work unattended? Set a cron job:
crontab -e
Add this line to run Claude Code every night at 2 AM:
0 2 * * * cd /Users/yourusername/projects/claude-workspace && claude 'Read requirements.md and implement the next uncompleted task. Commit after each task.' >> /Users/yourusername/logs/claude-nightly.log 2>&1
This is how I automated the boring parts of a client’s ETL pipeline. Claude Code would refactor Python scripts and add docstrings while I slept.
Step 7: Monitor and Debug
Things will break. Here’s how I debug:
- Check logs:
tail -f ~/logs/claude-nightly.log - View running processes:
ps aux | grep claude - Kill stuck sessions:
tmux kill-session -t claude-session - Restart Claude Code:
claude --resume
One time, Claude Code got stuck in an infinite loop generating 10,000 lines of CSS. Killing the session and restarting with a tighter token limit fixed it.
Real Results
I’ve used this setup for three production projects:
-
AI-powered customer support tool — built the entire backend (Node.js, PostgreSQL, Redis) in 8 hours. Claude Code wrote the API endpoints, database schema, and tests. My job was reviewing and deploying.
-
Data pipeline for a logistics startup — Claude Code refactored 15,000 lines of Python, added unit tests, and improved performance by 40%. The spare Mac ran it overnight for a week.
-
Personal blog with Astro — I described the design in plain English, and Claude Code generated the theme, components, and Markdown parsing. The blog went live in 2 hours.
Common Pitfalls (and How to Avoid Them)
- Token limits: Claude Code can hit token limits on long sessions. I set
maxTokensto 8192 and restart sessions daily. - Memory leaks: Node.js processes occasionally leak. I added a weekly reboot via
launchctl. - Network drops: Use
tmuxandautosshfor automatic reconnection.
Final Thoughts
Setting up a spare Mac for Claude Code is like having a junior developer who never sleeps, never complains, and costs $20/month in API fees. The key is treating it as a tool, not a replacement for your own judgment.
Start small — give it a single file to refactor. Once you see the results, you’ll wonder why you didn’t do this sooner.
If you’re serious about AI-assisted development, check out ASI Biont’s approach to integrating AI tools into real workflows. They focus on practical applications, not hype.
Now go dig out that old Mac. It’s about to become your most productive machine.
Comments