DEV Community

Kane Fuller
Kane Fuller

Posted on

How to Run Claude Code as an Autonomous Agent on a Mac Mini

Most Claude Code tutorials show you how to use it interactively — you type a prompt, it responds, you refine. That's useful. It's not what I'm doing.

I'm running Claude Code as an autonomous agent on a Mac Mini M4. It writes content, publishes articles, logs to Obsidian, and runs on a schedule. No babysitting.

Here's exactly how I set it up.

The Hardware

Mac Mini M4. $700 from Apple. The reason I picked it over a cloud VPS:

  • Always-on without a monthly compute bill
  • Local file access for the Obsidian vault (my agent's memory)
  • Runs cool, quiet, draws ~18W at idle
  • Fast enough for agent tasks — the bottleneck is API calls, not CPU

A cloud VPS works if you want remote access. But for local automation that reads and writes your files, a home machine is simpler and cheaper long-term.

How Claude Code Runs Without You

Claude Code can be driven via the CLI with the --print flag:

claude --print "Run the Friday article task" \
  --allowedTools "Bash,Read,Write,Edit"
Enter fullscreen mode Exit fullscreen mode

You wrap this in a shell script, point it at your project directory, and schedule it. That's the entire mechanism.

The actual instructions live in CLAUDE.md — a markdown file at the root of your project. Claude Code reads this on every session start. Mine defines:

  • What the agent's job is (build Claw Labs to £10k/month revenue)
  • Which files to read first on startup
  • The weekly publishing schedule
  • What to do when a task completes
  • What not to do (no made-up revenue numbers, no padding)

CLAUDE.md is a system prompt that persists across sessions. Without it, you're re-explaining context every run. With it, the agent picks up where it left off.

Scheduling the Runs

On macOS, launchd handles scheduling. A .plist file in ~/Library/LaunchAgents/ defines when to run your script and captures logs. Cron works too — simpler to write, but macOS can suspend it during sleep.

For event-driven triggers — "run after a Gumroad sale", "post only if the queue has content" — I use Make.com. One scenario watches a webhook, another polls Airtable. Conditional logic lives in Make. Time-based logic lives in launchd.

If you haven't used an automation platform before, Make.com is the fastest way to wire conditional flows without writing infrastructure. Free tier is functional. I'm on the starter plan (~$9/month). Worth it to avoid managing a webhook server yourself.

What My Agent Actually Handles

Right now the autonomous pipeline covers:

  • Friday: Dev.to article (this one)
  • Monday: Substack revenue report
  • Saturday: Long-form Substack build log
  • Continuous: Logging everything back to Obsidian vault

Each task is a spec file the agent reads and executes. It doesn't improvise — it reads the spec, does the work, logs the output, and moves on.

The Workflow Kit (£14.99 on Gumroad) includes the Make scenario JSON files and folder structure I use for this. If you want to replicate the pipeline without building it from scratch, that's the shortcut.

Honest Assessment

Week 12 of building this. Revenue: £1 (a self-purchase to unlock Gumroad Discover). The pipeline works. The content is publishing. Revenue hasn't followed the volume yet.

That's the real number. Publishing vague "AI automation earned me money" content is easy. Publishing the actual stack and the actual numbers is more useful — and it's how I'd want to find this kind of article if I were searching for it.


If you want the CLAUDE.md template, the launchd .plist, and the full project folder structure I use, grab the free Autonomous Agent Starter Kit below.

Get the free Starter Kit →

Top comments (0)