Workbench Outlines not appearing when rendering animation from command line
I ran into the same problem today, and I found a solution by using the OpenGL render in a python script as such:
import bpy

# Most cited way of rendering via python:
#bpy.ops.render.render(animation=True)
# Produces no outline as by using blender -b myfile.blend -a


# Render with OpenGL:
bpy.ops.render.opengl(animation=True, view_context=False)
# Produces outlines as in the GUI

This can be used from a terminal like so:
blender myBlenderFile.blend --python myPythonScript.py 

Note however that I omitted the background flag -b due to that OpenGL does not support Blender running in the background. So depending on why you want to render from a terminal this solution might not be valid.
It worked well for me, however. Furthermore, it also resulted in a render speed increase as it seems like it better utilized multiple CPU threads.
&quot;Standard&quot; example where outline doesn't take

OpenGL example where outline works