code-contextify
v1.0.4
Published
Transform entire codebases into AI-ready context. Perfect for LLM prompting, code documentation, and project analysis.
Maintainers
Readme
🧠 code-contextify
Transform your entire codebase into AI-ready context in seconds
"Turn thousands of files into one perfect prompt for your AI assistant"
🚀 Why code-contextify?
Fed up with copying and pasting files into ChatGPT? Struggling to give Claude the full picture of your project? code-contextify solves this by creating a single, comprehensive text file containing your entire project structure and content - perfectly formatted for AI consumption.
Perfect For:
- 🤖 LLM Prompting - Give AI assistants complete project context
- 📚 Documentation - Generate instant project overviews
- 🔍 Code Reviews - Share full context with teammates
- 📊 Project Analysis - Understand complex codebases quickly
- 🎯 Debugging - Let AI analyze your entire codebase at once
🎯 Quick Start
# Install globally
npm install -g code-contextify
# Navigate to your project folder and run:
code-contextify
# Or, to analyze a different directory:
code-contextify /path/to/your/project
# That's it! Your context file is ready 🎉🛠️ Installation
Prerequisites
- Node.js >= 14.0.0
Install Options
# Global installation (recommended)
npm install -g code-contextify
# Or use npx without installing
npx code-contextify /path/to/project🎮 Usage Guide
Basic Usage
# Convert current directory
code-contextify
# Convert specific directory
code-contextify /path/to/your/project
# Custom output filename in current directory
code-contextify my-project-context.txtAdvanced Filtering
# Exclude specific folders from the current directory
code-contextify --filter "node_modules,dist,build"
# Exclude files with specific patterns
code-contextify --filter "test,__mocks__,*.spec.js"
# Complex filtering with paths
code-contextify --filter "src/tests,docs,temp,*.log"Real-World Examples
1. Prepare for AI Code Review
code-contextify review-context.txt --filter "node_modules,dist,*.min.js"2. Share Project Context with Team
code-contextify /path/to/project team-brief.txt3. Create Documentation Context
code-contextify docs-context.txt --filter "tests,__tests__,*.test.*"4. Debug with AI Assistant
code-contextify debug-context.txt --filter "node_modules,*.log,temp"📋 What's In The Output?
Your generated context file includes:
📊 Project Overview
Project Statistics:
Total Files: 42
Total Size: 1.25 MB
🌳 Smart Directory Tree
Folder Structure (Tree)
=====================
Legend: ✗ = Excluded
├── src/
│ ├── components/
│ │ ├── Header.js
│ │ └── Footer.js
│ └── utils/
├── node_modules/ ✗
├── package-lock.json (123.45 KB) ✗
└── README.md (2.34 KB)📄 File Contents
src/components/Header.js
------------------------
import React from 'react';
// ... actual file content🧠 AI Prompting Tips
Perfect Prompts to Use:
Here's the complete context of my project.
Please help me [your specific request]:
[Generated context content here]Common Use Cases:
- "Explain this codebase to me"
- "Find potential bugs in this project"
- "Suggest improvements to this architecture"
- "Write documentation for this project"
- "Help me understand how these components work together"
⚙️ How It Works
Smart Filtering System
✅ Automatically Excludes:
- Binary files (images, executables, etc.)
- Configuration files (
package-lock.json,.env) - Common directories (
node_modules,.git) - Git-ignored files and patterns
- Media files (videos, audio, etc.)
✅ Intelligently Includes:
- Source code files
- Documentation
- Configuration files you actually need
- Text-based assets
Technology Detection
Automatically identifies:
- JavaScript/TypeScript
- React/Vue/Angular
- Python
- And many more!
🎯 Pro Tips
1. Optimize for Different AI Models
# For models with smaller context windows
code-contextify --filter "tests,docs,examples,*.md"
# For models with large context windows
code-contextify # Include everything!2. Create Project Snapshots
# Timestamped context files
code-contextify project_$(date +%Y%m%d_%H%M%S).txt3. Focus on Specific Areas
# Only include source code
code-contextify --filter "tests,docs,*.md,*.json,*.yml"
# Only include tests
code-contextify tests-context.txt --filter "src,docs,*.md"🛡️ Security & Privacy
- Local Processing - Your code never leaves your machine
- Respects .gitignore - Doesn't include ignored files
- No Telemetry - Zero data collection
- Open Source - Audit the code yourself
🤝 Contributing
Contributions welcome! Here's how to get started:
- Fork the repository
- Create your feature branch:
git checkout -b feature/AmazingFeature - Commit your changes:
git commit -m 'Add some AmazingFeature' - Push to the branch:
git push origin feature/AmazingFeature - Open a Pull Request
Areas Needing Help:
- 🌍 Language detection improvements
- 🎨 Better output formatting
- ⚡ Performance optimizations
- 📚 More examples and documentation
- 🧪 Test coverage
📄 License
This project is licensed under MIT with Commons Clause - see the LICENSE file for details.
Commercial use requires permission.
👨💻 Author
Nidal Siddique Oritro
- Website: iam.ioritro.com
- GitHub: @ElvinEga
Built with ❤️ for developers working with AI
🆘 Support
Need help?
- 🐛 Report an issue
- 💬 Join discussions
- 📧 Contact the author
🌟 Show Your Support
If this tool saves you time:
- ⭐ Star this repository
- 🐦 Tweet about it
- 🤝 Recommend to fellow developers
- 💖 Sponsor the project
"Turn your codebase into conversation - one context file at a time"
