Skip to content

๐Ÿ“ฆ 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:
-YYYYMMDD-HHMMSS.zip โ”œโ”€โ”€ outputs/ โ”‚ โ”œโ”€โ”€ repo.txt โ”‚ โ”œโ”€โ”€ repo.json โ”‚ โ””โ”€โ”€ repo.md โ”œโ”€โ”€ assets/ โ”‚ โ””โ”€โ”€ image.png โ”œโ”€โ”€ summary.json โ”œโ”€โ”€ manifest.json โ”œโ”€โ”€ README.md
### 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 โžก