How to set application icon using command line?

I created an application using "Script Editor".

I would like to override the default icon using command line vs the usual drag and drop approach.

Is that possible?

Thanks!


The following approach worked to replace default icon (located at /Applications/Hello World.app/Contents/Resources/applet.icns for example) of "Hello World" application created using "Script Editor" with another icns icon file (Firefox icon for example).

cp "/Applications/Firefox.app/Contents/Resources/firefox.icns" "/Applications/Hello World.app/Contents/Resources/applet.icns"
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -f "/Applications/Hello World.app"