@dhruv2mars/mdv-ts
v0.0.5
Published
Terminal markdown visualizer/editor (TypeScript + OpenTUI)
Maintainers
Readme
mdv-ts
Terminal-first Markdown visualizer/editor — TypeScript + OpenTUI port of mdv.
Open a file, type on the left, see the formatted preview on the right. First run opens a Home screen and an in-app guide.
Install
bun add -g @dhruv2mars/mdv-ts
# or
npm i -g @dhruv2mars/mdv-tsBinary command: mdv-ts
The interactive TUI needs Bun, because OpenTUI ships its
native renderer bindings for Bun only. If you install with npm, mdv-ts
re-runs itself under Bun automatically whenever Bun is on your PATH.
Without Bun the non-interactive commands still work anywhere Node 18+ runs:
mdv-ts --help
mdv-ts notes.md | less # piped/non-TTY previewQuickstart
mdv-ts- Type a file name like
notes.md - Press
Enter - Start typing
- Press
Ctrl+Sto save
Open an existing file:
mdv-ts README.mdIn-app docs:
- macOS:
Cmd+, - Windows/Linux:
Ctrl+,
Everyday Tasks
Read without editing:
mdv-ts --readonly README.mdStream Markdown from another command:
tail -f notes.md | mdv-ts --streamUpdate the installed package:
mdv-ts updateKeybinds
In-app docs: Cmd+,/Ctrl+, (Docs + Settings modal).
Quick ref:
Ctrl+QquitCtrl+SsaveCtrl+Rreload from diskShift+TaborCtrl+Tswitch between typing and preview scrollingCtrl+Fsearch,Ctrl+Hreplace,Ctrl+Ggoto lineF3/Shift+F3next/prev search result- Conflict flow:
Ctrl+J/Ctrl+Uhunk nav,Ctrl+Eapply,Ctrl+Kkeep local,Ctrl+Mmerge
Flags
--readonlydisable editing--no-watchdisable file watcher--streamread markdown from stdin (noPATHarg)--perfshow perf info in status line--theme <auto|default|high-contrast>set color theme--no-colordisable ANSI color--focus <editor|view>initial focused pane
Env
MDV_FORCE_TUI=1force TUI even when not a TTYMDV_STREAM_MAX_BYTESstdin buffer cap in stream mode (default 4MB)MDV_INSTALL_ROOToverride~/.mdvfor onboarding stateCOLUMNSnon-TTY preview width (default 80)
Dev
bun install
bun test
bun run dev -- README.md
bun run build
bun run selftestLicense
MIT
