Skip to content

A minimal C++ Markdown viewer for your terminal which renders .md files with headings, lists, code blocks, and clean formatting. Zero dependencies.

License

Notifications You must be signed in to change notification settings

ishanawal/TermMark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TermMark

TermMark is a lightweight, C++-based terminal Markdown renderer designed for simplicity, readability, and modularity. It parses and renders .md files or embedded Markdown strings directly in the terminal with structured formatting — including headings, code blocks, lists, blockquotes, tables, and more.


✨ Features

  • Headings with proper hierarchy and bold styling
  • Bold, italic, and inline code rendering
  • Syntax-aware code blocks with framed boxes and optional language labels
  • Unordered and ordered lists
  • Blockquotes and horizontal dividers
  • Simple Markdown table support
  • Modular architecture – easy to extend or integrate
  • Live watching of file changes with --watch
  • --help and --version CLI flags

🛠️ Getting Started

🧪 Install via Homebrew

brew tap ishanawal/tap
brew install termmark

🔧 Build Instructions

Make sure you have a C++17+ compatible compiler. Then:

git clone https://github.com/ishanawal/TermMark.git
cd TermMark
mkdir build && cd build
cmake ..
make
./termmark --help

🧪 Usage

You can render Markdown content in the terminal:

./termmark --guide      # Renders a built-in markdown guide
./termmark README.md    # Renders any local .md file

Watch a file and auto-update on changes:

./termmark --watch path/to/file.md

Use the flags:

./termmark --help
./termmark --version

Sample Output

Sample Markdown Render Output 1 Sample Markdown Render Output 2


Watch Mode Demo

Watch mode Demo


📁 Project Structure

TERMMARK/
├── include/               # Header files
│   ├── parser/            # Markdown parser interface
│   ├── renderer/          # Renderer interface
│   └── utils/             # CLI info, styles, compatibility
│   └── watch/
├── src/                   # Implementation files
│   ├── parser/            # Markdown parser implementation
│   ├── renderer/          # Terminal renderer implementation
│   └── utils/             # CLI tools and helpers
│   └── watch/             # Watcher implementation (for --watch)
├── sample.md              # Sample markdown input
├── main.cpp               # Entry point
├── CMakeLists.txt         # Build configuration
├── README.md              # Project documentation
├── LICENSE                # License info

📦 Dependencies

  • Standard C++ STL only — No external dependencies!

📌 Future Plans

  • Support Nested List
  • Color themes or syntax highlighting

👨‍💻 Author

Built with ❤️ by Ishan Awal

If you like it, consider ⭐️ starring the repo!


🧾 License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A minimal C++ Markdown viewer for your terminal which renders .md files with headings, lists, code blocks, and clean formatting. Zero dependencies.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages