TreeBundle - User Manual

What is TreeBundle?

TreeBundle ingests entire GitHub repositories or local documents (PDF, DOCX, code) and splits them into numbered, self-contained text files. Each part ends with a part counter (e.g., 3/12) and a custom disclaimer footer. The result is a clean ZIP archive ready for AI analysis, code review, or offline study.

Step-by-Step Workflow

1. Ingest Source

Paste a GitHub URL or owner/repo. TreeBundle now uses gitingest.com under the hood to fetch the repository content. For private repos, add a fine-grained token in settings.

2. Or Upload Local

Click the upload area. PDFs are text-extracted via PDF.js, DOCX via Mammoth. Code files appear verbatim. The content fills the editor.

3. Configure Splitting

Set Lines per split (e.g., 2000). Enable Wise Header Snap to never break inside a file header. Smart Code Awareness tries to split at blank lines or block ends.

4. Bundle & Download

Click BUNDLE PROJECT. A ZIP is generated containing name_part_001.txt, name_part_002.txt, ... and a tree.txt index.

What's Inside Each Split File?

Every part file ends with two lines that identify its position and display your custom disclaimer:

... (file content) ...
3/12
Disclaimer: This is a generated split - more content follows.
  • Part counter - shows "current part / total parts". Helps keep track when reading sequentially.
  • Disclaimer footer - you can customise this in the Engine Settings. Use it for copyright notes, usage instructions, or just a reminder that more parts exist.
  • FILE: headers - when ingesting from GitHub, each original file is prefixed with a separator and its path, making navigation easy.

Pro tip: If you're feeding these parts to an AI, the part counter and disclaimer help the model understand the document structure and that it's part of a larger whole.

Engine Settings Explained

Lines Per Split

Target line count for each part. The algorithm may adjust slightly to respect wise boundaries.

Naming Template

Use {{name}} for the project name and {{n}} for the zero-padded part number. Example: {{name}}_part_{{n}} -> myrepo_part_003.txt.

Footer Disclaimer

Text appended after the part counter. Useful for attribution, legal notices, or AI prompt context.

Wise Header Snap

When enabled, the splitter looks ahead for a FILE: header and places the cut before it. This guarantees no file header is split across two parts.

Smart Code Awareness

If a perfect header break isn't found, the splitter will try to cut at a blank line, closing brace, or semicolon - keeping code blocks intact.

Local Storage & Privacy

All settings (including your GitHub token) are stored only in your browser's localStorage. They never leave your device. Use the "Reset Defaults" button in the settings panel to wipe all saved data.

Troubleshooting

  • "API rate limit exceeded" - Add a GitHub personal access token (classic or fine-grained) in the token field. No scopes are required for public repos.
  • Large repository warning - Repos with >500 text files trigger a confirmation. You can still proceed, but the ingest may be slow.
  • PDF text extraction is messy - PDF.js extracts raw text; complex layouts may lose formatting. For best results, use plain text or DOCX.
  • "Nothing to process" - Ensure the editor has content or a valid file is selected. Click "Ingest Repo" or upload a file first.