{"id":13598924,"url":"https://github.com/henriklovhaug/md-tui","last_synced_at":"2025-04-10T10:30:42.730Z","repository":{"id":198560675,"uuid":"701047861","full_name":"henriklovhaug/md-tui","owner":"henriklovhaug","description":"Markdown renderer in the terminal","archived":false,"fork":false,"pushed_at":"2025-03-18T08:39:12.000Z","size":778,"stargazers_count":245,"open_issues_count":17,"forks_count":14,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-18T09:29:30.885Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/henriklovhaug.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-05T19:59:34.000Z","updated_at":"2025-03-18T08:38:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"7a93c1f3-ff93-4766-8299-2a73b3522eda","html_url":"https://github.com/henriklovhaug/md-tui","commit_stats":null,"previous_names":["henriklovhaug/md-cli"],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henriklovhaug%2Fmd-tui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henriklovhaug%2Fmd-tui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henriklovhaug%2Fmd-tui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henriklovhaug%2Fmd-tui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/henriklovhaug","download_url":"https://codeload.github.com/henriklovhaug/md-tui/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248199136,"owners_count":21063641,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T17:00:58.146Z","updated_at":"2025-04-10T10:30:42.325Z","avatar_url":"https://github.com/henriklovhaug.png","language":"Rust","funding_links":[],"categories":["Rust","Others","💻 Apps"],"sub_categories":["🚀 Productivity and Utilities"],"readme":"# MD-TUI\n\n\u003c!--toc:start--\u003e\n\n- [MD-TUI](#md-tui)\n  - [Installation](#installation)\n    - [Requirements](#requirements)\n  - [Usage](#usage)\n  - [Key binds](#key-binds)\n  - [Syntax highlighting](#syntax-highlighting)\n  - [Configuration](#configuration)\n    - [Keyboard actions](#keyboard-actions)\n    - [Colors and misc](#colors-and-misc)\n  - [Links](#links)\n  - [Neovim plugin](#neovim-plugin)\n  - [Contributions](#contributions)\n  - [Use as library](#use-as-library)\n\n\u003c!--toc:end--\u003e\n\n`MD-TUI` is a TUI application for viewing markdown files directly in your\nterminal. I created it because I wasn't happy with how alternatives handled\nlinks in their applications. While the full markdown specification is not yet\nsupported, it will slowly get there. It's a good solution for quickly viewing\nyour markdown notes, or opening external links from someones README. If your\nterminal support images, they will render.\n\n## Installation\n\nUsing cargo: `cargo install md-tui --locked`\n\nOn Arch Linux: `pacman -S md-tui`\n\nFor Nix users, there's also Nix flake.\n\nPrebuilt binaries with install script can be found on the release page.\n\n### Requirements\n\n1. A terminal\n2. Nerd font\n\n## Usage\n\nStart the program running `mdt \u003cfile.md\u003e` or just `mdt`. The latter will search\nrecursively from where it was invoked for any markdown file and show it in a\n_file tree_.\n\n## Key binds\n\nThese are the default settings. See [keyboard configuration](#keyboard-actions)\nfor configuration options.\n\n| Key              | Action                                                                 |\n| ---------------- | ---------------------------------------------------------------------- |\n| `j` or `\u003cDown\u003e`  | Scroll down                                                            |\n| `k` or `\u003cUp\u003e`    | Scroll up                                                              |\n| `h`              | Go down half a page                                                    |\n| `l`              | Go up half a page                                                      |\n| `d` or `\u003cLeft\u003e`  | Scroll one page down                                                   |\n| `u` or `\u003cRight\u003e` | Scroll one page up                                                     |\n| `f` or `/`       | Search                                                                 |\n| `n` or `N`       | Jump to next or previous search result                                 |\n| `s` or `S`       | Enter select link mode. Different selection strategy.                  |\n| `K`              | Hover. Preview where a link is going without going there               |\n| `\u003cEnter\u003e`        | Select. Depending on which mode it can: open file, select link, search |\n| `Esc`            | Go back to _normal_ mode                                               |\n| `t`              | Go back to files                                                       |\n| `b`              | Go back to previous file (file tree if no previous file)               |\n| `g`              | Go to top of file                                                      |\n| `G`              | Go to bottom of the file                                               |\n| `e`              | Edit file in `$EDITOR`                                                 |\n| `o`              | Sort files in file tree                                                |\n| `q`              | Quit the application                                                   |\n\n## Syntax highlighting\n\n`MD-TUI` supports syntax highlighting in code blocks for the following\nlanguages:\n\n- Bash/sh\n- C/C++\n- Css\n- Elixir\n- Go\n- Html\n- Java\n- JavaScript\n- Json\n- Lua\n- Luau\n- Ocaml\n- PHP\n- Python\n- Rust\n- Scala\n- Typescript\n- Yaml\n\n## Configuration\n\nThe program checks for the file `~/.config/mdt/config.toml` at startup. The\nfollowing parameters and their defaults are written below.\n\n### Keyboard actions\n\nSome key actions are not configurable. Like the following:\n\n- Enter\n- Arrow keys\n- Escape\n- Question mark for help menu\n- 'q' to quit the application\n- '/' for search\n\n\u003e If you override another default key, it's undefined behavior if that key does\n\u003e not get reassigned.\n\n\u003e Actions can only be assigned to single characters. Space, fn keys, ctrl+key,\n\u003e backspace etc., will not take effect and the default will be in use.\n\n```toml\n# Keyboard actions\nup = 'k'\ndown = 'j'\npage_up = 'u'\npage_down = 'd'\nhalf_page_down = 'l'\nhalf_page_up = 'h'\ntop = 'g'\nbottom = 'G'\nsearch = 'f'\nsearch_next = 'n'\nsearch_previous = 'N'\n# This will search downwards until it finds one or select the last link in document.\nselect_link = 's'\n# Finds the link 2/3 up the page. It will search then for closest in both direction.\nselect_link_alt = 'S'\nedit = 'e'\nhover = 'K'\nback = 'b'\nfile_tree = 't'\nsort = 'o'\n```\n\n### Colors and misc\n\nSetting color to `\"\"` will not remove it, but leave it as its default. To remove\ncolors, set it to `reset`.\n\n```toml\n# General settings\nwidth = 100\ngitignore = false\nalignment = \"left\" # \"center\" | \"right\"\n\n# Inline styling\nbold_color = \"reset\"\nbold_italic_color = \"reset\"\ncode_bg_color = \"#2A2A2A\"\ncode_fg_color = \"red\"\nitalic_color = \"reset\"\nlink_color = \"blue\"\nlink_selected_bg_color = \"darkgrey\"\nlink_selected_fg_color = \"green\"\nstrikethrough_color = \"reset\"\n\n# Block styling\ncode_block_bg_color = \"#2A2A2A\"\nquote_bg_color = \"reset\"\ntable_header_bg_color = \"reset\"\ntable_header_fg_color = \"yellow\"\n\n# File tree\nfile_tree_name_color = \"blue\"\nfile_tree_page_count_color = \"lightgreen\"\nfile_tree_path_color = \"gray\"\nfile_tree_selected_fg_color = \"lightgreen\"\n\n# Quote bar\nquote_caution = \"lightmagenta\"\nquote_default = \"white\"\nquote_important = \"lightred\"\nquote_note = \"lightblue\"\nquote_tip = \"lightgreen\"\nquote_warning = \"lightYellow\"\n\n# Heading\nh_bg_color = \"blue\"\nh_fg_color = \"black\"\nh2_fg_color = \"green\"\nh3_fg_color = \"magenta\"\nh4_fg_color = \"cyan\"\nh5_fg_color = \"yellow\"\nh6_fg_color = \"lightred\"\n```\n\n## Links\n\nMD-TUI currently supports `[text](url)`, `[[link]]`, and `[[link|Some title]]`\ntype of links.\n\n## Neovim plugin\n\nThis application also exists as a plugin for Neovim called\n[Preview](https://github.com/henriklovhaug/Preview.nvim).\n\n\u003e [!NOTE]\n\u003e\n\u003e This version does not support images regardless of your terminal capabilities.\n\n## Contributions\n\nBoth PRs and issues are appreciated!\n\n## Use as library\n\nIt's possible to use this as a library. It's not well documented for that use,\nbut the feature is there. There is one default feature attached, which is the\nwhole highlighting of code blocks.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenriklovhaug%2Fmd-tui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhenriklovhaug%2Fmd-tui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenriklovhaug%2Fmd-tui/lists"}