jbang-init - Initialize a script.


jbang init -o [-h] [--force] --fresh [--insecure] [--jsh] --quiet --verbose [--config=<config>] [-t=<initTemplate>] [-D=<String=Object>]…​ [--deps=<dependencies>]…​ <scriptOrFile>


Initialize a script.



Path to config file to be used instead of the default

-D, <String=Object>

set a system property


Add additional dependencies (Use commas to separate them).


Force overwrite of existing files


Make sure we use fresh (i.e. non-cached) resources.

-h, --help

Display help/info. Use 'jbang <command> -h' for detailed usage.


Enable insecure trust of all SSL certificates.


Force input to be interpreted with jsh/jshell

-o, --offline

Work offline. Fail-fast if dependencies are missing. No connections will be attempted


jbang will be quiet, only print when error occurs.

-t, --template=<initTemplate>

Init script with a java class useful for scripting


jbang will be verbose on what it does.



A file with java code or if named .jsh will be run with jshell