Easy but manual
The following command will generate an image name mydiagram.png
Let's try to update it every 10s with watch. It's a good start but it refresh the diagram even if it's not saved. It you are not lucky it could take ~10s to display the change. (Ok you can lower the watch duration but...)
watch -n 10 plantuml mydiagram.puml
inotifywatch listen for filesystem events so it will reload the diagram at the right time : when you save it.
while inotifywait -e move_self cd.puml; do plantuml cd.puml; echo ""; done
My editor is vim so I'm listening to the event move_self that is enough but maybe it's not suitable with another editor. You could watch for events with inotifywatch.
In fact, vim have this feature built in with the autocmd.
autocmd BufWritePost *.puml !plantuml %