DEV Community

Awa
Awa

Posted on

1

Context Dump: Simplifying AI File Preparation

If you’ve ever needed to gather specific project files for an AI task, Context Dump might help. It’s a simple CLI tool to generate a JSON dump of your project’s structure and content, ready for AI consumption.

What It Does

Lets you select files interactively using a checkbox.
Automatically ignores files like node_modules, .git, or anything in your .gitignore.
Outputs a structured JSON file containing file paths and contents.

How to Use It

  • Install:
npm install -g context-dump
Enter fullscreen mode Exit fullscreen mode
  • Run in any project directory:
context-dump  
Enter fullscreen mode Exit fullscreen mode

JSON output is saved to ai_context.json by default.

  • You can also:

Change the output filename with -o.
Exclude specific files or folders with -e.

Example Output

Here’s what the JSON looks like:

{  
  "project_structure": ["example.js"],  
  "file_contents": {  
    "example.js": {  
      "content": "console.log('Hello, World!');",  
      "extension": "js"  
    }  
  }  
}
Enter fullscreen mode Exit fullscreen mode

Check it out on Github . If it sounds useful, give it a try.

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

Top comments (0)

Image of Datadog

The Future of AI, LLMs, and Observability on Google Cloud

Datadog sat down with Google’s Director of AI to discuss the current and future states of AI, ML, and LLMs on Google Cloud. Discover 7 key insights for technical leaders, covering everything from upskilling teams to observability best practices

Learn More

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay