To create a normal map from an image, connect an image node to the Normal Map node (then you may want to use a convert normal node to select directx or opengl format).
And yes you can generate a material using command line, but it would require a bit of scripting to actually batch normal maps creation.