惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

月光博客
月光博客
罗磊的独立博客
The GitHub Blog
The GitHub Blog
V
V2EX
Last Week in AI
Last Week in AI
博客园 - 聂微东
MyScale Blog
MyScale Blog
美团技术团队
L
LangChain Blog
博客园 - Franky
腾讯CDC
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园_首页
S
SegmentFault 最新的问题
爱范儿
爱范儿
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Stack Overflow Blog
Stack Overflow Blog
量子位
小众软件
小众软件
宝玉的分享
宝玉的分享
J
Java Code Geeks
Google DeepMind News
Google DeepMind News
D
Docker
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Running a local coding agent on a Mac Mini — the actual s...
Vilius · 2026-06-22 · via DEV Community

Vilius

Running a local coding agent on a Mac Mini

Running a local coding agent on a Mac Mini — the actual setup

By Vilius Vystartas

I have an agent that does my low-stakes coding. File edits, test fixes, build verification. The kind of work you'd normally do yourself but it's faster to delegate. It also writes Playwright tests, reviews code, updates documentation, and runs deploys.

It runs locally — Mac Mini M4, 24 GB. No cloud API calls for the coding part. The orchestration layer still uses a cheap cloud model for planning and routing. The actual file editing is done by Pi, a coding agent that connects to oMLX, an OpenAI-compatible local LLM server.

The same setup can drive Claude Code, Codex, or any coding agent that speaks OpenAI-compatible API. Pi is what I use, but the oMLX server works with anything.

All the model names, config files, and paths are inside the script at the bottom.

Two models

I keep two and swap depending on the task. The 24 GB can't hold both at once.

One as good as I can have on this machine — 9B class, ~20 tok/s. Primary coding model.

Another fast — 4B class, ~27 tok/s. File edits, quick fixes, daily tasks.

The swap script moves one out, brings the other in, restarts the server. Takes about 5 seconds.

What Pi does

  • File edits and refactoring
  • Writing and fixing tests (Playwright, unit tests)
  • Build verification
  • Code review
  • Documentation updates
  • Running deploys

Anything more complex than a one-liner goes through RPC mode. The orchestration layer writes a prompt, Pi executes, the result comes back. No tmux, no process wrangling.

Pi extensions — what they do, why I use them

  • pix-optimizer — ponytail + caveman (lazy dev mode and token compression). Keeps Pi output tight and skips boilerplate.
  • context-mode — workspace routing and tool call interception. Keeps Pi from wandering into the wrong directories.
  • pi-subagents — spawns sub-agents. Parallel work without blocking the main session.
  • pi-workflow-engine — multi-step task orchestration. Lets Pi handle sequences without losing context.
  • pi-mcp-adapter — MCP server connectivity. Connects to context7 and scrapling for external tools.
  • @fgladisch/pi-caveman — additional compression on top of pix-optimizer.

Known issues

  • Can only keep one model loaded at a time. Two = OOM. Swap script handles it.
  • Thinking mode must be disabled. Defaults to chain-of-thought, kills speed.
  • Full chat history in prompts crashes the local model. Prompts must be just the files and changes.
  • Print mode skips safety controls. Use RPC mode for anything non-trivial.
  • First request after a model swap can time out. Retry once.

The blueprint

curl -fsSL https://workswithagents.dev/static/setup-local-llm-pi.sh | sh