{
  "id": "mdless",
  "name": "mdless",
  "homepage": "https://github.com/ttscoff/mdless",
  "description": "A utility that provides a formatted and highlighted view of Markdown files in Terminal.",
  "executables": [
    "mdless"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/mdless/config.yml",
      "[configHome]/mdless/mdless.theme"
    ],
    "exclude": [],
    "secret": [],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "View Markdown",
    "description": "Render a Markdown file in the terminal with mdless. Debug, config-update and some formatting toggles are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "help",
        "kind": "help",
        "url": "https://github.com/ttscoff/mdless/blob/main/README.md",
        "revision": "2026-10-27",
        "evidence": "    -c, --[no-]color                 Colorize output (default on)\n    -i, --images=TYPE                Include [local|remote (both)|none] images in output (requires chafa or imgcat, default none).\n    -l, --list                       List headers in document and exit\n    -p, --[no-]pager                 Formatted output to pager (default on)\n    -P                               Disable pager (same as --no-pager)\n    -s, --section=NUMBER[,NUMBER]    Output only a headline-based section of the input (numeric from --list)\n    -t, --theme=THEME_NAME           Specify an alternate color theme to load\n    -w, --width=COLUMNS              Column width to format for (default: terminal width)\n        --links=FORMAT               Link style ([inline, reference, paragraph], default inline,\n        --[no-]syntax                Syntax highlight code blocks\n"
      }
    ],
    "field": [
      {
        "id": "file",
        "label": "Markdown file",
        "type": "path",
        "position": 0,
        "path": {
          "kind": "file",
          "role": "input"
        },
        "sources": [
          "help"
        ]
      },
      {
        "id": "list",
        "label": "List headers and exit",
        "type": "boolean",
        "option": [
          "--list",
          "-l"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "section",
        "label": "Section numbers",
        "description": "Comma-separated numbers from --list.",
        "type": "string",
        "option": [
          "--section",
          "-s"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "no_pager",
        "label": "Disable pager",
        "type": "boolean",
        "option": [
          "-P"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "width",
        "label": "Column width",
        "type": "integer",
        "option": [
          "--width",
          "-w"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "theme",
        "label": "Theme name",
        "type": "string",
        "option": [
          "--theme",
          "-t"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "links",
        "label": "Link style",
        "type": "enum",
        "option": [
          "--links"
        ],
        "choices": [
          {
            "value": "inline",
            "label": "Inline"
          },
          {
            "value": "reference",
            "label": "Reference"
          },
          {
            "value": "paragraph",
            "label": "After each paragraph"
          }
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "images",
        "label": "Images",
        "type": "enum",
        "option": [
          "--images",
          "-i"
        ],
        "choices": [
          {
            "value": "local",
            "label": "Local"
          },
          {
            "value": "remote",
            "label": "Local and remote"
          },
          {
            "value": "none",
            "label": "None"
          }
        ],
        "sources": [
          "help"
        ]
      }
    ],
    "task": [
      {
        "id": "view",
        "label": "View a file",
        "fields": [
          "file",
          "width",
          "theme"
        ],
        "required": [
          "file"
        ]
      },
      {
        "id": "outline",
        "label": "List headers",
        "set": {
          "list": [
            true
          ]
        },
        "lock": [
          "list"
        ],
        "fields": [
          "file",
          "list"
        ],
        "required": [
          "file"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "file",
          "list",
          "section",
          "no_pager"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "width",
          "theme",
          "links",
          "images"
        ]
      }
    ]
  }
}
