https://github.com/jbangdev/jbang-idea
IntelliJ IDEA plugin for JBang
https://github.com/jbangdev/jbang-idea
Last synced: 8 months ago
JSON representation
IntelliJ IDEA plugin for JBang
- Host: GitHub
- URL: https://github.com/jbangdev/jbang-idea
- Owner: jbangdev
- License: mit
- Created: 2021-12-19T07:07:27.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-07-06T09:33:20.000Z (9 months ago)
- Last Synced: 2025-07-30T05:54:26.602Z (8 months ago)
- Language: Kotlin
- Homepage: https://plugins.jetbrains.com/plugin/18257-jbang
- Size: 6.81 MB
- Stars: 20
- Watchers: 3
- Forks: 13
- Open Issues: 32
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
jbang-idea-plugin
======================
[](https://github.com/maxandersen/jbang-idea/actions/workflows/build.yml)
[](https://plugins.jetbrains.com/plugin/18257)
[](https://plugins.jetbrains.com/plugin/18257)
**JBang plugin** is a plugin for IntelliJ IDEA to integrate [JBang](https://www.jbang.dev/).
The following features are available:
* Sync Dependencies to IDEA's module when using `idea .` to open JBang project
* Define JBang location if not found in PATH or JBANG_HOME
* JSON Schema for jbang-catalog.json and code completion for `script-ref`
* JDKs sync with JBang: sync JDKs from JBang to IntelliJ IDEA
* JBang script creation from file templates: New -> JBang Script
* JBang directives completion: for example `//DEPS`, `//SOURCES`
* Sync Dependencies between JBang and Gradle
* JBang Run Line Marker for `///usr/bin/env jbang`
* Java scratch file support
* Run Configuration support: run JBang script by right click
* file name end with '.java', '.kt', '.groovy' or '.jsh'
* file code should contain `///usr/bin/env jbang` or `//DEPS`
* GAV completion for `//DEPS `
* text without colon - full text search `google.guava`, and words seperated by `.` or `-`
* text with one colon - artifact search based on groupId `com.google.guava:`
* text with two colons - version search based on groupId and artifactId `com.google.guava:guava:`
## Sync Dependencies between JBang and Gradle
Right click JBang script and Choose `Sync JBang DEPS` and sync dependencies between JBang script and build.gradle.
**Limitations**:
* Gradle Groovy support now: only detect `build.gradle`
* After sync, and you need to click `Refresh` floating button if without Auto-Reloading enabled
* Dependency remove detection: if you want to delete dependencies, and you should delete lines in build.gradle and script file by hand.
## Install
Preferences > Plugins > Marketplace > Search for "jbang" > Install Plugin > Restart IntelliJ IDEA
## Build
```
$ # JDK 11 required
$ ./gradlew -x test patchPluginXml buildPlugin
```
or if using just:
```
$ just build
```
Preferences > Plugins > Gear Icon Right Click > Install Plugin from Disk > Choose
$PROJECT_DIR/build/distributions/jbang-idea-plugin-0.x.0.zip > Restart IntelliJ IDEA