Skip to content
Go back

lazygit + lazydocker + lazysql: TUI Wrappers Worth Using

By SumGuy 9 min read
lazygit + lazydocker + lazysql: TUI Wrappers Worth Using
Contents

You’re Typing docker ps Too Much

You don’t need to memorize flag combinations for tools you use daily. That’s what TUI wrappers are for. They’re the difference between hunting for documentation and just… knowing where the button is.

I’m talking about lazygit, lazydocker, and lazysql, three terminal UI tools that sit between you and the CLI and ask the simple question: “What if you didn’t have to remember everything?”

This isn’t about abandoning the command line. It’s about being smarter about when to use a wrapper instead. And honestly, once you’ve got the keybinds muscle-memoried, you’ll be faster than someone alt-tabbing through docs.


lazygit: Stop Fighting with Git

lazygit is a git wrapper for people who’ve memorized way too many flag combinations and then forgotten them at 3 AM when you’re rebasing a branch you shouldn’t have created.

Install lazygit

Terminal window
# macOS
brew install lazygit
# Linux (Arch)
pacman -S lazygit
# Linux (Debian/Ubuntu)
LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[0-9.]+')
curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz"
tar xf lazygit.tar.gz lazygit
sudo install lazygit /usr/local/bin

Start it: lazygit from any git repo.

The Workflow

You land in a UI with five panels: branches, commits, files, stash, and the main log. It sounds crowded, but it’s not. Everything you need is visible at once.

Key keybinds:

The genius part: in the commits panel you just act on commits directly. Highlight one and press s to squash it into the one below, f to fixup (squash but drop the message), e to edit, r to reword, d to drop. Reorder commits with Ctrl+j/Ctrl+k. Then bring up the rebase options menu with m and continue. No rebase -i nonsense, no counting commits, no editing a pick/squash/reword todo file by hand.

Real Workflow: Cleanup Before Pushing

You’ve been committing like you’ve got unlimited storage. Four commits that should be one. A debug print you forgot to remove.

  1. lazygit
  2. Go to the commits panel, navigate to the commits you want to combine
  3. Use Ctrl+j/Ctrl+k to move your scattered commits together
  4. Highlight a commit and press s to squash it into the one below (repeat for each)
  5. Press m → continue, to wrap up the rebase
  6. Done

Compare that to: git rebase -i origin/main, manually editing the file, understanding pick/squash syntax, running git push --force-with-lease, and praying.

One keybind combo beats one hour of StackOverflow tabs.


lazydocker: Containers Without the Flag Parade

lazydocker does for Docker what lazygit does for git. You stop living in docker ps | grep territory and start actually seeing your infrastructure.

Install lazydocker

Terminal window
# macOS
brew install lazydocker
# Linux
curl https://raw.githubusercontent.com/jesseduffield/lazydocker/master/scripts/install_update_linux.sh | bash

Start it: lazydocker.

The Workflow

You get a TUI with containers on the left, images below them, and logs/stats on the right. That’s it. No hunting for container IDs. No docker logs -f --tail 100 <container-id-that-you-had-to-copy>.

Key keybinds:

Real Workflow: Debug a Misbehaving Container

Your app is spitting errors. You need logs, you need to check env vars, you need to verify a config file exists.

  1. lazydocker
  2. / → type your container name
  3. Hit Enter, container is selected
  4. m: instant logs, scrollable
  5. E/bin/bash: you’re inside the container
  6. cat /app/config.yml: check your config
  7. env | grep API: check env vars
  8. exit: back to the TUI
  9. Ctrl+c: quit

That’s one workflow. No docker IDs, no juggling multiple terminal windows, no docker inspect <id> | jq '.Config.Env'.

The logs panel alone is worth the install. No more docker logs <id> | tail -100 | grep ERROR. Just l and scroll.


lazysql: SQL Without Memorizing Schemas

lazysql is a TUI for databases. It speaks Postgres, MySQL, SQLite, and MSSQL. You navigate your schema, run queries, see results, all in the terminal. No more psql fumbling or opening a GUI tool that wants to install 500 MB of dependencies.

Install lazysql

Terminal window
# macOS/Linux
brew install lazysql
# Requires Go 1.23+
go install github.com/jorgerojas26/lazysql@latest
# Or pre-built binaries
curl -L https://github.com/jorgerojas26/lazysql/releases/latest | grep -o 'href="[^"]*lazysql.*linux.*64[^"]*"' | head -1 | cut -d'"' -f2 | xargs curl -Lo lazysql
chmod +x lazysql
sudo mv lazysql /usr/local/bin

Start it: lazysql (it’ll prompt for connection details) or pass a connection URL directly, like lazysql postgres://user:pass@localhost/dbname or lazysql mysql://user:pass@localhost/dbname.

For SQLite: lazysql /path/to/database.db

The Workflow

Left panel shows your tables and views. Center shows your current table data. Right shows query results. Column headers are always visible. Pagination is built in.

Key keybinds:

Real Workflow: Debug a Data Issue

Your app is showing wrong data in production. You need to check if it’s a DB corruption or app logic.

  1. lazysql (connect to prod Postgres)
  2. / → type table name → navigate to the problematic table
  3. See 50 rows at a time, scrollable
  4. Ctrl+E → write a custom query, then Ctrl+R to run it:
SELECT id, created_at, status FROM orders WHERE user_id = 12345 ORDER BY created_at DESC LIMIT 20;
  1. Results appear in the right pane, copy-pasteable
  2. Find the corrupt record, c to edit the cell directly, or Ctrl+E/Ctrl+R to run a corrective UPDATE

No opening psql, no struggling with connection strings, no copy-pasting IDs into your terminal. The data is right there.


When TUI > CLI: The Decision Tree

This is important: TUI wrappers aren’t always the answer.

Use the TUI when:

Use raw CLI when:

Real example: You’re writing an Ansible playbook that needs to restart a Docker container. You don’t lazydocker in your playbook. You docker restart <name>. But when you’re debugging why the container failed, you lazydocker to check logs and stats.


Keybind Muscle Memory: How You Get Fast

Here’s the secret nobody talks about: the first time you use these tools, you’ll forget half the keybinds. The second time, you’ll remember 70%. By day five, your fingers will move without thinking.

The speed-up comes from your brain not having to switch contexts, not from the tools being fast. You don’t leave the editor to Google git rebase flags. You don’t leave the terminal to open Sequel Pro. You don’t open StackOverflow to remember if it’s docker stop or docker kill.

Pin the help (?) key. Use it liberally. Most people don’t realize these tools have built-in help that’s actually good. Not a man page you have to parse, just a list of keybinds for your current view.


Making It Habitual: Add Aliases

This is dumb but it works. I have these in my shell config:

Terminal window
alias lg='lazygit'
alias ld='lazydocker'
alias lsql='lazysql'

Now when I open a terminal, muscle memory takes over. lg, enter, and I’m managing git interactively. ld, enter, and I’m checking container logs. It’s 20 keystrokes shorter per invocation, and it compounds.


Worth Your Time or Bloatware?

These tools add ~50 MB to your system combined (binaries + dependencies). In 2026, that’s… nothing. A single Docker image is bigger.

The real question: do you use git, Docker, or SQL databases regularly? If yes, one of these will save you hours per month. Not “five minutes on a Tuesday.” Hours. The logistical overhead of hunting for flags, copy-pasting IDs, remembering which docker ps column is the container name; it adds up.

Your future self at 2 AM, trying to debug why a deployment went sideways, will thank you.


Next Moves

  1. Install one. Probably lazygit if you commit code daily.
  2. Open help with ? and spend five minutes reading keybinds.
  3. Use it for one real task. Don’t read tutorials; just fumble through.
  4. The muscle memory happens after three or four uses.
  5. Alias it so you default to the TUI over raw CLI.

That’s it. No YouTube tutorials, no 30-minute setup guides. Install, use, muscle-memory wins.

You’ve got 50 terminals open and a cup of cold coffee. Make your terminal time count.


Share this post on:

Send a Webmention

Written about this post on your own site? Send a webmention and it'll show up above once verified.


Previous Post
Nominatim: Self-Hosted Geocoding
Next Post
direnv + asdf vs mise

Discussion

Powered by Garrul . Sign in with GitHub or Google, or post anonymously.

Related Posts