Repository navigation
First release of dir2context, a CLI tool to recursively extract and serialize file contents from a directory — perfect for feeding LLMs, inspecting codebases, or generating context snapshots.
✨ Features
- 🗂 Recursively scan directories and subdirectories
- 🎯 Filter by file extensions, specific files or folders
- 🙈 Option to skip hidden files and directories
- ✂️ Automatically split output into chunks based on character limit (--chunk-size)
- 📄 Output in .txt with optional .json summary (--json)
- 🎨 Clean, color-coded, emoji-rich terminal output
- 🧪 Test-ready with Jest integration
- 🆘 Built-in help (--help) and versioning (--version)
🚀 Usage examples
# Process current directory
dir2context
# Include only JS and TS files
dir2context ./src --ext js,ts
# Exclude specific folders and chunk output
dir2context ./project --exclude-dirs test,mocks --chunk-size 10000
# Skip hidden files and generate JSON stats
dir2context --ignore-hidden --json