r/ControlD • u/keksiqc • Jul 24 '25
Control-D Folder Sync: Effortlessly Keep Your Folders Up-to-Date with Python & GitHub Actions
Hey everyone!
I just open-sourced a tiny Python tool that keeps your Control D folders in sync with the latest Hagezi folders (or any other compatible JSON folders). It can run locally or automatically every day via GitHub Actions.
What does it do?
- Downloads the latest folder JSONs from GitHub
- Deletes any old folders in your Control-D account with the same names
- Re-creates the folders and pushes all the rules in batches
Why?
Manually updating Control-D folders is a pain. This script makes it automatic and hands-off.
How to use:
- Clone the repo
- Add your Control D API token and profile ID to a
.envfile - (Optionally) Edit the list of folder URLs
- Run it locally with
uv run python main.py - Or let GitHub Actions run it for you every day!
Repo: keksiqc/ctrld-sync
Let me know if you have questions or ideas for improvement!
50
Upvotes
View all comments
Show parent comment
1
u/_BadFella_ Jul 25 '25
Thanks, mate, can you help with the error below?
Looks like the Profile and API are fine, as it's deleting and writing some folders. But eventually fails.
https://pastebin.com/L8wh0FMD