I need to create a layered PSD file with ImageMagick or any other command-line tool available on Linux platform. Since I need to do this on Linux server, I
You can create a layered PSD with ImageMagick, but note the first image is actually used as the preview image (i.e. composite of all the layers).
convert -size 100x100 plasma:fractal plasma:fractal plasma:fractal out.psd
Will create a 2 layered PSD.