{
  "id": "duc",
  "name": "Duc",
  "homepage": "https://github.com/zevv/duc",
  "description": "Suite of tools for inspecting disk usage.",
  "executables": [
    "duc"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/duc/ducrc",
      "~/.ducrc"
    ],
    "secret": []
  },
  "commands": {
    "format": 1,
    "label": "Duc",
    "description": "Index disk usage and query the index with duc: index, ls and graph. The ui, gui, info, json, xml and cgi subcommands are not covered.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": true
    },
    "subcommand": [
      {
        "path": [
          "index"
        ],
        "label": "Index directories",
        "source": [
          {
            "id": "man",
            "kind": "manual",
            "url": "https://github.com/zevv/duc/blob/master/doc/duc.1",
            "revision": "duc.1 (September 2023)",
            "evidence": "Options for command duc index [options] PATH ...:\n-b, --bytes\nshow file size in exact number of bytes\n-d, --database=VAL\nuse database file VAL\n-e, --exclude=VAL\nexclude files matching VAL\n-H, --check-hard-links\n-m, --max-depth=VAL\n-x, --one-file-system\nskip directories on different file systems\n-p, --progress\nshow progress during indexing\n--dry-run\ndo not update database, just crawl\n"
          }
        ],
        "field": [
          {
            "id": "paths",
            "label": "Directories to index",
            "type": "path",
            "position": 0,
            "multiple": true,
            "min": 1,
            "path": {
              "kind": "directory",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "man"
            ]
          },
          {
            "id": "database",
            "label": "Database file",
            "description": "Defaults to ~/.duc.db.",
            "type": "path",
            "option": [
              "--database",
              "-d"
            ],
            "path": {
              "kind": "file",
              "role": "output",
              "must_exist": false
            },
            "effect": "overwrite",
            "sources": [
              "man"
            ]
          },
          {
            "id": "one_file_system",
            "label": "Stay on one file system",
            "type": "boolean",
            "option": [
              "--one-file-system",
              "-x"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "exclude",
            "label": "Exclude pattern",
            "type": "string",
            "option": [
              "--exclude",
              "-e"
            ],
            "multiple": true,
            "sources": [
              "man"
            ]
          },
          {
            "id": "max_depth",
            "label": "Max stored depth",
            "type": "integer",
            "option": [
              "--max-depth",
              "-m"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "progress",
            "label": "Show progress",
            "type": "boolean",
            "option": [
              "--progress",
              "-p"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "check_hard_links",
            "label": "Count hard links once",
            "type": "boolean",
            "option": [
              "--check-hard-links",
              "-H"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "dry_run",
            "label": "Dry run",
            "description": "Crawl without updating the database.",
            "type": "boolean",
            "option": [
              "--dry-run"
            ],
            "sources": [
              "man"
            ]
          }
        ],
        "task": [
          {
            "id": "index-home",
            "label": "Index a directory",
            "fields": [
              "paths",
              "database",
              "one_file_system",
              "progress"
            ],
            "required": [
              "paths"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "paths",
              "database",
              "one_file_system",
              "progress",
              "exclude"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "max_depth",
              "check_hard_links",
              "dry_run"
            ]
          }
        ]
      },
      {
        "path": [
          "ls"
        ],
        "label": "List indexed sizes",
        "source": [
          {
            "id": "man",
            "kind": "manual",
            "url": "https://github.com/zevv/duc/blob/master/doc/duc.1",
            "revision": "duc.1 (September 2023)",
            "evidence": "Options for command duc ls [options] [PATH]...:\n-a, --apparent\nshow apparent instead of actual file size\n-b, --bytes\n-c, --color\ncolorize output (only on ttys)\n--count\nshow number of files instead of file size\n-d, --database=VAL\n--dirs-only\nlist only directories, skip individual files\n-g, --graph\ndraw graph with relative size for each entry\n-l, --levels=VAL\ntraverse up to ARG levels deep [4]\n-n, --name-sort\nsort output by name instead of by size\n-R, --recursive\nrecursively list subdirectories\n"
          }
        ],
        "field": [
          {
            "id": "path",
            "label": "Path",
            "description": "Defaults to the current directory.",
            "type": "path",
            "position": 0,
            "path": {
              "kind": "directory",
              "role": "input",
              "must_exist": false
            },
            "sources": [
              "man"
            ]
          },
          {
            "id": "database",
            "label": "Database file",
            "type": "path",
            "option": [
              "--database",
              "-d"
            ],
            "path": {
              "kind": "file",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "man"
            ]
          },
          {
            "id": "recursive",
            "label": "Recursive",
            "type": "boolean",
            "option": [
              "--recursive",
              "-R"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "levels",
            "label": "Levels deep",
            "type": "integer",
            "option": [
              "--levels",
              "-l"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "graph",
            "label": "Draw relative size graph",
            "type": "boolean",
            "option": [
              "--graph",
              "-g"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "apparent",
            "label": "Apparent size",
            "type": "boolean",
            "option": [
              "--apparent",
              "-a"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "bytes",
            "label": "Exact bytes",
            "type": "boolean",
            "option": [
              "--bytes",
              "-b"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "dirs_only",
            "label": "Directories only",
            "type": "boolean",
            "option": [
              "--dirs-only"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "name_sort",
            "label": "Sort by name",
            "type": "boolean",
            "option": [
              "--name-sort",
              "-n"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "count",
            "label": "Show file counts",
            "type": "boolean",
            "option": [
              "--count"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "color",
            "label": "Colorize",
            "type": "boolean",
            "option": [
              "--color",
              "-c"
            ],
            "sources": [
              "man"
            ]
          }
        ],
        "task": [
          {
            "id": "tree",
            "label": "Recursive tree",
            "set": {
              "recursive": [
                true
              ],
              "graph": [
                true
              ]
            },
            "fields": [
              "path",
              "recursive",
              "levels",
              "graph",
              "database"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "path",
              "database",
              "recursive",
              "levels",
              "graph",
              "dirs_only"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "apparent",
              "bytes",
              "name_sort",
              "count",
              "color"
            ]
          }
        ]
      },
      {
        "path": [
          "graph"
        ],
        "label": "Draw a sunburst graph",
        "source": [
          {
            "id": "man",
            "kind": "manual",
            "url": "https://github.com/zevv/duc/blob/master/doc/duc.1",
            "revision": "duc.1 (September 2023)",
            "evidence": "Options for command duc graph [options] [PATH]:\n-a, --apparent\n-d, --database=VAL\n--count\n-f, --format=VAL\nselect output format png|svg|pdf|html [png]\n--gradient\ndraw graph with color gradient\n-l, --levels=VAL\ndraw up to ARG levels deep [4]\n-o, --output=VAL\noutput file name [duc.png]\n--palette=VAL\nselect palette. available palettes are: size, rainbow, greyscale, monochrome, classic\n-s, --size=VAL\nimage size [800]\n"
          }
        ],
        "field": [
          {
            "id": "path",
            "label": "Path",
            "description": "Defaults to the current directory.",
            "type": "path",
            "position": 0,
            "path": {
              "kind": "directory",
              "role": "input",
              "must_exist": false
            },
            "sources": [
              "man"
            ]
          },
          {
            "id": "output",
            "label": "Output file",
            "description": "Defaults to duc.png; - writes to standard output.",
            "type": "path",
            "option": [
              "--output",
              "-o"
            ],
            "path": {
              "kind": "file",
              "role": "output",
              "must_exist": false
            },
            "effect": "overwrite",
            "sources": [
              "man"
            ]
          },
          {
            "id": "format",
            "label": "Format",
            "type": "enum",
            "option": [
              "--format",
              "-f"
            ],
            "choices": [
              {
                "value": "png",
                "label": "PNG"
              },
              {
                "value": "svg",
                "label": "SVG"
              },
              {
                "value": "pdf",
                "label": "PDF"
              },
              {
                "value": "html",
                "label": "HTML"
              }
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "palette",
            "label": "Palette",
            "type": "enum",
            "option": [
              "--palette"
            ],
            "choices": [
              {
                "value": "size",
                "label": "Size"
              },
              {
                "value": "rainbow",
                "label": "Rainbow"
              },
              {
                "value": "greyscale",
                "label": "Greyscale"
              },
              {
                "value": "monochrome",
                "label": "Monochrome"
              },
              {
                "value": "classic",
                "label": "Classic"
              }
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "size",
            "label": "Image size (pixels)",
            "type": "integer",
            "option": [
              "--size",
              "-s"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "levels",
            "label": "Levels deep",
            "type": "integer",
            "option": [
              "--levels",
              "-l"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "database",
            "label": "Database file",
            "type": "path",
            "option": [
              "--database",
              "-d"
            ],
            "path": {
              "kind": "file",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "man"
            ]
          },
          {
            "id": "gradient",
            "label": "Color gradient",
            "type": "boolean",
            "option": [
              "--gradient"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "apparent",
            "label": "Apparent size",
            "type": "boolean",
            "option": [
              "--apparent",
              "-a"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "count",
            "label": "Show file counts",
            "type": "boolean",
            "option": [
              "--count"
            ],
            "sources": [
              "man"
            ]
          }
        ],
        "task": [
          {
            "id": "svg",
            "label": "SVG graph",
            "set": {
              "format": [
                "svg"
              ]
            },
            "fields": [
              "path",
              "output",
              "format",
              "palette",
              "levels"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "path",
              "output",
              "format",
              "palette",
              "size",
              "levels"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "database",
              "gradient",
              "apparent",
              "count"
            ]
          }
        ]
      }
    ]
  }
}
