The gittxt re command reconstructs the original source files from a Gittxt-generated .txt, .md, or .json report. This feature is especially useful for recovering repo content from a summarized archive or sharing code snapshots without the original repository.
.txt– plain text Gittxt output.md– Markdown format.json– structured JSON format
All reports must follow the standard Gittxt output format as produced by the gittxt scan command.
gittxt re path/to/report.[txt|md|json]This command will:
- Parse the provided Gittxt report
- Reconstruct all recognized source code files and directory structure
- Output a ZIP archive with the reconstructed repository contents
-
Report Parsing
The tool detects the report format and extracts:- File paths
- File contents (preserved in code blocks or text sections)
-
Directory Reconstruction
All directories are recreated using the original structure from the report. -
File Creation
Each code/text file is restored to its proper location with full content. -
Packaging
The reconstructed project is saved as a ZIP file, named after the top-level folder or repo name from the report.
After execution, a .zip file is created in the current directory:
Reconstructed archive: repo_name_reconstructed.zipYou can unzip this archive to view and work with the restored files.
gittxt re exports/my_project_summary.txtOutput:
Parsing report: my_project_summary.txt
Restoring 24 files...
Generated ZIP archive: my_project_reconstructed.zip
- Binary or non-textual files (e.g. images, data files) cannot be reconstructed from
.txtor.mdformats. - Only files included in the original Gittxt output are restored — excluded files (via filters or
.gittxtignore) are not recoverable. - Reports must be unmodified for best results. Manual edits may cause parsing issues.
- Use
.jsonreports for the most reliable and structured reverse engineering. - Include the
--liteflag ingittxt scanonly if minimal reconstruction is acceptable.