docktui
v0.1.1
Published
Docker Desktop for your terminal — a lightweight TUI for managing containers, images, and volumes
Maintainers
Readme
Install
Run it without installing:
npx docktuiOr install globally:
npm install -g docktui
docktuiFeatures
- Compose-aware Stacks view — containers grouped by project with running / errored / stopped counts, collapsible per stack.
- Containers / Images / Volumes — live CPU and memory stats, start / stop / restart / kill / remove with confirm dialogs.
- Detail panel — full metadata, mounts, environment, live CPU/MEM bars.
- Streaming log viewer with follow mode, scrollback cap, and color-coded stdout/stderr.
- Filter — press
/from Stacks to filter by stack, service, or image name. - Side rail navigation —
1–4orTabcycles views; click a live stack to jump to it. - Help overlay — press
hanywhere (except confirm dialogs / the stack filter) to toggle the key-binding reference. - Shell into containers —
xopens an external terminalexec'd into the selected container (macOS Terminal, Windows Terminal, common Linux emulators). - Honors
DOCKER_HOST— works with rootless Docker, podman, and remote daemons.
Requirements
- Node.js 20 or later
- A running Docker daemon (Docker Desktop on macOS/Windows, Docker Engine on Linux, or any podman/rootless setup)
- A 256-color or truecolor terminal (
TERM=xterm-256colororCOLORTERM=truecolor)
Configuration
Custom Docker host
docktui auto-detects the daemon socket. To point it elsewhere, set DOCKER_HOST:
DOCKER_HOST=unix:///run/user/1000/docker.sock docktui # rootless docker
DOCKER_HOST=unix:///run/user/1000/podman/podman.sock docktui # podman
DOCKER_HOST=tcp://10.0.0.5:2375 docktui # remote daemon
DOCKER_HOST=npipe:////./pipe/docker_engine docktui # Windows named pipeShell-into-container (x key)
Requires the docker CLI to be on your PATH. docktui launches your platform's native terminal with docker exec -it <id> sh (falls back to bash if available inside the container).
Key bindings
Global
| Key | Action |
|-----|--------|
| 1 – 4 | Jump to Stacks / Containers / Images / Volumes |
| Tab / Shift+Tab | Cycle views |
| h | Toggle help overlay |
| q / Ctrl+C | Quit |
Stacks
| Key | Action |
|-----|--------|
| ↑ ↓ / j k | Navigate tree |
| → / ← | Expand / collapse stack |
| Enter | On a stack: toggle expand. On a service: open detail panel |
| / | Open filter (Esc to clear) |
| l | Open log viewer |
| x | Shell into selected running container |
| s / r / k | Stop / restart / kill running container (confirm) |
| S | Start stopped container |
| d | Remove stopped container (confirm) |
Containers
Same per-container actions as Stacks. Enter always opens the detail panel.
Detail panel
Same container actions as the list/tree (l, s, r, k, S, d, x) plus:
| Key | Action |
|-----|--------|
| e | Toggle environment variables (expanded / collapsed) |
| ↑ ↓ | Scroll |
| Esc | Close |
Log viewer
| Key | Action |
|-----|--------|
| f | Toggle follow mode |
| g | Scroll to top |
| G | Scroll to bottom, re-enable follow |
| ↑ / k | Scroll up (disables follow) |
| Esc | Close |
Images & Volumes
| Key | Action |
|-----|--------|
| ↑ ↓ / j k | Navigate list |
| d | Delete unused item (confirm) |
Confirm dialog
| y / Y to confirm · n / N / Esc to cancel |
|-----------------------------------------------------|
Troubleshooting
permission denied on the Docker socket (Linux)
Add your user to the docker group, then log out and back in:
sudo usermod -aG docker $USERWindows: cannot connect to the daemon
By default docktui tries the named pipe //./pipe/docker_engine. If that fails, enable TCP in Docker Desktop (Settings → General → Expose daemon on tcp://localhost:2375 without TLS) and run:
DOCKER_HOST=tcp://localhost:2375 docktuidocktui requires a 256-color (or truecolor) terminal
Your $TERM is too narrow. Set it explicitly or use a modern terminal:
TERM=xterm-256color docktuiThe 'docker' CLI is not on your PATH
You hit x (shell into container) but the docker binary isn't installed or isn't on PATH. Install Docker CLI or skip the x action — everything else works without it.
Development
git clone https://github.com/0xShady/docktui.git
cd docktui
npm install
npm run dev # run from source with ts-node
npm run build # compile to dist/
npm start # run compiled output
npm test # vitest, one-shot
npm run test:coverage # generate ./coverage/index.html
npm run lint
npm run formatSee CONTRIBUTING.md for the pre-PR checklist and CHANGELOG.md for release history.
License
MIT © Achraf El Fadili
