jbang-alias-add - Add alias for script reference.


jbang alias add -o [-gh] --fresh --quiet --verbose [--config=<config>] [-d=<description>] [-f=<catalogFile>] [-j=<javaVersion>] [-m=<mainClass>] [--name=<name>] [--cp=<classpaths>]…​ [-D=<String=String>]…​ [--deps=<dependencies>]…​ [--java-options=<javaRuntimeOptions>]…​ [--repos=<repositories>]…​ scriptOrFile [params…​]


Add alias for script reference.



Path to config file to be used instead of the default

--cp, --class-path=<classpaths>

Add class path entries.

-d, --description=<description>

A description for the alias

-D, <String=String>

set a system property


Add additional dependencies (Use commas to separate them).

-f, --file=<catalogFile>

Path to the catalog file to use


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

-g, --global

Use the global (user) catalog file

-h, --help

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

-j, --java=<javaVersion>

JDK version to use for running the alias.


A Java runtime option

-m, --main=<mainClass>

Main class to use when running. Used primarily for running jar’s.


A name for the alias

-o, --offline

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


jbang will be quiet, only print when error occurs.


Add additional repositories.


jbang will be verbose on what it does.



A file or URL to a Java code file


Parameters to pass on to the script