|
1 | 1 | # JBang scripts for JabRef
|
2 | 2 |
|
3 |
| -This directory contains [JBang](https://www.jbang.dev/) scripts for JabRef. |
| 3 | +This directory contains JBang scripts for JabRef. |
| 4 | +[JBang](https://www.jbang.dev/) allows for running Java applications without having a JDK installed (before). |
4 | 5 |
|
5 | 6 | Three use cases:
|
6 | 7 |
|
7 | 8 | - Try out any pull request with minimal installation. See [our blog entry](https://blog.jabref.org/2025/05/31/run-pr/) for details.
|
8 |
| -- Run `JabKit` - JabRef's CLI tool. |
9 |
| -- Run `JabSrv` - JabRef's HTTP server. |
| 9 | +- Run JabKit - JabRef's CLI tool. |
| 10 | +- Run JabSrv - JabRef's HTTP server. |
10 | 11 |
|
11 |
| -## Running `JabKit` |
| 12 | +## Running JabKit without installation |
12 | 13 |
|
13 |
| -If you have JBang installed, just run `jbang jabkit@jabref --help` |
| 14 | +By using [gg.cmd](https://github.com/eirikb/gg#ggcmd) you can "just run" JabKit with minimal setup: |
14 | 15 |
|
15 |
| -If not, download [`gg.cmd`](https://github.com/eirikb/gg/tree/main?tab=readme-ov-file#ggcmd), place it in the current directory (or on your `PATH`) and execute: |
| 16 | +1. Download `gg.cmd` from: <https://github.com/eirikb/gg#ggcmd>. `gg.cmd` is a "binary" running on macOS, Linux, and Windows. No need for different binaries on different operating systems. |
| 17 | +2. Run `gg.cmd`. This will download and use JBang as wrapper around running JabKit: |
16 | 18 |
|
17 |
| - gg.cmd jbang jabkit@jabref --help |
| 19 | + - Linux/macOS: Run `sh ./gg.cmd jbang jabkit@jabref --help`. |
| 20 | + - Windows: Run `gg.cmd jbang jabkit@jabref --help`. |
18 | 21 |
|
19 |
| -## Running `JabSrv` |
| 22 | +You can also put `gg.cmd` on your `PATH` and make it executable. |
| 23 | +Then you enable `alias jabkit='gg.cmd jbang jabkit@jabref`. |
20 | 24 |
|
21 |
| -If you have JBang installed, just run `jbang jabsrv@jabref --help` |
| 25 | +## Running JabKit with JBang |
22 | 26 |
|
23 |
| -With `gg.cmd`: |
| 27 | +If you have JBang installed, just run |
| 28 | + |
| 29 | +```terminal |
| 30 | +jbang jabkit@jabref --help |
| 31 | +``` |
| 32 | + |
| 33 | +You can also install `jabkit` permanently in your `PATH`: |
| 34 | + |
| 35 | +1. [Install JBang](https://www.jbang.dev/download/). E.g., by `brew install jbangdev/tap/jbang` or `choco install jbang` |
| 36 | +2. Make `jabkit` available on the command line: `jbang app install jabkit@jabref` |
| 37 | +3. Run `jabkit --help` |
| 38 | + |
| 39 | +[JBang takes care about updating JabKit automatically](https://github.com/orgs/jbangdev/discussions/1636#discussioncomment-6150992). |
24 | 40 |
|
25 |
| - gg.cmd jbang jabsrv@jabref --help |
| 41 | +## Running JabSrv |
| 42 | + |
| 43 | +If you have JBang installed, just run following command |
| 44 | + |
| 45 | +```terminal |
| 46 | +jbang jabsrv@jabref --help |
| 47 | +``` |
| 48 | + |
| 49 | +With `gg.cmd`: |
26 | 50 |
|
| 51 | +```terminal |
| 52 | +sh ./gg.cmd jbang jabsrv@jabref --help |
| 53 | +``` |
0 commit comments