<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Davron Yuldashev</title>
    <description>The latest articles on DEV Community by Davron Yuldashev (@davron_yuldashev_0a91802f).</description>
    <link>https://dev.to/davron_yuldashev_0a91802f</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3823452%2F5396bf1b-c0bf-4cf4-ad48-4a933efd3e8a.jpg</url>
      <title>DEV Community: Davron Yuldashev</title>
      <link>https://dev.to/davron_yuldashev_0a91802f</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/davron_yuldashev_0a91802f"/>
    <language>en</language>
    <item>
      <title>I built a process manager with built-in crash detection and AI auto-fix (PM2 alternative)</title>
      <dc:creator>Davron Yuldashev</dc:creator>
      <pubDate>Sat, 14 Mar 2026 10:42:06 +0000</pubDate>
      <link>https://dev.to/davron_yuldashev_0a91802f/i-built-a-process-manager-with-built-in-crash-detection-and-ai-auto-fix-pm2-alternative-ol4</link>
      <guid>https://dev.to/davron_yuldashev_0a91802f/i-built-a-process-manager-with-built-in-crash-detection-and-ai-auto-fix-pm2-alternative-ol4</guid>
      <description>&lt;p&gt;You deploy a service, it crashes at 3 AM. You get a Sentry alert, SSH in, dig through logs, try to figure out what happened. Or you pay $26/month for Sentry plus integrate the SDK into every project.&lt;/p&gt;

&lt;p&gt;I wanted crash detection and recovery built directly into the process manager — no extra services, no SDK, no dashboards. So I built &lt;a href="https://github.com/Dave93/velos" rel="noopener noreferrer"&gt;Velos&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;When a process crashes or throws an unhandled error, Velos detects it, runs AI analysis on the logs and stack trace, and sends a Telegram message with two buttons: &lt;strong&gt;Fix&lt;/strong&gt; and &lt;strong&gt;Ignore&lt;/strong&gt;. Tap Fix — an agent reads the logs, inspects the code, diffs recent changes, proposes a fix, and reports back. All without waking up your laptop.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the crash flow works
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Process crashes (or stderr matches panic/traceback/FATAL pattern)
  → Velos daemon detects it
  → AI analysis runs (Anthropic or any OpenAI-compatible API)
  → Telegram notification with [Fix] [Ignore] buttons
  → You tap Fix
  → Agentic loop starts: reads files, inspects git diff, runs commands
  → Result sent back to Telegram
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Nothing happens without your approval. The agent has tools to read/edit files, run commands, and inspect git history — but it only acts when you tap Fix.&lt;/p&gt;

&lt;p&gt;This also works for runtime errors &lt;em&gt;before&lt;/em&gt; a crash. Velos watches stderr for panic/traceback/FATAL/ERROR patterns and fires an alert without waiting for the process to die. Closer to what Sentry does — but zero SDK, zero extra service.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Zig for the daemon?
&lt;/h2&gt;

&lt;p&gt;Process management is fundamentally a systems problem: fork/exec, Unix sockets, signal handling, CPU/RAM monitoring via syscalls. Zig gives full control with zero runtime overhead — no hidden allocations, no GC, comptime metaprogramming for tight control over the binary.&lt;/p&gt;

&lt;p&gt;The result: &lt;strong&gt;~3 MB RAM idle&lt;/strong&gt;, ~65 KB per managed process. PM2 sits at ~60 MB baseline because of V8.&lt;/p&gt;

&lt;p&gt;Architecture:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Zig daemon (fork/exec, IPC, monitoring)
    ↓  C ABI FFI
Rust shell (CLI, REST API, MCP server, log engine, AI)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Zig core compiles to a static library (&lt;code&gt;libvelos_core.a&lt;/code&gt;), linked into the Rust binary via C ABI FFI. Single binary, zero runtime dependencies.&lt;/p&gt;

&lt;p&gt;IPC uses a binary protocol — 7-byte header (magic &lt;code&gt;0xVE10&lt;/code&gt;) + MessagePack payload over a Unix socket.&lt;/p&gt;

&lt;h2&gt;
  
  
  Smart Log Engine
&lt;/h2&gt;

&lt;p&gt;Pattern clustering, error rate tracking, anomaly detection — runs fully local, zero LLM cost.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;velos logs myapp &lt;span class="nt"&gt;--summary&lt;/span&gt;
&lt;span class="c"&gt;# → "47 errors in last 10m, 3 patterns detected:&lt;/span&gt;
&lt;span class="c"&gt;#    [1] DB connection timeout (×31)&lt;/span&gt;
&lt;span class="c"&gt;#    [2] Rate limit exceeded (×12)&lt;/span&gt;
&lt;span class="c"&gt;#    [3] File not found (×4)"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead of scrolling through thousands of raw log lines, you get a digest.&lt;/p&gt;

&lt;h2&gt;
  
  
  MCP server (for local AI workflows)
&lt;/h2&gt;

&lt;p&gt;Velos also ships with a native MCP server — 13 tools for Claude Desktop or Claude Code to manage your local processes directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"velos"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"velos"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"mcp"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"start"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Tools include: &lt;code&gt;start_process&lt;/code&gt;, &lt;code&gt;stop_process&lt;/code&gt;, &lt;code&gt;restart_process&lt;/code&gt;, &lt;code&gt;get_logs&lt;/code&gt;, &lt;code&gt;health_check&lt;/code&gt;, &lt;code&gt;get_metrics&lt;/code&gt;, &lt;code&gt;search_logs&lt;/code&gt;, &lt;code&gt;analyze_crash&lt;/code&gt;, and more. Useful for local dev environments where your AI agent is already running on the same machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://releases.velospm.dev/install.sh | bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or Homebrew:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew &lt;span class="nb"&gt;install &lt;/span&gt;Dave93/tap/velos
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Current state
&lt;/h2&gt;

&lt;p&gt;Velos is at v0.1.14, production-ready on macOS and Linux. Windows support is on the roadmap.&lt;/p&gt;

&lt;p&gt;What's coming next:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;XDG Base Directory compliance (tracking: &lt;a href="https://github.com/Dave93/velos/issues/10" rel="noopener noreferrer"&gt;#10&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Plugin system&lt;/li&gt;
&lt;li&gt;Web dashboard&lt;/li&gt;
&lt;li&gt;Benchmark suite vs PM2/supervisord/systemd&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/Dave93/velos" rel="noopener noreferrer"&gt;Dave93/velos&lt;/a&gt;&lt;br&gt;
Docs: &lt;a href="https://velospm.dev" rel="noopener noreferrer"&gt;velospm.dev&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Happy to answer questions about the crash detection system, the Zig/Rust architecture, or the design decisions. What would you have done differently?&lt;/p&gt;

</description>
      <category>rust</category>
      <category>zig</category>
      <category>devops</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
