InstaVM: A Fully Local, Privacy-First Platform for Secure Code Execution with LLMs What if you could run AI-powered tasks — from planning and coding to research and media editing — entirely on your machine, with no cloud, no remote execution, and zero data leakage? That’s the vision behind InstaVM: a secure, local-first platform built for privacy-conscious users who demand full control over their data and workflows. At its core, InstaVM combines a local LLM, containerized code execution via Apple’s new Container tool, and a headless browser — all orchestrated through a lightweight web interface. The result? A self-contained environment where your prompts, code, and files never leave your device. Why Go Local? Mainstream AI tools like ChatGPT or Claude offer powerful capabilities — but they come with a trade-off: your data flows into the cloud. Even with strong security practices, breaches and misconfigurations (like early ChatGPT’s account leakage) show that no system is immune. For sensitive tasks — editing personal videos, analyzing private datasets, or experimenting with code — the risk is simply too high. With open-source LLMs now accessible locally, the dream of full local autonomy is closer than ever. But running a model locally isn’t enough. You need isolation — a secure sandbox where AI-generated code can execute safely, without touching your host system. The Stack: Built for Privacy, Powered by Apple Silicon InstaVM runs entirely on Apple Silicon, leveraging modern tools to create a secure, native experience: Local LLMs (via Ollama and AI SDK) for private, on-device reasoning Apple’s Container for true VM-level isolation — one isolated VM per container, perfect for sandboxed code execution Jupyter server deployed inside a container, exposed via MCP (Model Context Protocol) to enable seamless code execution Playwright integrated into the same container for headless browsing — allowing the system to research online, fetch docs, or explore GitHub without exposing your data Assistant-UI as the frontend, extended with model selection and tool integration MCP integration allows compatibility with tools like Claude Desktop and Gemini CLI, enabling AI agents to run code directly Key Features in Action ✅ Edit videos using ffmpeg: “Cut from 0:10 to 1:00” — executed safely inside a container ✅ Edit images: resize, crop, convert formats — all without touching the host ✅ Generate and render charts from CSVs using plain English ✅ Install tools from GitHub in an isolated environment ✅ Research topics using a headless browser — fetching and summarizing web content securely ✅ Tool-calling support via MCP — enabling interoperability with existing AI tools The Reality of Local Development Building a native Mac app proved unexpectedly difficult. Attempts with a0.dev (designed for iOS) and Electron (for wrapping Next.js) were frustrating — hallucinated steps, platform quirks, and lack of clean tooling slowed progress. In the end, the local web UI proved to be the most reliable, lightweight, and maintainable solution. Challenges & Lessons Learned Apple Container is powerful but unstable in early stages — build failures, hanging processes, and “Trap” errors are common. The workaround? Kill all container processes, remove the buildkit image, and retry. Patience is key. Tool support in Ollama is inconsistent — some models claim tool-calling support but don’t actually enable it. The ecosystem is moving fast, and documentation lags behind. Model choice matters: While we support local models, we also allow access to cloud-based ones for now — to bridge the gap until small local models catch up. Volumes & Isolation: Safe, Shared, But Never Exposed Files are stored in ~/.coderunner/assets on the host and mapped to /app/uploads inside the container. This creates a safe, shared workspace — but code never touches the host system. All execution happens in isolation. What’s Next? Improve model performance and tool support for local LLMs Expand MCP tool ecosystem (e.g., database access, file system tools) Add persistent state and task history Optimize Apple Container builds and improve developer experience Final Thought: Privacy Is Not a Luxury — It’s a Right InstaVM isn’t just a technical experiment. It’s a statement: you should own your data, your code, and your machine. While the largest models may remain in the cloud, we believe there’s a growing need for local, secure tools that empower users to do their daily work without compromise. We built it. Now it’s yours. 👉 Check out coderunner-ui on GitHub and start building locally today. We welcome feedback, contributions, and ideas for the future of private AI.
يُعدّ "InstaVM" منصة لتنفيذ الشفرات الآمنة تعمل بالكامل محليًا، دون الاعتماد على السحابة أو تنفيذ الشفرات عن بُعد. تُلخّص الفكرة الأساسية في بناء نظام متكامل يُمكّن المستخدم من إجراء مهام تتطلب خصوصية عالية — من التخطيط باستخدام نموذج لغوي كبير (LLM) إلى تنفيذ الشفرات داخل بيئة معزولة — كل ذلك دون مغادرة الجهاز الشخصي. في البداية، يُدرك المستخدم أن نماذج مثل ChatGPT أو Claude توفر تجربة تفاعلية عبر الإنترنت، لكنها تعتمد على خوادم سحابية، مما يشكل خطرًا على الخصوصية، خصوصًا بعد حوادث مثل تسريبات المحادثات في مراحل مبكرة من ChatGPT. رغم توفر نماذج لغوية مفتوحة المصدر، فإن مجرد تشغيل نموذج محلي ليس كافيًا. المطلوب بيئة معزولة لتنفيذ الشفرات، مما دفع الفريق إلى تبني مزيج من التقنيات: LLM محلي، وتقنيات تضمين (Container) لعزل التنفيذ، وواجهة ويب للوصول. تم بناء النظام بالكامل على معالجات Apple Silicon، باستخدام أداة "Container" التي أطلقتها آبل — وهي أداة تُنشئ آلة افتراضية منفصلة لكل حاوية، مما يوفر عزلًا أقوى من Docker. تم نشر خادم Jupyter داخل هذه الحاوية، وتم تعريضه كأداة عبر بروتوكول MCP (Model Context Protocol)، مما يسمح لأدوات أخرى مثل Claude Desktop أو Gemini CLI بالاتصال والتنفيذ المباشر للشفرات. فيما يتعلق بالواجهة، تم استخدام "Assistant-UI" كأساس، لكنه لم يدعم اختيار النماذج المحلية بشكل مباشر، لذا تم تكامله مع مكتبة ai-sdk لتمكين قائمة منسدلة لاختيار النموذج. وتم اعتماد نماذج محلية وخارجية على حد سواء، مع نية التحول التدريجي إلى تشغيل كامل محلي مع تحسن الأداء في النماذج الصغيرة. أحد التحديات الرئيسية كان دعم "أداة الاستدعاء" (Tool-calling). ورغم أن بعض النماذج تدعمها، إلا أن Ollama لم يُدخل الدعم بعد لنموذج DeepSeek-R1، رغم تصنيفه كنموذج يدعم الأدوات على موقعه. هذه الفجوة في التحديثات تُظهر التحديات التي تواجه المشاريع المفتوحة المصدر في مواكبة التطور السريع في مجال الذكاء الاصطناعي. تم أيضًا دمج متصفح بدون واجهة (Headless Browser) باستخدام Playwright، مُضمنًا في نفس الحاوية، لتمكين النظام من البحث عن معلومات حديثة — مثل تعليمات تثبيت أدوات من GitHub — أو تلخيص محتوى صفحات ويب، مما يُعد خطوة نحو بناء نظام قائم على البحث والتحديث التلقائي. تم ربط مجلد محلي (~/.coderunner/assets) بمجلد داخل الحاوية (/app/uploads) لضمان بقاء الملفات المُنشأة أو المُعدّلة آمنة ومتاحة، مع ضمان عدم تلامس الشفرات مع النظام الأساسي. النظام قادر على مهام متعددة: تحليل بيانات ورسم مخططات من ملفات CSV، تعديل مقاطع فيديو باستخدام ffmpeg، تعديل الصور (تكبير، قص، تحويل تنسيق)، تثبيت أدوات من مخازن GitHub داخل بيئة معزولة، واستخدام المتصفح لجمع المعلومات. رغم التحديات التقنية — مثل تعطل عمليات البناء في أداة Apple Container التي تتطلب إعادة تشغيل متكررة وحذف الصور — فإن النظام يعمل بشكل موثوق. الهدف الأسمى ليس مجرد تجربة تقنية، بل تحوّل فكري: إعادة السيطرة على الحوسبة والذكاء الاصطناعي إلى الجهاز الشخصي، دون تفويض البيانات إلى شركات كبرى. هذا النظام ليس حلًا مثاليًا بعد، لكنه نموذج عملي يُظهر إمكانية العمل المحلي الآمن. النظام مفتوح المصدر، ويمكن استخدامه عبر مشروع coderunner-ui على GitHub، ويدعو الفريق المستخدمين للتجربة، وإرسال الملاحظات والمساهمات.