id = "glow" name = "Glow" homepage = "https://github.com/charmbracelet/glow" description = "A terminal based markdown reader designed from the ground up to bring out the beauty and power of the CLI." executables = ["glow"] [dotfiles] # glow's README says to "put a file named glow.yml in the default config path # of you platform", and points at `glow --help` for where that is. main.go # resolves it with muesli/go-app-paths: # `gap.NewScope(gap.User, "glow").ConfigDirs()`, then joins "glow.yml". # go-app-paths paths_darwin.go sets defaultConfigDir = "/Library/Preferences", # so macOS lands on the [preferences] base directory; paths_unix.go follows XDG, # so Linux lands on the [configHome] one; paths_windows.go builds configDir as # the LocalAppData folder plus "Config", which is a place of its own and keeps # its literal spelling. main.go also honours $XDG_CONFIG_HOME ahead of all of # them, which is how a macOS user ends up on the [configHome] spelling. paths = [ "[configHome]/glow/glow.yml", "[preferences]/glow/glow.yml", "%LOCALAPPDATA%/glow/Config/glow.yml", ] exclude = [] # glow renders local and remote markdown; it stores no credential of its own. secret = [] # Read at startup on every run. side_effect = false # No machine_lines: style, pager, width and mouse are presentation preferences # a reader wants on every machine. [commands] format = 1 label = "Render Markdown" description = "Render a Markdown file or directory in the terminal with Glow. The stash subcommand is left out." quality = "ai-draft" base = "fig:glow" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/glow.ts" license = "MIT" [[commands.field]] id = "source" label = "File or directory" description = "Leave empty to open the file browser in the current directory." type = "path" position = 0 path = { kind = "any", role = "input" } sources = ["fig"] [[commands.field]] id = "pager" label = "Use pager" description = "Display the output in a pager." type = "boolean" option = ["--pager", "-p"] sources = ["fig"] [[commands.field]] id = "style" label = "Style" type = "string" option = ["--style", "-s"] description = "A built-in style name or the path to a JSON style." suggestions = [{ value = "auto", label = "auto" }, { value = "light", label = "light" }, { value = "dark", label = "dark" }, { value = "notty", label = "notty" }] sources = ["fig"] [[commands.field]] id = "width" label = "Wrap width" type = "integer" option = ["--width", "-w"] description = "Word-wrap at this column." sources = ["fig"] [[commands.field]] id = "all" label = "Show system files" description = "Show hidden files and directories (browser mode only)." type = "boolean" option = ["--all", "-a"] sources = ["fig"] [[commands.field]] id = "local" label = "Local only" description = "No network access (browser mode only)." type = "boolean" option = ["--local", "-l"] sources = ["fig"] [[commands.field]] id = "config" label = "Config file" type = "path" option = ["--config"] path = { kind = "file", role = "input" } sources = ["fig"] [[commands.task]] id = "read" label = "Read a file" fields = ["source", "style", "width", "pager"] required = ["source"] [[commands.task]] id = "browse" label = "Browse a folder" fields = ["source", "all", "local", "style"] required = [] [[commands.group]] id = "basic" label = "Basic" fields = ["source", "pager", "style", "width"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["all", "local", "config"]