Terminal Velocity: The CLI as your AI Abstraction Layer
TL;DR
In a modern AI lab, your throughput is limited by your context-switching overhead. If you’re constantly alt-tabbing to a browser to paste error logs or commit messages, you’re bleeding focus. I run everything from a highly customized WSL2 instance because the terminal is the native interface for the “Intelligence Layer.” By piping the OS directly into an LLM, I’ve reduced my “Idiot-Work” (formatting, commit messaging, log hunting) to near zero.
The move was not ideological. My IDE kept failing on PowerShell and Bash commands, over and over, and the terminal simply did the thing. That was the entire conversion.
The Architecture
My workflow treats the shell as a Composable Data Pipeline. The output of any command - a failed build, a git diff, or a curl response - is just text. Text is the primary language of LLMs.
| Component | Tool / Config | Rationale |
|---|---|---|
| Shell | Zsh + Oh My Zsh | Plugin ecosystem and superior tab-completion. |
| Terminal | Windows Terminal | Best-in-class multi-tab and GPU rendering for Windows. |
| Multiplexer | Tmux | Persistent sessions across WSL2 restarts. |
| Font | MesloLGS NF | Required for Powerlevel10k and iconography. |
| AI CLI | fabric / ollama | Lightweight wrappers for piping text to brains. |
The Build
The real power lives in your .zshrc. I don’t use complex agents for simple tasks; I use shell functions that talk to my GekroLLMClient.
1. AI-Powered Git Commits
Stop writing “fix” as a commit message. This function stages your changes, sends the diff to a local Llama 3 instance, and generates a conventional commit message.
# Generate AI commit message from staged changes
aic() {
local diff=$(git diff --cached)
if [ -z "$diff" ]; then
echo "No staged changes found."
return 1
fi
echo "Generating commit message..."
local msg=$(echo "$diff" | ollama run llama3 "Generate a concise, one-line conventional commit message for this diff. No preamble.")
git commit -m "$msg"
}
2. The Explain Pipe
Every time a command fails, I pipe it. No more googling obscure C++ error codes.
# Pipe any output to LLM for instant explanation
alias explain="ollama run llama3 'Explain this error output and suggest a fix concisely:'"
# Usage:
# npm run build | explain
3. WSL2 Configuration Note
To make this feel like a native Linux experience on Windows, you need to fix the path and font quirks.
Windows Terminal settings.json fragment:
{
"guid": "{57605e5d-1f0f-5602-9ae4-0466a014995f}",
"name": "Ubuntu-22.04",
"source": "Windows.Terminal.Wsl",
"font": {
"face": "MesloLGS NF",
"size": 12
},
"startingDirectory": "//wsl$/Ubuntu-22.04/home/rohit"
}
Tip: Always use the //wsl$/ path format in Windows applications to avoid the NTFS/9P performance penalty.
The Tradeoffs
Setting this up cost me hours I had not budgeted. I was trying to get a model to walk me through the WSL2 and Zsh configuration, and it sent me round in loops - this was the second Gemini generation - handing me a command with total confidence, watching me paste it, watching it fail, then handing me another one. I got there by reading the actual documentation, like it was 2015. If you are doing this setup, budget an afternoon and skip the shortcut.
The biggest failure I see engineers make is Alias Overload. I once had 200+ aliases and spent more time remembering the shortcut than I would have spent typing the command. I’ve since pruned them down to the “High-Frequency Five”: aic (AI commit), gup (Docker Compose Up), ld (Log Dump), pf (Python Format), and explain.
Operational reality: Piping sensitive logs to a cloud LLM is a security breach waiting to happen. I learned this when I accidentally sent a production .env file containing clear-text credentials to a cloud provider because it was caught in a grep I piped to an “explain” alias. Always use a local Ollama instance for shell piping to ensure your environmental variables stay on your machine.
One more, and it takes some air out of the title. I use both now. The terminal won the jobs it is good at, the GUI kept the ones it is good at, and somewhere along the way I stopped keeping score. If you came for a conversion story with a clean ending, that is the honest version.
Where This Goes
I’m currently building a Terminal-to-Action bridge. Instead of just explaining an error, the shell function will propose a sed or patch command, and I can press Y to apply the fix directly. The terminal isn’t becoming obsolete; it’s becoming the cockpit for every agent we build.
Continue Reading
Related from the lab
Financially Air-Gapping A Raspberry Pi AI Swarm
How I turned a Pi 5 into a localized orchestrator using an MCP router and isolated OpenClaw worker networks to slash API costs.
The Linux Edge: Why AI Breathes Better in the Kernel
Why I stopped fighting Windows registry errors and moved my entire AI engineering lab to WSL2 and Ubuntu Server.
Written by
Rohit BuraniAI engineer building local-first systems, self-hosted infrastructure, and autonomous tools from the lab.
The Lab Newsletter
Get notified when I build
something worth sharing.
No filler. No frequency commitment. Just the experiments, tools, and breakdowns I'd want to read myself.
Discussion
Comments
Powered by GitHub Discussions - requires a GitHub account.