https://github.com/benjajaja/mdfried
A markdown viewer for the terminal that renders images and big headers
https://github.com/benjajaja/mdfried
iterm2 kitty markdown ratatui ratatui-image sixel
Last synced: about 2 months ago
JSON representation
A markdown viewer for the terminal that renders images and big headers
- Host: GitHub
- URL: https://github.com/benjajaja/mdfried
- Owner: benjajaja
- License: gpl-3.0
- Created: 2024-12-08T11:19:42.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2025-01-29T10:05:08.000Z (3 months ago)
- Last Synced: 2025-02-24T06:41:55.870Z (about 2 months ago)
- Topics: iterm2, kitty, markdown, ratatui, ratatui-image, sixel
- Language: Rust
- Homepage: https://crates.io/crates/mdfried
- Size: 13.8 MB
- Stars: 85
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mdfried
You can [cook](https://ratatui.rs/) a terminal. But can you **deep fry** a terminal?
_YES!_ You can **cook _and_ fry** your `tty`! ~Run before it's too late!~> The terminal is usually in "cooked" mode, or canonical mode.
> With `ratatui`🐁, it's in raw mode, but it "cooks" for you.`mdfried` is a markdown viewer for the terminal that renders headers as bigger text than normal.
### Screenshots

### Video

### How?
By rendering the headers as images, and using one of several terminal graphics protocols: Sixels,
Kitty, or iTerm2.See [ratatui-image](https://github.com/benjajaja/ratatui-image?tab=readme-ov-file#compatibility-matrix)
to see if your terminal does even have graphics support, and for further details.In general, Kitty, WezTerm, iTerm2, foot, `xterm -ti vt340`, _should_ work.
# Usage
```
mdfried ./path/to.md
```The first time you run `mdfried`, you will have to pick a font, ideally the font your terminal is
using. As you type in the prompt, the first match is previewed directly. Once confirmed, this is
written into the configuration file. Use `--setup` to force the font-setup again if the font is not
right, or you switch terminals.Press `q` to quit. `j`/`k` to scroll by lines, `Ctrl-d`/`Ctrl-u` to scroll by pages. `r` reloads
the file (if not using stdin pipe). Mouse scroll also works.# Installation
- Rust cargo: `cargo install mdfried`
- Nix flake: `github:benjajaja/mdfried`
- Arch Linux: `paru -S mdfried` ([AUR](https://aur.archlinux.org/packages/mdfried))
- Windows: [Download release](https://github.com/benjajaja/mdfried/releases/latest)# Configuration
`$XDG_CONFIG/mdfried/config.toml` is automatically created on first run.
The `[skin]` section can be configured to set various colors and styles.
See [termimad skin format](https://github.com/Canop/termimad/blob/main/examples/serialize-skin/skin.hjson)
for more information.