Building KaizenSQL - My Dev Journey
Description and use
KaizenSQL is a Go-based CLI that analyzes SQL code using the Groq LLM, offering Mentor, Performance, and Security modes, and features an animated banner via Bubbletea.
Problem
Create a fast, pleasant-to-use CLI tool that analyzes SQL code and provides AI-powered feedback in multiple modes (Mentor, Performance, Security).
Outcome
KaizenSQL delivers quick, AI-enhanced SQL analysis with a user-friendly CLI interface, supporting mentor guidance, performance insights, and security checks, all while maintaining speed and token limits.
Workflow
- 1. Implemented file/directory reading in Go.
- 2. Integrated Groq API using Go-OpenAI client.
- 3. Defined three modes with distinct system prompts.
- 4. Added command-line flags for mode selection.
- 5. Handled token limits by setting MaxCompletionTokens.
- 6. Added animated banner using Bubbletea and Ascii Motion.
- 7. Tested and iterated on performance and error handling.
Evidence
KaizenSQL is a CLI tool written in Go, it analyzes SQL code and supports three modes Mentor/Performance/Security.
I chose another LLM provider for this project. That is Groq API, it has a generous limit to use it properly as a sandbox for testing your AI interactions.
I added a Mentor mode, its value is that it does not solve the problem, but guides you a clue so that you can find the answer yourself.
The fix? just to set the limit explicitly, that's ok for this little project's scope
After some googling I found bubbletea (a TUI framework), this awesome open-source solution was the speedtrack I was looking for.
- Record date: 2026-10-11T00:55:53.927Z