Show HN: Pack-repo-4ai – CLI to pack Git repos for LLM context (XML-optimized)

  • Posted 12 hours ago by allenwowo2015
  • 2 points
https://github.com/zwowo1997/pack-repo-4ai
OP here.

I built this yesterday because I kept hitting the "context wall" when trying to feed my whole src folder into DeepSeek R1 for refactoring.

Most copy-paste tools I found were either too heavy or didn't handle node_modules correctly (I once accidentally pasted a 5mb lockfile into Claude and burned my limit instantly).

This CLI (pack-repo-4ai) is pretty simple:

Scans your repo (ignoring junk like __pycache__, .venv, and binaries).

Wraps each file in <file path="..."> XML tags. I've found Reasoning Models follow directory structure much better with XML boundaries than standard markdown.

Dumps it to your clipboard.

It's a simple Python script, but it saves me about 10 minutes a day. Would love to know if the XML format helps your R1 outputs as much as it helped mine.

0 comments