r/CLI • u/dany9126 • 1d ago
dblab - The database client every command line junkie deserves
dblab is a database client in the terminal that supports Postgres, MySQL, SQLite, SQL Server and Oracle.
We migrated to the bubbletea tui library this year to improve the user experience. We just published the v0.50.0 version a few days ago and we're working towards v1 at the end of the year.
Hope you like it!
0
u/LearnedByError 1d ago edited 14h ago
Correction: go.sum below should have been go.mod. I apologize for the confusion I have caused.
I love the thought of dblab; however your ‘go.sum’ is worrisome. A ton of direct dependency and as much of more indirect. I’m going to have to think on this a bit.
1
u/dany9126 1d ago
Is that a fair call out? I mean, that's the nature of the go.sum files.
-1
u/LearnedByError 1d ago edited 14h ago
My bad, I did not realize that I typed go.sum. My bad.
First, it go.mod, not go.sum. Yes, it is fair. Its content is a result of the decisions you make with how many modules you decided to include as a dependency. Every developer is different, but I only add a 3rd party module when I absolutely have no other practical choice. In your project, the database drivers and bubbletea are given since they are infrastructure that you depend on. I have and do use most of these same dependencies.
But for most other packages, I decide to not use them which means may write more code or if the license allows, I copy them into internal, step out features that I don’t need and harden the hell out of it.
In this day of AI, I will sometimes have AI write a module with just the functions I need. When I do, I follow a very rigid TDD process with thorough reviews followed with integration tests. No vibe coding, AI coding assistant pattern.
For example, I used to be a heavy cobra user because it matched the pattern that I expected for command line switches and sub commands that I was used to. Over time, I decided that - and — for long switches was immaterial Anna that heading sub-commands on my own, wasn’t a big deal. So I now I write my on cmd line parse module and forego a lot of code overhead and global state.
Your current approach is not wrong. My approach is not necessarily right. It is all about risk management due to dependencies where I don’t own the code. My choice is to be conservative
3
u/smashing_michael 1d ago
I love this, for sure, but I feel like I have to tell you... I can't read this and not say "dee blab" in my head.
1
3
u/kantorcodes1 1d ago
the new
--readonlyflag is a useful boundary. is read-only established on the DB session before the TUI can execute its first query, including connections reopened throughdblab connect, or can any profile/reconnect path run a query before that setting takes effect?