Skip to content

Configuration

mdt is configured through command-line flags and environment variables. There is no configuration file.

Terminal window
mdt [path] [--max-file-size <bytes>]

If no path is given, mdt opens the current directory. You can pass a directory to browse or a specific file to open directly.

FlagDescriptionDefault
--max-file-size <bytes>Maximum file size in bytes that mdt will open5,242,880 (5 MB)

For example, to allow opening files up to 10 MB:

Terminal window
mdt --max-file-size 10485760

mdt respects the NO_COLOR standard. Set this environment variable to any value to disable all color output:

Terminal window
NO_COLOR=1 mdt

This is useful for terminals that do not support colors or when piping output.

mdt supports mouse input out of the box:

  • Scroll wheel to scroll the preview or file tree
  • Click to switch focus between panes

No configuration is needed; mouse support is enabled automatically.

mdt detects your terminal’s background color to prevent transparency bleed-through. This ensures that rendered elements like code blocks and tables look correct regardless of your terminal’s color scheme.

mdt adapts its rendering to the terminal width:

  • Paragraphs, headings, blockquotes, and lists wrap to fit the available space
  • Code blocks and tables are truncated when the terminal is too narrow, rather than breaking the layout

mdt is built for speed with several optimizations:

  • Dirty-flag rendering — only redraws the screen when something actually changes
  • Pre-warmed syntax highlighting — loads syntax definitions on a background thread at startup
  • Panic-safe terminal teardown — restores the terminal state even if mdt crashes unexpectedly