I spend half my life in the terminal, and I kept forgetting the exact syntax for some obscure find or awk command. Instead of googling it every time, I built ask.
It’s a simple Bash tool that uses LLMs (like GPT-4 and Gemini) to give me the command I need right there in the shell. It’s saved me countless hours of friction, and it’s become one of my favorite “personality projects” because it solves a problem I face every single day.
Making the Terminal Smarter
Building this was a fun exercise in prompt engineering. I had to figure out how to get the AI to return just the executable command without any of the usual conversational filler. I also wanted to make sure it was safe, so I added a “Dangerous Command Guard” that warns you if you’re about to run something risky like rm -rf /.
Features
- Context Awareness: You can pipe content directly into it (e.g.,
cat file | ask "summarize this"). - Git Integration: It can even suggest commit messages based on what you’ve staged.
- Fast and Lightweight: It’s designed to be non-intrusive, so it doesn’t slow down your workflow.
Usage Example
ask "list all .log files modified in the last 7 days"
# Suggested: find . -type f -name "*.log" -mtime -7
Tech Stack
- Languages: Bash (Linux/macOS), PowerShell (Windows)
- AI Models: OpenAI GPT-4, Google Gemini
- Integrations: GitHub, Git
Leave a comment