Mcat is a terminal viewer for images, videos, and documents built with Rust. It can display files directly in your terminal with ANSI formatting or convert them between formats like Markdown, HTML, and PNG. Works with local files, URLs, or piped input.
Installation is available through cargo, Homebrew, AUR, or Winget. The tool uses a pipeline architecture that automatically converts files through intermediate formats to reach your desired output. Optional dependencies include Chromium for HTML rendering, pdftocairo for PDFs, and FFmpeg for videos.
Use Cases:
Parse, Convert and Preview files
In your Terminal
!Total Downloads (https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/skardyy/d30563e4945958e7d4f7560cf003c33c/raw/mcat-downloads.json) !Version (https://img.shields.io/crates/v/mcat?style=for-the-badge)
Installation • Examples • CHANGELOG
!mcat_demo (https://github.com/Skardyy/assets/blob/main/mcat_opt.gif)
From Source
cargo install mcat
or ~
git clone https://github.com/Skardyy/mcat
cd mcat
cargo install --path ./crates/core
Prebuilt
follow the instructions at the latest release (https://github.com/Skardyy/mcat/releases/latest)
Homebrew (MacOS/Linux)
brew install mcat
AUR (Arch linux)
yay -S mcat-bin
Winget (Windows)
winget install skardyy.mcat
Advanced explanation
| Input |
|---|
Inputs can be:
The type of each input is inferred automatically, and it continues through the pipeline until it reaches the output format the user requested.
| In the pipeline |
|---|
For example, if the user runs:
mcat file.docx file.pdf -o inline
mcat will:
file.docx and file.pdf into a single Markdown fileYou can also start from the middle of the pipeline.
For example:
mcat file.html -o image > image.png
This starts at an HTML file and directly converts it into a PNG image.
| Explanation of the blocks |
|---|
Markdown - set when -o md or when the stdout isn't the terminal (piped)
Markdown Viewer is markdown with ANSI formatting, and is the default for any non video / image file. (the -c flag forces it)
HTML set when -o html -- only works for non image / video files
PNG Image set when -o image and gives an image
Interactive Viewer set when -o interactive or -I and launches an interactive view to zoom and pan the image in the terminal.
Inline Display set when -o inline or -i and prints the content as image in the terminal
#---------------------------------------#
# View documents with ANSI formatting #
# in the terminal #
#---------------------------------------#
mcat resume.pdf
mcat project.docx -t monokai # With a different theme
mcat "https://realpdfs.com/file.pdf" # From a url
cat file.pptx | mcat # From stdin
mcat . # Select files interactively
#-----------------#
# Convert files #
#-----------------#
mcat archive.zip > README.md # Into Markdown
mcat f1.rs f2.rs -o html > index.html # Into HTML
mcat index.html -o image > page.png # Into image
#--------------------------#
# View Images and Videos #
# in the terminal #
#--------------------------#
mcat img.png # Image
mcat video.mp4 # Video
mcat "https://giphy.com/gifs/..." # From a URL
mcat README.md -i # Converts to image and then shows it
mcat ls # ls command with images
mcat massive_image.png -o interactive # zoom and pan the image interactively in the terminal
mcat document.pdf -o interactive # view PDF rendered as images interactively
mcat img.png README.md -o interactive # view multiple files as images interactively
#--------------------------#
# What I use it most for #
#--------------------------#
mcat ls # To find the image i was looking for
mcat . | scb # Selects files, concat them, and copy to clipboard - for AI prompts
mcat index.html -o image > save.png # Render HTML into images
To see which file types support which features, see the table here.
Mcat will continue working without them
Chromium (for rendering HTML/Markdown/Text to image)
mcat --fetch-chromiumpdftocairo/pdftoppm (for rendering PDF to image)
FFmpeg (for videos)
mcat --fetch-ffmpegUsing Flags
the main flags for configuring are:
--opts for inline image printing--ls-opts for the ls commandrun mcat --help for full detail, and other flags.
Using Environment Variables
each variable mimicks its corresponding flag alternative.
MCAT_ENCODER, Options: kitty,iterm,sixel,ascii. e.g. MCAT_ENCODER=kitty is the same as doing --kittyMCAT_PAGER, \ the full command mcat will try to pipe into.MCAT_THEME, \ same as the --theme flagMCAT_INLINE_OPTS, \ same as the --opts flagMCAT_LS_OPTS, \ same as the --ls-opts flagMCAT_SILENT, \ same as the --silent flagMCAT_HYPRLINK, \ same as the --hyprlink flagMCAT_NO_LINENUMBERS, \ same as the --no-linenumbers flagMCAT_MD_IMAGE, \ same as the --no-images flagMIT License
Thanks to all contributors
GitHub starred repository manager with AI-powered auto-sync, semantic search, automatic categorization, release tracking, one-click downloads, smart asset filters, bilingual wiki integration, and cross-platform Electron client for Windows/macOS/Linux with 100% local data storage and MIT license.
Build local AI agents that observe your screen, microphone and clipboard, process with local LLMs, and react with notifications, screen recording and memory. All data stays private. Works with Ollama and OpenAI.
PlayStation 3 emulator for Android 12+. Project discontinued at Alpha-7 and merged with RPCSX. Use RPCSX Android UI for continued development.
WeChat video channel downloader (微信视频号下载助手) built with Go and SunnyNet featuring one-click download, batch processing, automatic decryption, smart deduplication, web console at dongzuren.com/wx_channel with browse history/download records/queue management, CSV export, configurable cleanup, and responsive design with MIT license.
Claude Code and Codex multi-agent development system with 6-step dev workflow, 90% test coverage requirement, BMAD agile workflow, modular Python installation and MIT license.
Local LLM chatbot featuring 1990s Microsoft Office Clippy UI, running GGUF models via Llama.cpp/node-llama-cpp with one-click installation for Gemma3/Llama 3.2/Phi-4/Qwen3, automatic hardware acceleration (Metal/CUDA/Vulkan), custom model/prompt support, offline operation, and @electron/llm reference implementation with NOASSERTION license.