evirgenfurkan/pbinject ? reverse-engineered prompt

Reverse engineered prompt

Build me a small Python command line tool that syncs data from a Google Sheets CSV export or a local CSV file into a PocketBase collection.

I want it to work like a real sync, not just an importer. It should create new records, update existing ones when the key matches, and delete records from PocketBase that no longer exist in the source sheet unless I choose to keep them. It should read the PocketBase collection schema at runtime, figure out the matching fields automatically, and let me override the unique key if needed.

Please handle common messy CSV values too, like Turkish number formats, dates in day month year format, and simple yes or no values. If a field is a relation, it should send the PocketBase record id and create missing related records when needed. Add a dry run mode, a warning before deletions, a watch mode to repeat the sync every few seconds, and a log file for each run. Use environment variables for the PocketBase login and sheet URL, and look up current PocketBase docs online if you need to.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab