npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

code-contextify

v1.0.4

Published

Transform entire codebases into AI-ready context. Perfect for LLM prompting, code documentation, and project analysis.

Readme

🧠 code-contextify

Transform your entire codebase into AI-ready context in seconds

npm version Node.js License

"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.txt

Advanced 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.txt

3. 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).txt

3. 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:

  1. Fork the repository
  2. Create your feature branch: git checkout -b feature/AmazingFeature
  3. Commit your changes: git commit -m 'Add some AmazingFeature'
  4. Push to the branch: git push origin feature/AmazingFeature
  5. 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

Built with ❤️ for developers working with AI


🆘 Support

Need help?


🌟 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"