How do I do GPU rendering with enabled OptiX from the Command Line? I need help running Blender from the command line with GPU rendering. Also, Optix must be enabled.
I read this article:

How do I do GPU rendering from the Command Line?

very much helped, but now I would like to know how to do the same with Optix
Thank you to everyone who helped!
I found a solution to the problem:
-b $filename -noaudio -E 'CYCLES' -s 20 -e 170 -a -F 'PNG' -- --cycles-device OPTIX  

Explanation:
-s 20 -e 170

Set the -s start frame to 20 and the -e end frame to 170.
-a

Render the whole animation using all the settings saved in the blend-file.
-- --cycles-device OPTIX

Override the device that is used to render frames.