"Vibecode-Project-001 - An Ollama Brain Visualizer"

[powershellollamaaiterminal]

I run Ollama locally. Models load, inference runs, responses come back -- and the whole time the process is completely silent. No indication of whether the GPU is grinding through a complex prompt or whether everything quietly died three minutes ago.

So I built a thing.


OllamaBrain.ps1 is a PowerShell script that renders a live ASCII brain in your terminal, driven by your local Ollama instance. The brain pulses, heats up, and shifts colour based on what the model is actually doing right now.

It started as a simple log parser. Then I looked at what Ollama actually writes to server.log on Windows -- and most of what I assumed would be there wasn't. Tokens per second, evaluation duration, none of it hits the log file. That data lives in the API response body only.

So the brain runs off two real signals instead. First: CPU utilisation across all ollama* processes, sampled every 700ms using process delta timing. This reacts the moment inference starts -- no log file latency. Second: an exponential decay from the timestamp of the last completed request pulled from Gin HTTP log lines. The brain stays warm for a couple of minutes after inference finishes, then slowly cools to idle.

The colour system maps activity level to a cool-to-hot progression. Slate gray at dormant, sky blue at low load, emerald through moderate, amber under heavy load, and rose red when the CPU is genuinely pegged. The fissures and sulci running through the brain shift from violet to fuchsia as activity climbs. Hit a new session peak and the whole brain flashes white, gold, and pink for a few seconds.

There's a -IncludeHistory flag that scans rotated server-*.log files to establish your all-time baseline. When the current session beats it, you get the celebration flash.

# Standard run -- watches log every second, CPU every 700ms
.\Invoke-OllamaBrain.ps1

# With lifetime history scanning
.\Invoke-OllamaBrain.ps1 -IncludeHistory
← Back to blog