Skip to content

Your First Conversion

This walks through a basic run and what the output looks like.

Run it

cd my-project
folder2md .

This writes output.md in the current directory, containing a directory tree followed by the contents of each processed file. To choose the file name:

folder2md . -o my-project.md

What ends up in the output

  • A tree of the directory structure (include_tree, on by default).
  • Repository statistics (include_stats, on by default).
  • The text of each file that passed filtering.
  • Converted text for documents such as PDF, DOCX, and XLSX (convert_docs, on by default).
  • Short descriptions for binary files like images and archives (describe_binaries, on by default).

What gets skipped

By default the tool honours your .gitignore, and skips files larger than 100MB. To exclude more, scaffold an ignore file and edit it:

folder2md --init-ignore

Add patterns to the generated .folder2md_ignore, then run folder2md . again.

Fitting an LLM context window

Large projects can exceed a model's context window. Pass --limit with a token (t) or character (c) budget; this enables smart condensing, which reduces code to signatures and docstrings rather than truncating it:

folder2md . --limit 80000t

Next steps