Package Exports
- context-dump
- context-dump/dist/index.js
- context-dump/index.ts
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (context-dump) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Context Dump for AI
An interactive CLI tool to generate AI-friendly context from selected files, making project data easily consumable for AI models.
Features
- Interactive File Selection: Choose files using a checkbox interface.
- Intelligent File Filtering: Automatically ignores common files and directories (e.g.,
node_modules,.git). .gitignoreCompliance: Respects.gitignorerules to streamline file selection.- Structured JSON Output: Outputs a JSON file containing the project structure and file contents.
Installation
Install the tool globally with:
npm install -g context-dumpUsage
Basic Command
Run the tool with a simple command:
context-dumpBy default, the output is saved to ai_context.json in the current directory.
Options
Specify Output File
Use the -o or --output option to specify a custom output file:
context-dump -o custom_output.jsonExclude Specific Files or Folders
Use the -e or --exclude option to exclude specific files or folders (comma-separated):
context-dump -e foo,barScreenshots

Output Structure
The output JSON file contains two main sections:
project_structure: A list of file paths included in the output.file_contents: A dictionary where keys are file paths, and values include the file content and extension.
Example Output
{
"project_structure": ["example.js"],
"file_contents": {
"example.js": {
"content": "console.log('Hello, World!');",
"extension": "js"
}
}
}Contributing
Submit issues or pull requests to help improve this tool.
License
This project is licensed under the MIT License. See the LICENSE file for details.