| Crates.io | mdwatch |
| lib.rs | mdwatch |
| version | 0.1.15 |
| created_at | 2025-07-04 19:07:15.526037+00 |
| updated_at | 2025-09-01 19:08:12.143259+00 |
| description | A simple CLI tool to live-preview Markdown files in your browser. |
| homepage | https://github.com/santoshxshrestha/mdwatch |
| repository | https://github.com/santoshxshrestha/mdwatch |
| max_upload_size | |
| id | 1738354 |
| size | 90,594 |
A simple command-line tool to preview Markdown files in a web browser. It serves the rendered HTML version of a Markdown file over HTTP, allowing you to easily preview your Markdown content locally.
0.0.0.0 to expose the server to the networkYou have three options: via Cargo, via prebuilt script, or manual install.
If you have Rust installed, you can install directly from crates.io:
cargo install mdwatch
This is the most "Rusty" and portable way.
It automatically downloads, compiles, and installs the latest version to your $HOME/.cargo/bin.
If you want even faster installs with prebuilt binaries, check out cargo-binstall:
cargo binstall mdwatch
Alternative: Installs the latest release binary to your system PATH.
curl -sSfL https://raw.githubusercontent.com/santoshxshrestha/mdwatch/main/scripts/install.sh | bash
mdwatch in release mode (if Rust is present)./usr/local/bin.Tip: You may need to enter your password for
sudoprivileges.
If you prefer full control or want to customize the build:
Clone the repository:
git clone https://github.com/santoshxshrestha/mdwatch.git
cd mdwatch
Build the Release Binary:
cargo build --release
This places the binary at target/release/mdwatch.
Copy to a PATH directory (e.g., /usr/local/bin):
sudo cp target/release/mdwatch /usr/local/bin/mdwatch
(Optional) Ensure executable permission:
sudo chmod +x /usr/local/bin/mdwatch
Run from anywhere:
mdwatch
You can uninstall using the provided script or manually:
curl -sSfL https://raw.githubusercontent.com/santoshxshrestha/mdwatch/main/scripts/uninstall.sh | bash
Remove the binary from your PATH:
sudo rm /usr/local/bin/mdwatch
or
sudo rm /usr/bin/mdwatch
If you also want to remove your cloned repository:
rm -rf ~/mdwatch
If installed with Cargo:
cargo uninstall mdwatch
Run the tool with the required and optional arguments:
mdwatch --file README.md [--ip 127.0.0.1] [--port 3000]
--file: Path to the Markdown file to preview (required)
--ip: IP address to bind the server to (default: 127.0.0.1)
--port: Port number for the server (default: 3000)
[!NOTE] If you bind to
0.0.0.0, the tool will warn you because this exposes the server to you local network. When binding to0.0.0.0, the preview URL opened in your browser will uselocalhostas the hostname.
mdwatch --file notes.md --ip 0.0.0.0 --port 8080
This will serve the Markdown file accessible on all network interfaces and open the preview at
http://localhost:8080 in your browser.
0.0.0.0 or any public-facing IP.The project is made available under the MIT license. See the LICENSE file for more information.