{
  "id": "dua-cli",
  "name": "dua",
  "homepage": "https://github.com/Byron/dua-cli",
  "description": "A fast disk-usage analyzer with an interactive terminal interface.",
  "executables": [
    "dua"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/dua-cli/config.toml",
      "[appData]/dua-cli/config.toml",
      "%APPDATA%/dua-cli/config.toml"
    ],
    "secret": [],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "dua",
    "description": "Disk usage analysis with dua: aggregate sizes, the interactive browser, disposable-directory discovery and flame graphs. Short flags, snapshots and config subcommands are not covered.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "subcommand": [
      {
        "path": [
          "aggregate"
        ],
        "label": "Aggregate sizes",
        "source": [
          {
            "id": "readme",
            "kind": "manual",
            "url": "https://github.com/Byron/dua-cli/blob/main/README.md",
            "revision": "2026-10-27",
            "evidence": "dua aggregate --help\nFiles that share only some blocks are not deduplicated, and `--apparent-size`\nBy default `aggregate` prints a flat listing. Pass `--depth N` to instead print an indented tree\n`--no-sort` and `--no-total` work the same way they do for the flat listing.\n`--ignore-from FILE` reads gitignore-style patterns and leaves everything they match out of the\ndua --ignore-from .duaignore\ndua i\ndua interactive\ndua clean --depth 3 ~/dev ~/Downloads\nTraversal options, `--no-entry-check`, and `--once` are supported.\ndua flamegraph -o disk-usage.svg\n\"--threads\",\n// Paths were explicitly passed by the user on the command-line; per `--ignore-dirs`'s\nbail!(\"stacks cannot be used with --format\");\npub enum ByteFormat { Metric, Binary, Bytes, GB, Gib, MB, Mib }\n"
          }
        ],
        "field": [
          {
            "id": "inputs",
            "label": "Files or directories",
            "description": "Defaults to the current directory.",
            "type": "path",
            "position": 0,
            "multiple": true,
            "path": {
              "kind": "any",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "readme"
            ]
          },
          {
            "id": "depth",
            "label": "Tree depth",
            "description": "Print an indented tree this many levels deep.",
            "type": "integer",
            "option": [
              "--depth"
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "apparent_size",
            "label": "Apparent size",
            "description": "Show apparent size instead of disk usage.",
            "type": "boolean",
            "option": [
              "--apparent-size"
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "format",
            "label": "Byte format",
            "type": "enum",
            "option": [
              "--format"
            ],
            "choices": [
              {
                "value": "metric",
                "label": "Metric"
              },
              {
                "value": "binary",
                "label": "Binary"
              },
              {
                "value": "bytes",
                "label": "Bytes"
              },
              {
                "value": "gb",
                "label": "GB"
              },
              {
                "value": "gib",
                "label": "GiB"
              },
              {
                "value": "mb",
                "label": "MB"
              },
              {
                "value": "mib",
                "label": "MiB"
              }
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "no_sort",
            "label": "Keep command-line order",
            "type": "boolean",
            "option": [
              "--no-sort"
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "no_total",
            "label": "No total column",
            "type": "boolean",
            "option": [
              "--no-total"
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "ignore_from",
            "label": "Ignore patterns file",
            "description": "gitignore-style patterns whose matches are left out.",
            "type": "path",
            "option": [
              "--ignore-from"
            ],
            "multiple": true,
            "path": {
              "kind": "file",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "readme"
            ]
          },
          {
            "id": "threads",
            "label": "Threads",
            "description": "0 uses the number of logical processors.",
            "type": "integer",
            "option": [
              "--threads"
            ],
            "sources": [
              "readme"
            ]
          }
        ],
        "task": [
          {
            "id": "summary",
            "label": "Size summary",
            "fields": [
              "inputs",
              "depth",
              "apparent_size",
              "format"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "inputs",
              "depth",
              "apparent_size",
              "format"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "no_sort",
              "no_total",
              "ignore_from",
              "threads"
            ]
          }
        ]
      },
      {
        "path": [
          "interactive"
        ],
        "label": "Browse interactively",
        "source": [
          {
            "id": "readme",
            "kind": "manual",
            "url": "https://github.com/Byron/dua-cli/blob/main/README.md",
            "revision": "2026-10-27",
            "evidence": "dua aggregate --help\nFiles that share only some blocks are not deduplicated, and `--apparent-size`\nBy default `aggregate` prints a flat listing. Pass `--depth N` to instead print an indented tree\n`--no-sort` and `--no-total` work the same way they do for the flat listing.\n`--ignore-from FILE` reads gitignore-style patterns and leaves everything they match out of the\ndua --ignore-from .duaignore\ndua i\ndua interactive\ndua clean --depth 3 ~/dev ~/Downloads\nTraversal options, `--no-entry-check`, and `--once` are supported.\ndua flamegraph -o disk-usage.svg\n\"--threads\",\n// Paths were explicitly passed by the user on the command-line; per `--ignore-dirs`'s\nbail!(\"stacks cannot be used with --format\");\npub enum ByteFormat { Metric, Binary, Bytes, GB, Gib, MB, Mib }\n"
          }
        ],
        "field": [
          {
            "id": "inputs",
            "label": "Files or directories",
            "description": "Defaults to the current directory.",
            "type": "path",
            "position": 0,
            "multiple": true,
            "path": {
              "kind": "any",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "readme"
            ]
          },
          {
            "id": "apparent_size",
            "label": "Apparent size",
            "description": "Show apparent size instead of disk usage.",
            "type": "boolean",
            "option": [
              "--apparent-size"
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "ignore_from",
            "label": "Ignore patterns file",
            "description": "gitignore-style patterns whose matches are left out.",
            "type": "path",
            "option": [
              "--ignore-from"
            ],
            "multiple": true,
            "path": {
              "kind": "file",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "readme"
            ]
          },
          {
            "id": "threads",
            "label": "Threads",
            "description": "0 uses the number of logical processors.",
            "type": "integer",
            "option": [
              "--threads"
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "format",
            "label": "Byte format",
            "type": "enum",
            "option": [
              "--format"
            ],
            "choices": [
              {
                "value": "metric",
                "label": "Metric"
              },
              {
                "value": "binary",
                "label": "Binary"
              },
              {
                "value": "bytes",
                "label": "Bytes"
              },
              {
                "value": "gb",
                "label": "GB"
              },
              {
                "value": "gib",
                "label": "GiB"
              },
              {
                "value": "mb",
                "label": "MB"
              },
              {
                "value": "mib",
                "label": "MiB"
              }
            ],
            "sources": [
              "readme"
            ]
          }
        ],
        "task": [
          {
            "id": "browse",
            "label": "Browse a directory",
            "fields": [
              "inputs",
              "apparent_size",
              "ignore_from"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "inputs",
              "apparent_size",
              "ignore_from"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "threads",
              "format"
            ]
          }
        ]
      },
      {
        "path": [
          "clean"
        ],
        "label": "Find disposable directories",
        "source": [
          {
            "id": "readme",
            "kind": "manual",
            "url": "https://github.com/Byron/dua-cli/blob/main/README.md",
            "revision": "2026-10-27",
            "evidence": "dua aggregate --help\nFiles that share only some blocks are not deduplicated, and `--apparent-size`\nBy default `aggregate` prints a flat listing. Pass `--depth N` to instead print an indented tree\n`--no-sort` and `--no-total` work the same way they do for the flat listing.\n`--ignore-from FILE` reads gitignore-style patterns and leaves everything they match out of the\ndua --ignore-from .duaignore\ndua i\ndua interactive\ndua clean --depth 3 ~/dev ~/Downloads\nTraversal options, `--no-entry-check`, and `--once` are supported.\ndua flamegraph -o disk-usage.svg\n\"--threads\",\n// Paths were explicitly passed by the user on the command-line; per `--ignore-dirs`'s\nbail!(\"stacks cannot be used with --format\");\npub enum ByteFormat { Metric, Binary, Bytes, GB, Gib, MB, Mib }\n"
          }
        ],
        "field": [
          {
            "id": "inputs",
            "label": "Directories to search",
            "description": "Defaults to the current directory.",
            "type": "path",
            "position": 0,
            "multiple": true,
            "path": {
              "kind": "directory",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "readme"
            ]
          },
          {
            "id": "depth",
            "label": "Discovery depth",
            "description": "0 checks only the supplied directories.",
            "type": "integer",
            "option": [
              "--depth"
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "no_entry_check",
            "label": "Skip entry presence check",
            "description": "Faster on slow filesystems.",
            "type": "boolean",
            "option": [
              "--no-entry-check"
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "ignore_from",
            "label": "Ignore patterns file",
            "description": "gitignore-style patterns whose matches are left out.",
            "type": "path",
            "option": [
              "--ignore-from"
            ],
            "multiple": true,
            "path": {
              "kind": "file",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "readme"
            ]
          }
        ],
        "task": [
          {
            "id": "clean",
            "label": "Search for disposable directories",
            "fields": [
              "inputs",
              "depth"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "inputs",
              "depth"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "no_entry_check",
              "ignore_from"
            ]
          }
        ]
      },
      {
        "path": [
          "flamegraph"
        ],
        "label": "Render a flame graph",
        "source": [
          {
            "id": "readme",
            "kind": "manual",
            "url": "https://github.com/Byron/dua-cli/blob/main/README.md",
            "revision": "2026-10-27",
            "evidence": "dua aggregate --help\nFiles that share only some blocks are not deduplicated, and `--apparent-size`\nBy default `aggregate` prints a flat listing. Pass `--depth N` to instead print an indented tree\n`--no-sort` and `--no-total` work the same way they do for the flat listing.\n`--ignore-from FILE` reads gitignore-style patterns and leaves everything they match out of the\ndua --ignore-from .duaignore\ndua i\ndua interactive\ndua clean --depth 3 ~/dev ~/Downloads\nTraversal options, `--no-entry-check`, and `--once` are supported.\ndua flamegraph -o disk-usage.svg\n\"--threads\",\n// Paths were explicitly passed by the user on the command-line; per `--ignore-dirs`'s\nbail!(\"stacks cannot be used with --format\");\npub enum ByteFormat { Metric, Binary, Bytes, GB, Gib, MB, Mib }\n"
          }
        ],
        "field": [
          {
            "id": "inputs",
            "label": "Files or directories",
            "description": "Defaults to the current directory.",
            "type": "path",
            "position": 0,
            "multiple": true,
            "path": {
              "kind": "any",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "readme"
            ]
          },
          {
            "id": "output",
            "label": "SVG output file",
            "description": "Defaults to a temporary file.",
            "type": "path",
            "option": [
              "-o"
            ],
            "path": {
              "kind": "file",
              "role": "output",
              "must_exist": false
            },
            "effect": "overwrite",
            "sources": [
              "readme"
            ]
          },
          {
            "id": "depth",
            "label": "Depth",
            "type": "integer",
            "option": [
              "--depth"
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "apparent_size",
            "label": "Apparent size",
            "description": "Show apparent size instead of disk usage.",
            "type": "boolean",
            "option": [
              "--apparent-size"
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "ignore_from",
            "label": "Ignore patterns file",
            "description": "gitignore-style patterns whose matches are left out.",
            "type": "path",
            "option": [
              "--ignore-from"
            ],
            "multiple": true,
            "path": {
              "kind": "file",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "readme"
            ]
          }
        ],
        "task": [
          {
            "id": "svg",
            "label": "Write an SVG",
            "fields": [
              "inputs",
              "output",
              "depth"
            ],
            "required": [
              "output"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "inputs",
              "output",
              "depth"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "apparent_size",
              "ignore_from"
            ]
          }
        ]
      }
    ]
  }
}
