๐ฆ Output Formats¶
Gittxt supports multiple output formats to suit different use cases โ from human-readable text to machine-parsable JSON. Choose one or more using the --output-format
flag.
โ๏ธ .txt
โ Plain Text¶
A readable report that includes: - Directory tree - Summary - Full content of extracted files - Non-textual asset list (if in rich mode)
Lite mode:
gittxt scan . --output-format txt --lite
๐ .json
โ Machine-Readable¶
Ideal for scripting, APIs, or analysis. Includes: - Structured metadata - Token and size breakdowns - File-level content
Rich mode JSON sample:
{
"repository": { ... },
"summary": { ... },
"files": [ ... ],
"assets": [ ... ]
}
Lite mode includes just path
and content
for each file.
๐ .md
โ Markdown¶
Perfect for previewing results in Markdown editors or static sites. Includes: - Directory tree (in fenced code block) - Text file previews - Asset table (rich mode only)
Sample:
## ๐ Directory Tree
```text
โโโ src
โ โโโ app.py
---
## ๐ `.zip` โ Bundled Archive
Use `--zip` to package all output formats and non-text assets:
### manifest.json
Lists files and sizes in the archive.
```json
[
{ "type": "output", "name": "repo.txt", "size_human": "5.4 kB" },
{ "type": "asset", "path": "assets/image.png", "size_human": "13.2 kB" }
]
โ Choosing Formats¶
Generate multiple formats at once:
gittxt scan . --output-format txt,json,md --zip
Combine with:
- --lite
for summary-only content
- --tree-depth
to limit tree output
Next: Reverse Engineering โก