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 }
[[commands.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)
-i, --images=TYPE Include [local|remote (both)|none] images in output (requires chafa or imgcat, default none).
-l, --list List headers in document and exit
-p, --[no-]pager Formatted output to pager (default on)
-P Disable pager (same as --no-pager)
-s, --section=NUMBER[,NUMBER] Output only a headline-based section of the input (numeric from --list)
-t, --theme=THEME_NAME Specify an alternate color theme to load
-w, --width=COLUMNS Column width to format for (default: terminal width)
--links=FORMAT Link style ([inline, reference, paragraph], default inline,
--[no-]syntax Syntax highlight code blocks
"""
[[commands.field]]
id = "file"
label = "Markdown file"
type = "path"
position = 0
path = { kind = "file", role = "input" }
sources = ["help"]
[[commands.field]]
id = "list"
label = "List headers and exit"
type = "boolean"
option = ["--list", "-l"]
sources = ["help"]
[[commands.field]]
id = "section"
label = "Section numbers"
description = "Comma-separated numbers from --list."
type = "string"
option = ["--section", "-s"]
sources = ["help"]
[[commands.field]]
id = "no_pager"
label = "Disable pager"
type = "boolean"
option = ["-P"]
sources = ["help"]
[[commands.field]]
id = "width"
label = "Column width"
type = "integer"
option = ["--width", "-w"]
sources = ["help"]
[[commands.field]]
id = "theme"
label = "Theme name"
type = "string"
option = ["--theme", "-t"]
sources = ["help"]
[[commands.field]]
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"]
[[commands.field]]
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"]
[[commands.task]]
id = "view"
label = "View a file"
fields = ["file", "width", "theme"]
required = ["file"]
[[commands.task]]
id = "outline"
label = "List headers"
set = { list = [true] }
lock = ["list"]
fields = ["file", "list"]
required = ["file"]
[[commands.group]]
id = "basic"
label = "Basic"
fields = ["file", "list", "section", "no_pager"]
[[commands.group]]
id = "advanced"
label = "Advanced"
fields = ["width", "theme", "links", "images"]