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 isn’t just a way to run commands—it’s 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 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
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.
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.
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.
Add PUBLIC_BEEHIIV_PUBLICATION_ID to .env.local to enable the real Beehiiv embed.
Discussion
Comments
Powered by GitHub Discussions — requires a GitHub account.