Read the files from the terminal as they are intended.
kiri in reading mode, the default where the terminal draws images
kiri /ˈkiri/ (KEE-ree) started as a play on kitty reader: a helpful reader of AI-generated (slop) Markdown for kitty. But it has since become more than just a "kitty reader": kiri renders Markdown documents, images, Mermaid diagrams, formulas, tables etc. in several terminals, kitty included. And it's not going to stop there!
- kiri (Estonian): a letter; also writing, script and pattern
- kiri (Finnish): a spurt, as in loppukiri, the final sprint of a race
Clone the repo, change to its directory, and install with Rust Cargo:
cargo install --path .Useful commands:
kiri examples/README.md # read a Markdown document
kiri photo.jpg # or an image
kiri docs/*.md # several files at once
some-command | kiri # render another command's output
# as Markdown (or other formats)
kiri --doctor # display terminal and settings infoAnd a few others for paging (especially for Markdown):
kiri README.md -f # automatically reload the page on file changes
kiri README.md --fa # and also jump to the edited part (F to cycle)
kiri README.md --no-reading # the text layout, for copying (M to toggle)Use --light / --dark to view the document in light / dark mode.
For the shell completions, add following line to your ~/.bashrc:
eval "$(kiri --completions bash)"for other shells, see options.
Documentation:
- configuration
- themes
- doctor: diagnostics
Important
kiri is still in early development.
| Terminal | Images | Large headings | Loading | Animated images |
|---|---|---|---|---|
| kitty | ✅ | ✅ | ✅ | ✅ |
| tmux (kitty) | ✅ | via images | status line | ✅ |
| Ghostty | ✅ | via images | ✅ | ✅ |
| tmux (Ghostty) | ✅ | via images | status line | — |
| sixel terminals | ✅ | via images | status line | — |
| tmux (sixel) | — | — | — | — |
- Loading: A loading band/indicator at the bottom of a loading image, otherwise in the status line
- sixel terminals: Tested on xterm (
xterm -ti vt340) and foot - Animated images: when not supported: show the first frame as an image if possible
Not every feature is supported by every terminal. See above table for limitations.
✅ works · 🟡 partly · 📋 planned
| Format | Extensions | Status | Notes |
|---|---|---|---|
| Markdown | .md, .markdown | ✅ | |
| Images | .png, .jpg, .webp, .svg, .svgz | ✅ | |
| Animated images | .gif, animated .webp and .png | ✅ | started by hand; limited terminal support |
| More images | .bmp, .ico, .tiff, .qoi, .pnm, .tga | ✅ | default build only |
| CSV, TSV | .csv, .tsv | ✅ | first row is the header |
| Mermaid | .mmd, .mermaid | ✅ | |
| Any other text file | .yaml, .json, .rs, .txt and others | ✅ | shown as it is, with syntax highlighting when kiri knows the language; --format text shows a Markdown file as its source |
| Notebooks | .ipynb | 📋 | |
| 📋 | pages as images | ||
| Video | .mp4, .webm and others | 📋 | through ffmpeg |
| Feature | Status | Notes |
|---|---|---|
| CommonMark | ||
| Headings | ✅ | sized text in kitty, images elsewhere |
| Emphasis, lists, quotes | ✅ | |
| Links | ✅ | clickable |
| Code blocks | ✅ | highlighted, language named in the corner |
| Images | ✅ | also drawn inside running text; in a table cell the alt text shows, and a linked image is not clickable yet |
| Remote images | 📋 | |
| GitHub extensions | ||
| Tables | ✅ | wrap to fit the window |
| Task lists, strikethrough, autolinks | ✅ | |
| Footnotes | 📋 | |
| GitHub extras | ||
| Alerts, emoji shortcodes | ✅ | |
| Mermaid | ✅ | every diagram type |
| Formulas | ✅ | inline $x$ drawn inside running text; in a table cell it is shown as written |
| Front matter | ✅ | shown as a table or code block |
| Links within the document | 📋 | |
| HTML | ||
<details>, <img> |
✅ | details shown open |
<kbd>, <br>, <mark>, <sub>, <sup> |
✅ | |
align="center" |
📋 | |
<b>, <i>, <s>, <code>, <h1>–<h6>, <pre>, named entities |
✅ | |
<table>, <ul>, <ol> |
📋 | shown as muted source |
| Other HTML | 🟡 | shown as muted source |
| Other extensions | ||
| Definition lists | 📋 |
| Feature | Status | Notes |
|---|---|---|
| Rendering | ||
| Reading mode | ✅ | browser-like rendering, on by default where images are drawn; --no-reading and M |
| Pager | ||
| Paging | ✅ | whatever is longer than the window opens in a pager, images too: kiri *.png; -p always, -P never |
| Search | ✅ | /, n and N, as in less |
| Several files | ✅ | :n and :p move between them |
| Reload | ✅ | r |
| Follow a file | ✅ | -f; --fa also moves to the changed part |
| Table of contents | 📋 | |
| Choosing links with the keyboard | 🟡 | Tab selects a link, Enter copies its address |
| Following links to other documents | 📋 | |
| Copying code blocks | 📋 | |
| Look | ||
| Themes | ✅ | your own theme file with --theme; --light and --dark pages |
| Built-in themes by name | 📋 | |
NO_COLOR |
✅ | |
| Plain text into a pipe | ✅ | |
| Settings and help | ||
| Configuration file | ✅ | ~/.config/kiri/config.toml and environment variables |
--doctor |
✅ | terminal and settings info |
| Settings menu in the pager | 📋 | |
| Shell completions | ✅ | --completions SHELL |
| Man page | 📋 |
kiri has been developed mostly by AI tools (Claude).
Useful commands:
make check # run formatting, lints and tests
make build-release # build the optimised binarySee also:
- architecture
- roadmap
- AGENTS.md: instructions for agents (duh)
kiri is built upon these awesome tools and packages:
- comrak: Markdown parsing
- syntect and two-face: syntax highlighting, with the grammars of two-face
- resvg: SVG images, also for rendering diagrams and formulas
- image: reading raster images
- fast_image_resize: image scaling
- parley and skrifa: reading mode typesetting
- merman: Mermaid diagrams
- RaTeX and KaTeX: LaTeX formulas
- Octicons: icons for Markdown alerts
- jailbee: AI tooling and environment isolation
- last but not least, kitty: terminal protocols that kickstarted kiri
With the advent of AI coding tools, such as opencode, Claude Code, Codex and Pi, the terminal has not faded away. Instead, I have noticed that the IDE stays closed most of the time and the terminal, with its tabs and panes, is all too familiar in my everyday work.
kiri is one step towards making the terminal environment a bit more manageable. I shouldn't need to open a plethora of GUI tools and a browser just to look at a document, an image or a PDF before answering "do I prefer option A or B?".
kiri should be enough.
- toravasaari
Sources of inspiration:
- bat: paging, and syntax highlighting for every code file
- less: key bindings
- btop: styling, menu and themes
kitten icat: images- GitHub's and Forgejo's visual style for the README pages
There are other awesome Markdown readers that you should definitely check out:
- kitty-markdown-viewer - a full-screen viewer for kitty with a table of contents, copy tools and much more
- glow - "Render markdown on the CLI, with pizzazz!"
- mdfried - "renders headers as Bigger Text"
- mdcat (archived) - still gets its job done
kiri is licensed under the MIT License; see LICENSE.
Licences and copyright notices of the third-party software and
assets are included in each release archive, in THIRD-PARTY-NOTICES.md.