A Python script that recursively analyzes SvelteKit projects and generates a formatted text file suitable for use in Large Language Model (LLM) contexts, particularly designed for Claude.
git clone https://github.com/yourusername/python-for-sveltekit-context-generator.git
cd python-for-sveltekit-context-generator
pip install -r requirements.txt
Basic usage:
python app.py /path/to/your/sveltekit/project
With minification enabled:
python app.py /path/to/project --minify
With custom output file:
python app.py /path/to/project --output custom_output.txt
Exclude specific patterns:
python app.py /path/to/project --exclude tests coverage
directory
: Path to the SvelteKit project (required)--output
, -o
: Output file path (default: project_context.txt)--exclude
, -e
: Additional patterns to exclude (space-separated)--minify
, -m
: Enable minification of file contentsThe script generates a structured output file containing:
<project>
<structure>
<!-- Directory tree structure -->
</structure>
<files>
<!-- Individual file contents with metadata -->
</files>
<statistics>
<!-- Size reduction statistics (if minification enabled) -->
</statistics>
</project>
The script automatically excludes:
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.