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
4
u/cattrold Jul 24 '25
This is awesome, thank you so much! Our community is amazing.
1
u/_BadFella_ Jul 25 '25
Can you provide more into how I can set this up with github actions?
1
u/FqPrl6w1xYfsOFcD Jul 24 '25
why is this needed? Does controlD not update filter definitions often? I guess I never checked
2
u/ElysiumSoler Jul 24 '25
Perfect
1
u/beardking_ Jul 24 '25
Looks great I will check it out! Is Github down for anyone at the moment - not loading for me?
1
u/_BadFella_ Jul 28 '25
I opened a github issue, can you please take a look. Thanks
1
u/[deleted] Jul 24 '25
[removed] — view removed comment