DEV Community

Hxmanss
Hxmanss

Posted on

I Built a Dev Tool Without Knowing the Language💀

Last week I had an idea. I wanted to build something developers actually need — something that would get stars on GitHub, something real.
The problem I picked: git mistakes. Every developer, every day, does something dumb in git and then spends 20 minutes on Stack Overflow trying to fix it. git reset --hard gone wrong. Committed to main by accident. Deleted the wrong branch. It's painful and universal.
So I built git-oops — a CLI tool where you just type git oops and it figures out what you broke and fixes it automatically. Interactive menu. No docs. No googling.
Here's the wild part: I don't know Go. I had never written a single line of Go before this. And the whole thing — from idea to shipped binary on GitHub with CI/CD — took 1 hour.

The Stack
Go — ships as a single binary, one-liner install, cross platform. Perfect for CLI tools.
Cobra — CLI framework (same one kubectl and GitHub CLI use)
Bubble Tea — sexy interactive terminal UI
Lip Gloss — terminal styling
GoReleaser — automated cross-platform binary releases
GitHub Actions — CI/CD pipeline

How It Works
The secret sauce is git reflog — git literally records every single thing that happens to your repo. git-oops reads the reflog, detects the most recent mistake pattern, and gives you an interactive fix menu.
bash$ git oops

Detected: committed_wrong_branch
A commit was made on main/master and can be undone safely.

→ Undo commit (keep changes)
Undo commit (discard everything)

↑↓ navigate • enter select • q quit
It handles 6 scenarios:
MistakeWhat git-oops doesCommitted to wrong branchDetects commit on main/master, offers undoAccidental reset --hardFinds previous SHA from reflog, restores itDeleted a branchDetects missing branch and recovers itBad mergeDetects recent merge, resets to ORIG_HEADStaged wrong filesChecks git status, offers rollbackUnknownFalls back to recent history mode
There's also a --dry-run flag that shows you exactly what git commands would run without actually touching anything. Super useful if you're paranoid.

The Real Story
I didn't write the code by hand. I used Trae (AI code editor) with carefully crafted prompts, and had Claude as my "tech lead" guiding every architectural decision and giving me the exact prompts to paste.
The workflow was:

Decide what to build and why (this part was me)
Plan the architecture (Claude + me)
Generate the code (Cursor)
Test, debug, ship (me)

People debate whether this "counts" as building something. Honestly I don't care about that debate. What I care about is: does the tool work? Is it useful? Did I ship it?
Yes. Yes. Yes.

What I Actually Learned|
Even without writing the Go myself, I learned:

How git reflog works under the hood
Why Go is the right choice for CLI tools (single binary = no runtime dependency = easy install)
How GoReleaser + GitHub Actions automate releasing binaries for every OS
How Bubble Tea's Elm-style architecture works for terminal UIs
That distribution beats code quality every time — a mediocre tool that's easy to install beats a perfect tool nobody can find

Try It
bashgo install github.com/hxmanss/git-oops@latest
Then just run it inside any git repo:
bashgit oops
GitHub: github.com/hxmanss/git-oops

If you've ever rage-quit because of a git mistake, this is for you. Drop a star if it helps ⭐
And if you're thinking "I could never build something like this" — bro I didn't know Go. You can do this too. The barrier is lower than you think right now.

Top comments (0)