Build: Your AI
Dev Setup

From zero to a complete personal AI stack

agent37.club

"What does a real
AI dev setup
actually look like?"

Not a tutorial for one tool. The complete system — what runs where, how the pieces connect, and what it actually costs.

The Personal AI Stack

Three machines, one mesh network

MacBook / DesktopClaude Code + Ollama + your editor
Tailscale MeshWireGuard VPN — connects everything
VPS ($5-20/mo)persistent agents, MCP servers, webhooks
Cloud APIsClaude, OpenAI, etc. — pay per token

Key insight: Run what you can locally (free, fast, private). Offload what needs to be persistent or powerful to a VPS or API.

Local Models: Why & When

Not everything needs an API call

Use local when...

  • Privacy matters — code never leaves your machine
  • You're offline — planes, cafes, bad wifi
  • Latency is critical — autocomplete, quick lookups
  • Experimenting freely — no token bill anxiety
  • Running many requests — batch processing, CI pipelines

Use API when...

  • You need frontier quality — Opus/Sonnet for hard problems
  • Long context — 200K tokens isn't possible locally
  • Complex reasoning — multi-step planning, architecture
  • Speed at scale — cloud GPUs are faster than your laptop

The best setup uses both. Local for the 80% of quick tasks. API for the 20% that need frontier intelligence.

Ollama: Local Models Made Easy

One command to run any open model

# Install
brew install ollama

# Pull and run a model
ollama run llama3.3
ollama run deepseek-r1:8b
ollama run qwen2.5-coder:32b

# List installed models
ollama list

# Serve as API (OpenAI-compatible)
ollama serve
# http://localhost:11434/v1/chat/completions

Performance on Apple Silicon

ModelRAMtok/s
Llama 3.3 8B~5 GB~40-60
Qwen 2.5 14B~9 GB~25-35
DeepSeek-R1 8B~5 GB~35-50
Qwen 2.5 32B~20 GB~15-22
Llama 3.3 70B~40 GB~8-12

M3 Pro (18GB) comfortably runs up to ~14B. M3 Max (36-96GB) handles 32B-70B.

Custom Modelfiles

Fine-tune behavior without fine-tuning weights

# ~/modelfiles/code-reviewer
FROM qwen2.5-coder:14b

PARAMETER temperature 0.3
PARAMETER num_ctx 32768

SYSTEM """
You are a senior code reviewer.
Focus on:
- Security vulnerabilities
- Performance issues
- Readability improvements
Be concise. No praise, just actionable
feedback with line references.
"""
# Create and run it
ollama create code-reviewer \
  -f ~/modelfiles/code-reviewer
ollama run code-reviewer

Key Parameters

  • temperature — 0 = deterministic, 1+ = creative
  • num_ctx — context window size in tokens
  • top_p — nucleus sampling threshold
  • seed — fix random seed for reproducible output

Pro tip

Create personas for different tasks: code-reviewer, commit-writer, doc-generator. Each with tuned system prompts and temperatures.

Claude Code: Power-User Setup

The configuration hierarchy that makes Claude remember

# Three levels of memory

~/.claude/CLAUDE.md          # Global
# Your preferences across ALL projects
# "I prefer TypeScript, use pnpm, etc."

./CLAUDE.md                  # Project
# Shared with team via git
# "Use our API conventions, run tests
#  with vitest, deploy to Cloudflare"

./src/api/CLAUDE.md          # Subdirectory
# Auto-loaded when Claude reads
# files in this directory

Key Slash Commands

CommandWhat it does
/initBootstrap CLAUDE.md for a project
/compactCompress conversation, save tokens
/clearFresh start — use between tasks
/modelSwitch Haiku/Sonnet/Opus mid-chat
/reviewCode review current changes

Hot tip: Run /clear often. Old context wastes tokens and confuses the model. Start fresh for each logical task.

Skills & Hooks

Extend Claude permanently without re-explaining

Skills — reusable knowledge

# .claude/skills/my-skill/SKILL.md
---
name: api-builder
description: Build REST APIs using our
  Hono + D1 + Cloudflare Workers stack
---

# API Builder
When building API endpoints:
- Use Hono router with typed middleware
- Validate inputs with Zod schemas
- Use D1 for database, KV for cache
- Write tests with vitest
...

Hooks — automated actions

// .claude/settings.json
{
  "hooks": {
    "PostToolUse": [{
      "matcher": "Write|Edit",
      "command": "prettier --write $FILE"
    }]
  }
}
  • PostToolUse — auto-format after every file edit
  • PreToolUse — validate before destructive actions
  • Runs shell commands with context about what Claude just did

Skills load lazily — only when relevant. No wasted context tokens.

Model Routing & Cost

Use the right model for the right task

ModelInputOutputBest for
Haiku 4.5 $0.80/M$4/M Quick edits, typos, simple refactors, boilerplate
Sonnet 4.5 $3/M$15/M Daily driver — features, debugging, code review
Opus 4.6 $15/M$75/M Architecture, complex bugs, multi-file refactors

The 70/20/10 rule

70% Sonnet (daily work), 20% Haiku (quick tasks), 10% Opus (hard problems). This keeps your monthly bill 60-70% lower than Opus-for-everything.

Claude Code subscription

$20/mo Pro or $100/mo Max. Max gives 5x the usage — worth it if you code with Claude daily. Includes all models.

Tailscale: The Glue

Access all your machines from anywhere, securely

Tailscale is a WireGuard-based mesh VPN. Every device gets a stable IP and DNS name. No port forwarding, no firewall rules, no VPN server to manage.

# Install
brew install tailscale
tailscale up

# SSH to your VPS by name
ssh my-vps

# Access Ollama on your home Mac
# from anywhere:
curl http://macbook:11434/v1/models

# Share a dev server publicly
tailscale funnel 3000

Key Features

  • MagicDNS — ssh my-vps instead of remembering IPs
  • Funnel — expose local ports to the internet with HTTPS
  • ACLs — control who can access what
  • Exit nodes — route traffic through any of your machines

Free tier

Up to 100 devices, 3 users. More than enough for personal use. No credit card required.

Why not just SSH?

Tailscale works through NAT, firewalls, and carrier-grade NAT. Your VPS, home Mac, and phone are all on the same private network. No public IPs needed.

VPS: Persistent AI Agents

A $5/mo server that works while you sleep

Provider Picks

ProviderSpecCost
Hetzner2 vCPU, 4GB$4.50/mo
DigitalOcean2 vCPU, 4GB$24/mo
Fly.ioshared, 256MB~$2/mo
Railwayusage-based$5/mo+

Hetzner wins for personal setups — EU-based, dirt cheap, great specs.

What to run there

# Persistent Claude Code via tmux
ssh my-vps
tmux new -s agent

# Inside tmux: Claude Code keeps running
# even when you disconnect
claude

# Detach: Ctrl-B, then D
# Reattach later:
tmux attach -t agent
  • Cron-triggered agents (daily reports, monitoring)
  • MCP servers accessible from Claude Code anywhere
  • Webhook handlers for GitHub, Slack, etc.
  • Long-running background tasks

The Complete Picture

How it all connects

MacBook (daily driver)
  ├── Claude Code        # main coding tool
  ├── Ollama             # local models (8B-32B)
  ├── VS Code / Cursor   # editor
  └── Tailscale          # mesh network
       │
       │ WireGuard tunnel (encrypted, P2P)
       │
Hetzner VPS ($5/mo)
  ├── tmux + Claude Code # persistent sessions
  ├── MCP servers        # tools for Claude
  ├── Cron agents        # scheduled tasks
  ├── Docker             # isolation for services
  └── Tailscale          # same mesh
       │
Phone / iPad (on the go)
  └── SSH via Tailscale  # tmux attach from anywhere

Start a complex task on your Mac, detach the tmux session, reattach from your phone on the bus. The agent keeps running.

What Does This Cost?

Three tiers depending on intensity

Casual ($25/mo)

Claude Pro
$20
Hetzner VPS
$5
Ollama
free
Tailscale
free

Power User ($105/mo)

  • Claude Max — $100
  • Hetzner VPS — $5
  • 5x more Claude usage, all models

Team / API ($200-500/mo)

  • API direct — $150-400 (usage-based)
  • Beefier VPS — $20-40
  • For heavy automation and agent teams

Live Demo: Set It Up

Follow along — 15 minutes to a working stack

  • Install Ollama — brew install ollama
  • Pull a model — ollama run llama3.3
  • Create a Modelfile — custom code reviewer persona
  • Install Tailscale — brew install tailscale && tailscale up
  • Set up CLAUDE.md — claude /init in your project
  • Create a skill — build a reusable skill for your workflow
  • Add a hook — auto-format on file writes
  • SSH to VPS — start a persistent tmux session

Minimum viable setup

Even just Ollama + Claude Code + a good CLAUDE.md is a massive upgrade over using AI tools without configuration. Start there, add layers as needed.

Homework

  • Write a CLAUDE.md for your main project
  • Create one custom Ollama persona
  • Set up Tailscale on 2+ devices
  • Try /model haiku for a week of quick tasks

Your Stack,
Your Rules

Local models + Claude Code + VPS + Tailscale

The best AI dev setup is the one you actually use every day. Start simple, add complexity only when it solves a real problem.

agent37.club