{
  "slug": "directory-tree-view",
  "name": "gizza-ai/directory-tree-view",
  "version": "0.1.0",
  "title": "Directory Tree View — Size-Annotated Folder Tree — gizza.ai",
  "description": "Paste a du, find, or CSV file listing and get a clean indented tree with rolled-up folder sizes and file counts. Human, SI, or raw bytes. Free, in-browser.",
  "tags": [
    "directory tree view",
    "size annotated tree",
    "tree du",
    "folder size tree",
    "du tree",
    "disk usage tree",
    "file size tree",
    "tree -s -h"
  ],
  "category": "developer",
  "urls": {
    "page": "https://gizza.ai/tools/directory-tree-view/",
    "markdown": "https://gizza.ai/tools/directory-tree-view/index.md",
    "descriptor": "https://gizza.ai/tools/directory-tree-view/tool.json",
    "deep_link_example": "https://gizza.ai/tools/directory-tree-view/?input=1024%09src%2Fmain.rs%0A3072%09src%2Flib.rs%0A512%09README.md%0A4096%09docs%2Fguide.md&format=auto&units=human&sort=name&root=.&ascii=true&dirs_first=true&trailing_slash=true&show_counts=true&depth=0"
  },
  "cli": "gizza tool directory-tree-view \"1024\tsrc/main.rs\n3072\tsrc/lib.rs\n512\tREADME.md\n4096\tdocs/guide.md\"",
  "tool": {
    "description": "Turn a pasted file listing (a slash-separated path and a byte size per line) into a size-annotated indented tree, like `tree -s -h --du`. Accepts `du -ab` / `find -printf '%s\\t%p\\n'` output, a `path,size` CSV export, or a mix (format=auto by default; size-first / path-first force a layout). Directory sizes roll up cumulatively from their contents and each directory can show its (files, dirs) counts (show_counts, default true), ending with a totals report line. units picks the size style: human (1024-based K/M/G, default), si (1000-based), or bytes (raw with separators). sort orders each folder by name (default), size-desc, or input order; dirs_first lists directories first (default true). root labels the top line (default '.'); depth caps the printed levels (0 = unlimited); ascii swaps box-drawing connectors for plain ASCII; trailing_slash adds '/' to directories (default true).",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "ascii": {
          "default": false,
          "description": "Use plain-ASCII connectors ('|--', '`--') instead of Unicode box-drawing ('├──', '└──'). Default false.",
          "type": "boolean"
        },
        "depth": {
          "default": 0,
          "description": "Maximum tree depth to print (0 = unlimited, like tree -L). Deeper entries are hidden but still counted in their ancestors' rolled-up sizes. Default 0.",
          "minimum": 0,
          "type": "integer"
        },
        "dirs_first": {
          "default": true,
          "description": "List directories before files within each folder (like tree --dirsfirst). Default true.",
          "type": "boolean"
        },
        "format": {
          "default": "auto",
          "description": "How each line is split into a path and a size. 'auto' (default) detects per line: a comma → path,size CSV, a tab or leading number → size-first. 'size-first' forces size-then-path (du/find). 'path-first' forces path-then-size (CSV).",
          "enum": [
            "auto",
            "size-first",
            "path-first"
          ],
          "type": "string"
        },
        "input": {
          "description": "The file listing, one entry per line, each line carrying a slash-separated path and a byte size. Accepts `du -ab` / `find -printf '%s\\t%p\\n'` output (size then a tab then the path), a `path,size` CSV export, or a mix. Sizes may use suffixes (4K, 1.5M, 2MiB, 500KB). Directory sizes are rolled up from their contents. Blank lines are ignored.",
          "type": "string"
        },
        "root": {
          "default": ".",
          "description": "Label for the top line of the tree (the root). Default '.'.",
          "type": "string"
        },
        "show_counts": {
          "default": true,
          "description": "Annotate each directory with its (files, dirs) counts. Default true. The final report line always shows the totals.",
          "type": "boolean"
        },
        "sort": {
          "default": "name",
          "description": "Order of entries within each directory. 'name' (default) is case-insensitive alphabetical; 'size-desc' is largest cumulative size first; 'input' preserves the order paths first appeared.",
          "enum": [
            "name",
            "size-desc",
            "input"
          ],
          "type": "string"
        },
        "trailing_slash": {
          "default": true,
          "description": "Append '/' to directory names. Default true.",
          "type": "boolean"
        },
        "units": {
          "default": "human",
          "description": "Size unit style. 'human' (default) uses 1024-based K/M/G (like tree -h); 'si' uses 1000-based k/M/G (like tree --si); 'bytes' prints raw bytes with thousands separators (like tree -s).",
          "enum": [
            "human",
            "si",
            "bytes"
          ],
          "type": "string"
        }
      },
      "required": [
        "input"
      ],
      "type": "object"
    }
  }
}