| name | jbang |
| description | JBang as a universal Java launcher and tool manager — run JARs, Maven artifacts, and remote scripts without writing any code. Use this skill when the user wants to run a JAR or WAR file, execute a Maven artifact by GAV coordinates, install a Java tool as a system command, manage JDK versions, browse the JBang AppStore, set up catalogs to publish or distribute Java apps, run remote scripts from URLs or GitHub, or use JBang in CI/CD pipelines. Also triggers for "jbang app install", "jbang jdk", running anything by Maven coordinates, or publishing apps via catalogs. This skill is about USING and DISTRIBUTING Java tools — for WRITING JBang scripts, see the jbang-scripting skill instead. |
JBang — Universal Java Launcher & Tool Manager
JBang isn't just for scripting. It's a universal launcher for anything Java — run JARs, Maven artifacts, WARs, and remote code from URLs, all without project setup. Manage JDK installations. Install Java tools as system commands. Publish your apps so users can run them with a single short command.
No code writing required for any of this.
Install JBang
curl -Ls https://sh.jbang.dev | bash -s - app setup
sdk install jbang
brew install jbangdev/tap/jbang
choco install jbang
Run Anything Java
By Maven Coordinates (GAV)
Run any artifact from Maven Central — no download, no install, no code:
jbang com.h2database:h2:2.2.224
jbang info.picocli:picocli-codegen:4.6.3
jbang org.apache.camel:camel-jbang:4.4.0
jbang --main com.example.Tool com.example:mylib:1.0.0
jbang --deps org.postgresql:postgresql:42.6.0 com.example:dbtools:1.0
JARs and WARs
jbang myapp.jar
jbang myapp.jar arg1 arg2
jbang https://example.com/releases/tool-1.0.jar
jbang https://download.example.com/app.war
jbang --deps com.google.code.gson:gson:2.11.0 myapp.jar
jbang --main com.example.Main myapp.jar
Remote Scripts and URLs
jbang https://github.com/user/repo/blob/main/tool.java
jbang https://gist.github.com/user/abc123
jbang https://example.com/scripts/utility.java
Inline Code
jbang -c 'System.out.println("Hello from JBang!")'
Interactive REPL
jbang --interactive
jbang --interactive myapp.java
Aliases & Catalogs
Catalogs are the way to publish and distribute Java tools with short, memorable names. Users don't need to know about Maven coordinates, JAR locations, or flags — they just type a short command.
Running from Catalogs
jbang hello@jbangdev
jbang gavsearch@jbangdev hibernate
jbang httpd@jbangdev -d ./public
jbang quarkus@quarkusio
jbang camel@redhat-camel
Creating Local Aliases
jbang alias add --name mytool myapp.java
jbang alias add --name h2 com.h2database:h2:2.2.224
jbang alias add --description "Run our deploy tool" --name deploy deploy.jar
jbang alias list
jbang alias list --show-origin
Publishing a Catalog for Your Org/Project
This is how real projects like Quarkus, Camel, and Microsoft publish their tools. Users run jbang <cmd>@<your-org> and it just works.
Step 1: Create a jbang-catalog repo (or add jbang-catalog.json to any repo).
Step 2: Define aliases — they can point to Maven artifacts, JARs, or scripts:
{
"aliases": {
"mytool": {
"script-ref": "com.yourorg:mytool-cli:1.3.0",
"description": "Run MyTool CLI"
},
"mytool-lts": {
"script-ref": "https://releases.yourorg.com/mytool-1.2.5.jar",
"description": "MyTool LTS release"
},
"devutil": {
"script-ref": "devutil.java",
"description": "Internal development utility"
}
}
}
Step 3: Users run it:
jbang mytool@your-org
jbang app install mytool@your-org
mytool --help
For detailed catalog publishing, read references/catalogs-and-publishing.md.
Catalog Placement Options
| Option | Location | User runs | Best for |
|---|
| Org-level (recommended) | github.com/<org>/jbang-catalog repo | jbang cmd@org | Multiple tools, stable namespace |
| Repo-level | jbang-catalog.json in any repo | jbang cmd@org/repo | Single product |
| Website | https://domain.com/jbang-catalog.json | jbang cmd@domain.com | Custom domains |
Alias Options in Catalog JSON
Aliases can bundle default arguments, JVM options, and Java version requirements:
{
"aliases": {
"myapp": {
"script-ref": "com.example:myapp:2.0.0",
"description": "My application with predefined settings",
"arguments": ["--verbose", "--port", "8080"],
"runtime-options": ["--add-opens", "java.base/java.lang=ALL-UNNAMED"],
"java": "17+"
}
}
}
Adding Catalogs
jbang catalog add --name team https://github.com/myteam/jbang-tools
jbang alias list team
jbang deploy@team
Quick Catalog Bootstrap
jbang init -t jbang-catalog jbang-catalog
This generates a catalog repo with Renovate and GitHub Actions pre-configured.
Install Java Tools as System Commands
jbang app setup
jbang app install gavsearch@jbangdev
gavsearch hibernate
jbang app install --name search gavsearch@jbangdev
search hibernate
jbang app install info.picocli:picocli-codegen:4.6.3
jbang app install https://github.com/user/repo/blob/main/tool.java
jbang app install --native mytool.java
jbang app list
jbang app uninstall search
jbang app install --force gavsearch@jbangdev
JDK Management
JBang downloads and manages JDKs automatically — no manual installation needed:
jbang jdk list
jbang jdk install 21
jbang jdk install 17 --vendor temurin
jbang jdk default 21
jbang jdk home 17
jbang jdk java-env 21
jbang jdk uninstall 11
eval $(jbang jdk java-env 21)
JDK Configuration
export JBANG_DEFAULT_JAVA_VERSION=17
export JBANG_JDK_VENDOR=temurin
JBang auto-downloads the right JDK when a script requires a specific version (//JAVA 21+).
Trust and Security
jbang trust add https://github.com/myorg/
jbang trust add https://internal.example.com/
jbang trust list
jbang trust remove https://github.com/myorg/
jbang --insecure https://self-signed.example.com/app.java
CI/CD Integration
GitHub Actions
- uses: jbangdev/setup-jbang@main
- run: jbang mytool@myorg --input data.csv
Docker
docker run -v $(pwd):/ws --workdir=/ws jbangdev/jbang-action mytool.java
docker run -v $(pwd):/ws --workdir=/ws jbangdev/jbang-action com.example:tool:1.0
Build Tool Plugins
See references/ci-and-integration.md for full details.
Configuration
jbang config set edit.open code
jbang config set run.debug 4004
jbang config list
jbang config list --show-available
jbang config list --show-origin
Any CLI option can become a default: <command>.<option> (e.g., app.list.format).
Cache Management
jbang cache clear
jbang cache list
jbang --fresh mytool@myorg
jbang --offline mytool@myorg
Common Real-World Examples
jbang com.h2database:h2:2.2.224
jbang gavsearch@jbangdev hibernate
jbang httpd@jbangdev -d .
jbang https://github.com/jbangdev/jbang-examples/blob/main/examples/helloworld.java
jbang app setup
jbang catalog add --name team https://github.com/myteam/tools
jbang app install deploy@team
jbang app install monitor@team
deploy --env staging
Further Reading
references/catalogs-and-publishing.md — Full guide to creating, structuring, and publishing catalogs for your org or project
references/ci-and-integration.md — Docker, GitHub Actions, Maven/Gradle plugins, npm/pip integration, wrappers