packtxt
v1.0.8
Published
A fast CLI that turns any folder into a single text file — perfect for sharing codebases with AI.
Readme
📦 packtxt — Convert Any Folder Into One Clean Text File
packtxt is a fast and lightweight CLI tool that converts your entire folder into one clean text file.
Perfect for sharing full codebases with AI tools like ChatGPT, Claude, Gemini, or Copilot.
🔥 Why packtxt?
AI tools work best when they receive complete, structured context, but developers face problems like:
- Too many files to copy manually
- ZIP files cannot be read by AI
- Missing files break AI understanding
- Multi-file debugging becomes difficult
- File boundaries get mixed
- AI hallucinates when context is incomplete
packtxt solves this by generating one AI-ready text file with clear file separation.
💡 What Does packtxt Actually Do?
packtxt takes every file in your folder and structures it like this:
--- intro.js ---
console.log("This is intro file")
--- about.js ---
console.log("This is about file")
--- contact.js ---
console.log("This is contact file")This ensures AI always knows:
- Which file starts where
- Which file ends where
- How the project is structured
📁 Example Folder Structure
project/
├── intro.js
├── about.js
└── contact.js📄 Example File Contents
intro.js
console.log("This is intro file")about.js
console.log("This is about file")contact.js
console.log("This is contact file")🧾 Final Output (Generated by npx packtxt)
--- intro.js ---
console.log("This is intro file")
--- about.js ---
console.log("This is about file")
--- contact.js ---
console.log("This is contact file")⚙️ Features
- ✅ Converts entire folder → one clean file
- ✅ Respects .gitignore
- ✅ Auto-ignores
node_modules,.git, and system folders - ✅ Sorted output
- ✅ Interactive mode (
-i) - ✅ Auto clipboard copy
🚀 Usage
Run directly:
npx packtxtInteractive mode:
npx packtxt -i🧪 Testing Instructions
- Create a folder
- Add a few files
- Run:
npx packtxt - Check
packtxt-output.txt - Test
.gitignoreto skip files
🎯 Why You Should Use packtxt
- ✅ AI gets complete context
- ✅ Zero missing files
- ✅ Perfect for debugging multi-file issues
- ✅ Ideal for refactoring with AI
- ✅ Saves hours of time
🗺️ Roadmap
- [ ] Markdown output mode
- [ ] Token counting
- [ ] Pretty TUI interface
- [ ] Diff mode
- [ ] Web UI
Made with ❤️ by Hammad Hassan
