Output formats
Select the format with --format (-f). Supported values are markdown, xml, json, and plain.
codemap --format xml --output codemap-output.xmlMarkdown
The default. Contains a summary, an optional directory tree, the top files, and each file in a fenced code block.
XML
Each file is wrapped in an element with its path. Instruction text and header text appear as <instruction> and <header> elements. Top files appear under file_summary, and empty directories appear as <empty_directory> elements under directory_structure.
JSON
Contains header, instruction, summary, topFiles, files, emptyDirectories, excludedFiles, gitDiffs, and gitLogs.
Plain
Plain text with file separators. Useful when the target tool does not parse structure.
Summaries
| Option | Effect |
|---|---|
--summary / --no-summary | Include or omit the file summary. |
--tree / --no-tree | Include or omit the directory structure. |
--line-numbers / --no-line-numbers | Prefix each line with its number. |
Top files are ranked by token count. The default count is 5.