Hi @mandalorian2000 and @tulipit,
Unfortunately the CLI doesn’t support restoring items from trash.
I was messing around with this, though, and I think we can simulate a restore by manually creating the cloud files for the items that are listed in the trash. For example, if you have a listing of the files in the trash using the CLI, you can take a full path, append a .cloud (or .cloudf if its a folder) and create that placeholder file in that location.
On Mac you would use something like:
touch /Users/TheDude/odrive/Google Drive/myfile.txt.cloud
On Windows it would be something like:
echo "" > C:\Users\TheDude\odrive\Google Drive\myfile.txt.cloud
odrive should see this and remove the item from the trash listing, allowing you to sync that new placeholder.
Make sure you try it on a few files to make sure it provides the desired result, before you go crazy with a script