diff --git a/.gitignore b/.gitignore index d3593d30..cc49991d 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,7 @@ coverage/ # Repopack output repopack-output.txt repopack-output.xml +repopack-output.md # ESLint cache .eslintcache diff --git a/README.md b/README.md index 1bbdb818..5462669c 100644 --- a/README.md +++ b/README.md @@ -223,6 +223,45 @@ https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/use-xml- This means that the XML output from Repopack is not just a different format, but potentially a more effective way to feed your codebase into AI systems for analysis, code review, or other tasks. +#### Markdown Format + +To generate output in Markdown format, use the `--style markdown` option: +```bash +repopack --style markdown +``` + +The Markdown format structures the content in a hierarchical manner: + +````markdown +This file is a merged representation of the entire codebase, combining all repository files into a single document. + +# File Summary +(Metadata and usage AI instructions) + +# Repository Structure +``` +src/ + cli/ + cliOutput.ts + index.ts +``` +(...remaining directories) + +# Repository Files + +## File: src/index.js +``` +// File contents here +``` + +(...remaining files) + +# Instruction +(Custom instructions from `output.instructionFilePath`) +```` + +This format provides a clean, readable structure that is both human-friendly and easily parseable by AI systems. + ### Command Line Options - `-v, --version`: Show tool version @@ -230,7 +269,7 @@ This means that the XML output from Repopack is not just a different format, but - `--include `: List of include patterns (comma-separated) - `-i, --ignore `: Additional ignore patterns (comma-separated) - `-c, --config `: Path to a custom config file -- `--style