I'm working remotely on the Wolfram Engine bundled with the Raspberry Pi and I want to export a manipulatable plot as a CDF without needing to have the front end open. So for example, the following works to export a plot as a png:
plt1=Plot[Cos[x],{x,-6,6}]
UseFrontEnd[Export["~/plt.png",plt1]]
which creates a .png of the desired plot. My naive hope was that I could create a manipulatable plot in much the same fashion, i.e.
plt=Manipulate[Plot[Cos[-x+t],{x,-1,1}],{t,-4,4}]
UseFrontEnd[Export["~/mani.cdf",plt]]
but I see now that hope was misguided as it did not work. Could anyone show me a way to tell the backend to use the frontend to make me a CDF, or is this somehow not possible? All the sources for creating CDFs that I've seen involve going through the menus in a notebook interface which necessitates that I actually interact with the front end which is inconvenient for me.