The CLI
A single command uploads your JAR, protects it in the cloud, and writes the result back. No local toolchain — just Java to run the CLI itself.
Install
Download the CLI from your account — a single
rymga-cli.jar that runs anywhere with Java 21+ (Windows, macOS,
Linux). Keep it wherever you like and run it with java -jar rymga-cli.jar.
Authenticate
The CLI authenticates with a seat API key. Create one under
Seats & keys (keys look like obf_sk_…
and are shown once). Pass it with --key, set OBF_KEY, or
let the interactive mode save it once to ~/.rymga/cli.properties
(owner-only) so you're never asked again.
Run it
Run it with no arguments and it walks you through it — it asks for your key (and offers to remember it), the input JAR, the config and the output:
java -jar rymga-cli.jar
# It asks for what it needs:
Seat API key: ••••••••
Save this key for next time (~/.rymga/cli.properties)? [Y/n] y
Input JAR to protect: app.jar
Config file (JSON): config.json
Output JAR [app-protected.jar]:
Or pass everything as flags (for scripts and CI). The URL defaults to
https://licenses.rymga.com and the product to lock-master,
so the short form is just:
export OBF_URL=https://licenses.rymga.com
export OBF_KEY=obf_sk_your_seat_key
java -jar rymga-cli.jar --product lock-master --in app.jar --config config.json --out app-obf.jar
The full, explicit form:
java -jar rymga-cli.jar \
--url https://licenses.rymga.com \
--key obf_sk_your_seat_key \
--product lock-master \
--in app.jar \
--config config.json \
--out app-obf.jar
Each successful run spends tokens metered by the build's size (1 up to 10 MB, +1 per extra 10 MB
— see Tokens). The protected JAR is written to
--out.
If your project depends on jars it doesn't bundle (the Paper API, shaded libs), the CLI also uploads the library jars you declare in your config — see Configuration → libraries.
Flags
| Flag | What it does |
|---|---|
| --config <file> | Required. Path to your JSON config. It must be a
non-empty object that enables at least one technique — an empty is rejected
(it would do nothing and waste a token). |
| --in <file> | The JAR to protect. |
| --out <file> | Where to write the protected JAR. |
| --mapping <file> | Optional. Incremental obfuscation: reuses this file's names for unchanged symbols (if it exists) and writes the new mapping back to it, so a renamed API stays stable across releases. Commit it. See the mapping file. |
| --key <key> | Your seat API key. Or set OBF_KEY. |
| --url <url> | The service URL. Optional — defaults to
https://licenses.rymga.com. Or set OBF_URL. |
| --product <code> | The product code. Optional — defaults to
lock-master. |
| -h, --help | Show usage and exit. |
If a run fails, the CLI prints why (bad config, no tokens, auth, size limits) and exits non-zero, so it's safe to gate a build on it.
In CI
Store your seat key as a CI secret and run the CLI as a build step. Example for GitHub Actions:
# GitHub Actions step
- name: Obfuscate
env:
OBF_URL: https://licenses.rymga.com
OBF_KEY: ${{ secrets.RYMGA_KEY }}
run: |
java -jar rymga-cli.jar --product lock-master --in build/libs/app.jar \
--config config.json --out build/libs/app-obf.jar
Use a dedicated seat for CI so you can rotate or revoke it independently of your laptop.