OpsBuddy:基于 Gemma、Ollama 与 Sentry 的隐私优先本地 AI 系统管理导师
🐧 OpsBuddy: A Privacy-First Local AI SysAdmin Mentor (Built with Gemma, Ollama & Sentry)
OpsBuddy 是一款完全本地运行的隐私优先 AI 导师,面向 SysAdmin 与 Linux 命令行培训,基于 Google Gemma 2B 开放权重模型和 Ollama 本地推理,用 Python 与 rich 库构建 CLI 界面。
This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend
What I Built
I built OpsBuddy, a local, privacy-first AI mentor designed specifically for SysAdmin and Linux training in a CLI environment.
I built this for my friend and trainee, Andre, who is currently learning the ropes of server administration. The biggest hurdle for beginners like him is understanding complex error logs without accidentally leaking sensitive server information (like IPs, usernames, or paths) to public cloud AI tools. OpsBuddy solves this by running entirely locally on his machine. It acts as a safe, intelligent sandbox where he can ask technical questions and securely analyze local .log files.
Demo
Here is OpsBuddy in action safely analyzing a local log file, along with the deep-dive performance tracing data captured by Sentry!
Code
How I Built It
OpsBuddy is built around a fully open-source and local stack:
- AI Model: Google's Gemma 2B (open-weight model) for fast, concise, and accurate technical mentoring.
- Local Inference: Ollama to run the LLM efficiently without internet access.
-
Logic & UI: Python combined with the
richlibrary for a beautiful, colorful CLI experience. -
Agent Tracing: Sentry SDK to monitor the AI's performance. I implemented
start_transactionandstart_childspans to track the exact latency of the local inference streaming process whenever Andre interacts with the agent, ensuring the application remains responsive.
Why Does Open Innovation Matter?
Open innovation is the absolute backbone of this project. By utilizing open-weight models like Gemma 2B and open local harnesses like Ollama, OpsBuddy guarantees absolute data privacy. Andre can command the AI to analyze sensitive SSH, database, or application logs without the fear of that data being sent to a closed, third-party API. Open innovation made it possible to build a capable, free-to-use mentor that respects user data sovereignty.
Prize Categories
- Best Use of Gemma
- Best Use of Sentry Agent Tracing
来源:Google AI:DEV 作者专属(RSS) · dev.to

