๐ Reverse Engineering¶
The gittxt re
command allows you to reconstruct source code files from Gittxt-generated reports (.txt
, .md
, or .json
). This is useful when you have a structured summary but not the original repository.
๐ Supported Formats¶
You can reverse engineer from any of the following report types:
- .txt
โ Plain text format
- .md
โ Markdown summary
- .json
โ Machine-readable export (most reliable)
Reports must follow the Gittxt output structure.
๐ Usage¶
gittxt re path/to/report.[txt|md|json]
Optional:
--output-dir PATH # Where to save the reconstructed ZIP
๐ง What Happens¶
- Parses the selected report
- Extracts file paths and contents
- Reconstructs full directory structure
- Saves all files into a ZIP archive
โ Output Example¶
Parsing report: project_summary.json
Restoring 24 files...
Generated ZIP archive: project_reconstructed_20250411.zip
๐ Output Structure¶
project_reconstructed_<timestamp>.zip
โโโ src/
โ โโโ app.py
โโโ data/
โ โโโ dataset.csv
โโโ README.md
โ ๏ธ Limitations¶
- Only files included in the original scan will be restored
- Binary/non-textual files are not recoverable from
.txt
or.md
- Edited reports may fail to parse
- If the report was created with --no-tree, the directory tree will be missing from reconstruction.
- If --lite was used, asset metadata and detailed formatting may be absent.
You may see CLI warnings like:
โ ๏ธ Note: This report did not include a directory tree. Reconstructed structure may be limited.
โ ๏ธ Note: No non-textual assets were included in this report.
๐ก Tips¶
- Prefer
.json
for full fidelity - Use
--lite
only if content summaries are sufficient
Back: Output Formats