How do I add border

Goal: to add border of selected width.

Relevant reading:

To add a border use bordercolor and border commands:

magick <input-file> -bordercolor <color> ^
                    -border <x width x y width><output-file>

If vertical and horizontal borders are to be of the same width you may use shorthand -border <width>.

example

      magick input\input.png -bordercolor #000000 -border 4 output\output.png

explanation

result