repowisedundee/gdu

Architecture of dundee/gdu

dundee/gdu is 158 source files holding 1,371 symbols across 7 modules, written mainly in Go, Dockerfile, Makefile. The largest module is pkg, with 64 files, and 4 files are entry points into the dependency graph.

How gdu fits together

The program starts from cmd/gdu/main.go, which hands control to the app code in cmd/gdu/app/app.go. The pkg directory holds most of the core code, and pkg/analyze/sqlite.go and pkg/analyze/stored.go deal with saving analysis data to a database so it can be reloaded later. The tui directory contains the terminal user interface used in interactive mode. Non-interactive mode is chosen automatically when no TTY is detected, and export mode with -o writes all usage data as JSON, which the -f flag can read back. The internal directory holds shared helpers such as internal/common/app.go.

Largest modules

  • pkg: 64 files and 8,577 lines of code
  • tui: 35 files and 6,142 lines of code
  • internal: 20 files and 1,266 lines of code
  • root: 10 files
  • .github: 8 files
  • docs: 8 files
  • cmd: 5 files and 1,375 lines of code
  • report: 5 files and 481 lines of code

Languages

By file count: Go 130 files, Dockerfile 1 file, Makefile 1 file.

More on gdu: summary and FAQ, codebase overview, code health.

Related guide: Best dependency graph tools for monorepos