dtree

command module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2026 License: MIT Imports: 7 Imported by: 0

README

dtree

A terminal UI that lists your Docker containers grouped by Compose project. Expand a project to see its containers, then open their logs, inspect them or open a shell, all with vim keys or the arrow keys.

  • Containers are grouped by the com.docker.compose.project label; containers outside Compose are listed under (standalone).
  • The list updates live from Docker's event stream.
  • An info panel below the list shows details for the selected container (image, status, ports) or project (directory, compose file, ports, networks, volumes).
  • Logs and inspect open in a built-in viewer with search, follow and line wrap. Inspect output is shown as YAML.

Install

Requires Go and the docker CLI.

go install github.com/sebastianmorch/dtree@latest

The binary is installed to $(go env GOPATH)/bin (usually ~/go/bin). Make sure that directory is on your PATH:

export PATH="$HOME/go/bin:$PATH"

Usage

dtree          # running containers
dtree -a       # all containers, including stopped ones
dtree --version

dtree connects to the daemon in DOCKER_HOST or, if that is unset, the current docker context (Docker Desktop, OrbStack, Colima, …).

Keys

Press ? inside dtree for this list.

Tree
Key Action
j / ↓, k / ↑ next / previous row
l / → expand project
h / ← collapse project / go to parent
enter toggle project · shell on container
space toggle project · logs on container
g / G top / bottom
/ or f filter by container or project name
esc clear filter
L logs
i inspect
s shell (bash, falls back to sh)
a toggle running / all containers
r refresh
q / ctrl+c quit
Logs & inspect
Key Action
j / k, ↓ / ↑ scroll
ctrl+d / ctrl+u half page down / up
g / G top / bottom (G resumes follow)
/, n, N search, next, previous
f toggle follow (logs)
t toggle timestamps (logs)
r refresh (inspect)
w toggle line wrap
q / esc back

Development

go run .        # run from source
go test ./...

License

MIT

Documentation

Overview

Command dtree shows Docker containers grouped by compose project, with vim-style navigation, a log viewer, inspect and shell access.

Directories

Path Synopsis
internal
docker
Package docker wraps the Docker Engine SDK behind a small interface the UI depends on, so the UI can be tested with a fake.
Package docker wraps the Docker Engine SDK behind a small interface the UI depends on, so the UI can be tested with a fake.
tree
Package tree groups containers into projects and tracks the cursor and expand/collapse state of the project/container tree.
Package tree groups containers into projects and tracks the cursor and expand/collapse state of the project/container tree.
ui
Package ui is the Bubble Tea interface: a project/container tree plus full-screen log and inspect viewers.
Package ui is the Bubble Tea interface: a project/container tree plus full-screen log and inspect viewers.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL