DEV Community

Cover image for How I Turned My Terminal Into a Blazing-Fast AI Assistant (Without Bloated CLI Tools)
Yash Ambaskar
Yash Ambaskar

Posted on

How I Turned My Terminal Into a Blazing-Fast AI Assistant (Without Bloated CLI Tools)

As a DevOps Engineer, I live in the terminal. But anytime I needed to look up a complex tar flag, debug a weird error, or write a boilerplate bash script, I found myself doing the exact same tedious workflow:

  1. Tab out of the terminal.
  2. Open the browser.
  3. Ask ChatGPT/Claude.
  4. Copy the command.
  5. Tab back and paste.

There are existing AI CLI tools out there, but they are often bloated, require heavy Node/Python environments, or take 5 seconds to respond. I wanted something instant.

So, I built a completely native toolkit directly into my .zshrc using Groq (which runs LLaMA models at 800+ tokens per second).

Here is what it can do:

⚡️ 1. Real-Time Autocomplete (Ctrl+G)

If I forget how to do something, I just type it in plain English: find all pdfs modified in the last 7 days

I press Ctrl+G, and the toolkit intercepts my terminal buffer, fires a 100 ms API call to Groq, and instantly replaces my text with "find." -name "*.pdf" -mtime -7

🚑 2. The fix Command

When a command fails and spits out a massive error, I don't Google it anymore. I just type fix. The script automatically grabs the last failed command from my zsh_history, diagnoses the error, and prints out the corrected command along with a 1-sentence explanation of what went wrong.

⚙️ 3. Git Auto-Commit (gac)

Writing commit messages is a chore. By typing gac, the script grabs my git diff, analyzes the code changes, and generates a standardized, semantic commit message (e.g., feat: update docker-compose redis cache).

🔍 4. System Diagnostics (hog)

Instead of deciphering top or Activity Monitor, I run hog. It scans my CPU and RAM, parses the raw data, and explains in plain English exactly what process is slowing down my machine (and gives me the exact kill -9 command to fix it).

🚀 Get the Code

I decided to open-source the entire toolkit. It's completely free, and I built native versions for macOS (Zsh), Linux (Zsh), and Windows (PowerShell).

All you need is a free Groq API key to power it.

🔗 Check out the repository here: https://github.com/novitaswebworks/zsh-ai-toolkit

Drop a star if you find it useful, and let me know in the comments what terminal tasks you would automate next!

Top comments (0)