Skip to main content

Markdown Merger (md-merge)

A command-line tool to merge multiple Markdown files into a single document.

Installation

uv pip install md-merge

CLI

You can also install it using the uv tool, and run it directly from the command line:

uv tool install md-merge
md-merge --help

Usage

# Merge specific files in order
md-merge file1.md another/file.md docs/intro.md --output combined_manual.md

# Merge all *.md files recursively from a directory (alphabetical order)
md-merge --dir path/to/markdown/docs --output full_docs.md

# Specify a different output file
md-merge file.md --output my_merged_file.md

# Enable verbose logging for debugging
mdmerge --dir my_project --verbose

# Get help
md-merge --help

Features

  • Merges specified files or all .md files in a directory.
  • Inserts a separator between files showing the source path.
  • Adds a header to the merged document with timestamp and file count.
  • Preserves YAML front matter (from the first file only).
  • Configurable output file path (default: merged.md).
  • Verbose logging option (--verbose or -v).
  • Robust error handling and validation.

Future Improvements

  • Add support for custom separators.
  • Implement a GUI for easier file selection.
  • Support for other file formats (e.g., .txt, .rst).
  • Add unit tests for better coverage.

Metadata

Release files for md-merge 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for md-merge 0.1.1
File Size Uploaded
md_merge-0.1.1.tar.gz 13.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for md-merge 0.1.1
File Interpreter ABI Platform
md_merge-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 22.3 kB

Release files / md_merge-0.1.1.tar.gz

Download URL md_merge-0.1.1.tar.gz
Size 13.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c55be9b283c9ff6756c60a0b257c48ad6e1f85f1430abd9a177a3dfdb6229d01
BLAKE2b-256 checksum
How to use checksums
030615186b1a997675cf871681da5910c6652e95614bb65e849a58980a22beef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.4.28

Release files / md_merge-0.1.1-py3-none-any.whl

Download URL md_merge-0.1.1-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
811efb558bdcc132a710b355ab39fe47ee23c25c8cada392b5662460c8856c1c
BLAKE2b-256 checksum
How to use checksums
c1a35543cfd6c720b551c1badd6321ab82b28991ae3159ec25773958e62ec39d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.4.28

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page