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 }
[[commands.subcommand]]
path = ["index"]
label = "Index directories"
[[commands.subcommand.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 ...:
-b, --bytes
show file size in exact number of bytes
-d, --database=VAL
use database file VAL
-e, --exclude=VAL
exclude files matching VAL
-H, --check-hard-links
-m, --max-depth=VAL
-x, --one-file-system
skip directories on different file systems
-p, --progress
show progress during indexing
--dry-run
do not update database, just crawl
"""
[[commands.subcommand.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"]
[[commands.subcommand.field]]
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"]
[[commands.subcommand.field]]
id = "one_file_system"
label = "Stay on one file system"
type = "boolean"
option = ["--one-file-system", "-x"]
sources = ["man"]
[[commands.subcommand.field]]
id = "exclude"
label = "Exclude pattern"
type = "string"
option = ["--exclude", "-e"]
multiple = true
sources = ["man"]
[[commands.subcommand.field]]
id = "max_depth"
label = "Max stored depth"
type = "integer"
option = ["--max-depth", "-m"]
sources = ["man"]
[[commands.subcommand.field]]
id = "progress"
label = "Show progress"
type = "boolean"
option = ["--progress", "-p"]
sources = ["man"]
[[commands.subcommand.field]]
id = "check_hard_links"
label = "Count hard links once"
type = "boolean"
option = ["--check-hard-links", "-H"]
sources = ["man"]
[[commands.subcommand.field]]
id = "dry_run"
label = "Dry run"
description = "Crawl without updating the database."
type = "boolean"
option = ["--dry-run"]
sources = ["man"]
[[commands.subcommand.task]]
id = "index-home"
label = "Index a directory"
fields = ["paths", "database", "one_file_system", "progress"]
required = ["paths"]
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["paths", "database", "one_file_system", "progress", "exclude"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["max_depth", "check_hard_links", "dry_run"]
[[commands.subcommand]]
path = ["ls"]
label = "List indexed sizes"
[[commands.subcommand.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]...:
-a, --apparent
show apparent instead of actual file size
-b, --bytes
-c, --color
colorize output (only on ttys)
--count
show number of files instead of file size
-d, --database=VAL
--dirs-only
list only directories, skip individual files
-g, --graph
draw graph with relative size for each entry
-l, --levels=VAL
traverse up to ARG levels deep [4]
-n, --name-sort
sort output by name instead of by size
-R, --recursive
recursively list subdirectories
"""
[[commands.subcommand.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"]
[[commands.subcommand.field]]
id = "database"
label = "Database file"
type = "path"
option = ["--database", "-d"]
path = { kind = "file", role = "input", must_exist = true }
sources = ["man"]
[[commands.subcommand.field]]
id = "recursive"
label = "Recursive"
type = "boolean"
option = ["--recursive", "-R"]
sources = ["man"]
[[commands.subcommand.field]]
id = "levels"
label = "Levels deep"
type = "integer"
option = ["--levels", "-l"]
sources = ["man"]
[[commands.subcommand.field]]
id = "graph"
label = "Draw relative size graph"
type = "boolean"
option = ["--graph", "-g"]
sources = ["man"]
[[commands.subcommand.field]]
id = "apparent"
label = "Apparent size"
type = "boolean"
option = ["--apparent", "-a"]
sources = ["man"]
[[commands.subcommand.field]]
id = "bytes"
label = "Exact bytes"
type = "boolean"
option = ["--bytes", "-b"]
sources = ["man"]
[[commands.subcommand.field]]
id = "dirs_only"
label = "Directories only"
type = "boolean"
option = ["--dirs-only"]
sources = ["man"]
[[commands.subcommand.field]]
id = "name_sort"
label = "Sort by name"
type = "boolean"
option = ["--name-sort", "-n"]
sources = ["man"]
[[commands.subcommand.field]]
id = "count"
label = "Show file counts"
type = "boolean"
option = ["--count"]
sources = ["man"]
[[commands.subcommand.field]]
id = "color"
label = "Colorize"
type = "boolean"
option = ["--color", "-c"]
sources = ["man"]
[[commands.subcommand.task]]
id = "tree"
label = "Recursive tree"
set = { recursive = [true], graph = [true] }
fields = ["path", "recursive", "levels", "graph", "database"]
required = []
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["path", "database", "recursive", "levels", "graph", "dirs_only"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["apparent", "bytes", "name_sort", "count", "color"]
[[commands.subcommand]]
path = ["graph"]
label = "Draw a sunburst graph"
[[commands.subcommand.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]:
-a, --apparent
-d, --database=VAL
--count
-f, --format=VAL
select output format png|svg|pdf|html [png]
--gradient
draw graph with color gradient
-l, --levels=VAL
draw up to ARG levels deep [4]
-o, --output=VAL
output file name [duc.png]
--palette=VAL
select palette. available palettes are: size, rainbow, greyscale, monochrome, classic
-s, --size=VAL
image size [800]
"""
[[commands.subcommand.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"]
[[commands.subcommand.field]]
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"]
[[commands.subcommand.field]]
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"]
[[commands.subcommand.field]]
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"]
[[commands.subcommand.field]]
id = "size"
label = "Image size (pixels)"
type = "integer"
option = ["--size", "-s"]
sources = ["man"]
[[commands.subcommand.field]]
id = "levels"
label = "Levels deep"
type = "integer"
option = ["--levels", "-l"]
sources = ["man"]
[[commands.subcommand.field]]
id = "database"
label = "Database file"
type = "path"
option = ["--database", "-d"]
path = { kind = "file", role = "input", must_exist = true }
sources = ["man"]
[[commands.subcommand.field]]
id = "gradient"
label = "Color gradient"
type = "boolean"
option = ["--gradient"]
sources = ["man"]
[[commands.subcommand.field]]
id = "apparent"
label = "Apparent size"
type = "boolean"
option = ["--apparent", "-a"]
sources = ["man"]
[[commands.subcommand.field]]
id = "count"
label = "Show file counts"
type = "boolean"
option = ["--count"]
sources = ["man"]
[[commands.subcommand.task]]
id = "svg"
label = "SVG graph"
set = { format = ["svg"] }
fields = ["path", "output", "format", "palette", "levels"]
required = []
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["path", "output", "format", "palette", "size", "levels"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["database", "gradient", "apparent", "count"]