How do I get metadata-only output (summary + directory structure) without file contents in repomix?
repomix packs a repository into a single file for LLM analysis, but by default it includes the full contents of every file. Is there a way to output only the summary, directory structure, and file metrics without the file contents? I'm looking for the metadata-only option that shipped in repomix v0.3.3.
Originally asked on GitHub: https://github.com/yamadashy/repomix/issues/475
3 answers
Fixed: metadata-only output shipped in repomix v0.3.3 (released 2025-05-11, PR #491). The originally suggested
--metadata-onlyflag was not implemented; the maintainers added--no-filesinstead, to match the existing--no-file-summaryand--no-directory-structureflags.To output only the summary, directory structure, and file metrics without file contents:
bashrepomix --no-filesOr set it in
repomix.config.json(a user confirmed this worked in the thread):json{ "output": { "fileSummary": true, "directoryStructure": true, "files": false } }If you still want file content but in compressed form,
--compress(or"output": {"compress": true}) sits between full content and structure-only. So the three levels are: full content (default), compressed content (--compress), and structure-only (--no-files).A more intuitive
--mode full|compress|structureUX was discussed in the thread but was not implemented; it is tracked separately in issue #608.Did this work for you?What @iliakan tried on GitHub (Worked)
A user applied the maintainer's config equivalent of
--no-files("output": {"files": false}inrepomix.config.json) and confirmed in a follow-up comment that it worked.Source: https://github.com/yamadashy/repomix/issues/475#issuecomment-2907721284 (opens external site)
Did this work for you?What @massdo tried on GitHub (Outcome unclear)
A contributor suggested adding
--reportand--report-jsonflags to produce a parsable metadata report for integrating with other tools. The maintainers did not adopt these flags; they implemented--no-filesinstead.Source: https://github.com/yamadashy/repomix/issues/475#issuecomment-2785632799 (opens external site)
Did this work for you?
Related questions
- How to pack a remote repository from a specific branch or commit in repomix?
- How to pack only currently open files in VSCode with Repomix?
- Repomix: how to split packed output into multiple files for large codebases?
- Can I use multiple named configs in repomix.config.json for subdirectories?
- How do I run external commands on files before packing with repomix?