mdify.sh
is a Bash script to output files as markdown with their path structure. Ideal for sending large amounts of plaintext data to LLMs.
git clone https://github.com/theokyr/mdify-sh.git
cd mdify.sh
chmod +x mdify.sh
./mdify.sh <directory> <output_file> <extensions>
<directory>
: Root directory to search for files.<output_file>
: File for markdown output.<extensions>
: Comma-separated file extensions to include.
Write the contents of all .cpp
and .java
files in ./src
to output.md
:
./mdify.sh ./src output.md cpp,java
Contents of output.md
:
**`./src/main.cpp`:**
... file contents as a cpp code block ...
**`./src/java/com/domain/app/Application.java`:**
... file contents as a java code block ...
**`./src/java/com/domain/app/services/Service.java`:**
... file contents as a java code block ...
- Fork the repo
- Create a branch (
git checkout -b feature
) - Commit your changes (
git commit -m 'Add feature'
) - Push to the branch (
git push origin feature
) - Open a pull request
MIT License. See LICENSE for details.
Open an issue for support.