Adding login items from terminal in Catalina I've tried multiple ways but none work.
A few AppleScripts and even some bash script somebody made. Which essentially just executes a different AppleScript afaik.

Some of the commands I have tried:

osascript -e 'tell application "System Events" to make new login item at end with properties {path:"/Applications/AppName.app", name:"App Name", hidden:true}'

defaults write ~/Library/Preferences/loginwindow AutoLaunchedApplicationDictionary -array-add '{Path="/Applications/AppName.app";}'

defaults write loginwindow AutoLaunchedApplicationDictionary -array-add '{ "Name" = "AppName" ; "Path" = "/Applications/AppName.app"; "Hide" = 0; }'

defaults write loginwindow AutoLaunchedApplicationDictionary -array-add '&lt;dict&gt;&lt;key&gt;Hide&lt;/key&gt;&lt;false/&gt;&lt;key&gt;Path&lt;/key&gt;&lt;string&gt;/path/to/item&lt;/string&gt;&lt;/dict&gt;'
Try enabling AEServer and/or Script Editor in System Preferences > Security &amp; Privacy > Accessibility. Occasionally I've had to quit and relaunch System Preferences for new login items added via AppleScript to appear.

After doing this I was able to add login items via AppleScript. Confusingly, after I disabled Accessibility access for AEServer and Script Editor I was still able to add login items via AppleScript.