Snapshots.py is a tool that allows you to quickly generate machine/AI-readable documentation that shows your project's current folder and file structure, as well as the updated contents of all the files, all inside a markdown file.
Integrate Snapshots.py
into your project by following these steps:
- Visit the GitHub repository at gbti-labs/py-snapshots-for-ai.
- Click on the green Code button, then select Download ZIP from the dropdown menu.
- Save the ZIP file to your desktop or another preferred location and extract its contents.
From the extracted folder, copy the following files and folders into the base directory of your project application:
snapshot.py
: The main script file for generating snapshots.snapshots/
: The directory intended for storing generated snapshot files.
Open your command line interface (CLI), navigate to your project's base directory, and install the required dependencies using the following commands:
pip install chardet==5.1.0
pip install gitignore-parser==0.1.3
pip install pyperclip==1.8.2
pip install pytz==2022.7.1
This will ensure all necessary libraries are installed for Snapshots.py
to operate correctly within your project.
Ensure that snapshot.py
is located in your project's base directory and that the snapshots/
folder is present and correctly placed. You're now ready to utilize Snapshots.py
within your project.
Snapshots can be generated by running the snapshot.py
script, which can be executed in the terminal of your code editor.
python snapshot.py
The resulting snapshot markdown files will be present inside the snapshots/captures
folder.
To preview a snapshot, you can navigate to the snapshots/captures
folder in the GitHub repo and click on one of the markdown files.
Snapshots.py includes the following features:
- Auto-detect sensitive keys in JSON files and obfuscate them, so your data is better protected from AI.
- Customizable pattern-based ignore system that helps you prevent including unwanted information in your markdown reports.
- Prependable message to explain to the AI the nature of the markdown document and how to interpret it.
These features can be customized in the snapshot.py
file.
Thanks for reading! If you like our content, please consider following us!
Twitter/X | GitHub | YouTube | Dev.to | Daily.dev | Hashnode | Blog / Discord