Show HN: Docgen – your project in a single text file (github.com)

🤖 AI Summary
Docgen is a new open-source tool (Show HN) that generates a single, comprehensive text file representing an entire project—directory tree plus full file contents—optimized for sharing with LLMs or quick human review. Built in Go and installable via make, it outputs a project_doc.txt that includes a visual tree, clear headers between files, and a pragma marker (# DOCGEN-OUTPUT:) to avoid recursion. CLI options let you preview included files, print trees (graphic/plain), and set custom output locations. Technically it’s git-aware (uses git check-ignore), respects .gitignore by default, and supports a .docgen_ignore file for additional include/exclude rules (gitignore syntax, with negations). It employs fast filtering: known-binary extension skips, content inspection of the first 8KB (null bytes, magic bytes like %PDF, non-printables) to detect and skip binaries, and a default per-file size cap (2MB). It also omits previous docgen outputs and recommends running in pre-commit to keep docs up to date. For AI/ML workflows this simplifies giving models full project context, aids audits, code review, and diff-based history tracking—while still requiring caution about secrets and large assets since the tool emphasizes filtering but can include git-ignored files if explicitly allowed.
Loading comments...
loading comments...