Commands

Start here when you know the task but not the exact command. Pick a command from the list or search the command menu.

jbx

Core jbx commands for writing, checking, testing, running, packaging, and automating Java code:

  • run — Run Java source or Maven artifact
  • build — Compile Java source without running it
  • check — Diagnose the Java source file for errors
  • test — Run JUnit tests
  • fmt — Format Java files with Palantir Java Format.
  • docs — Display documentation from Java sources or Maven artifacts.
  • doctor — Verify local jbx installation
  • rewrite — Discover OpenRewrite modules and recipes and preview or apply them
  • search — Search Maven Central artifacts
  • resolve — Resolve Maven coordinates
  • fetch — Download artifacts and print classpath or dependency coordinates.
  • info — Print parsed directives and derived metadata from Java sources.
  • export — Export local, portable, or native runnable artifacts.
  • publish — Publish Java projects to Maven repositories, including Maven Central.
  • install — Install the current project into a Maven repository layout.
  • graph — Dump JavaParser native AST JSON or import it back to Java source.
  • skill — List and print version-matched bundled agent skills.
  • jdk — List, install, and locate JDKs used by jbx.

Best-effort JBang compatibility

These commands preserve familiar JBang shapes for migration and script interoperability, but they are not the core jbx workflow. They are implemented at a best-effort compatibility level: use them when they match your existing JBang workflow, and expect deterministic jbx behavior rather than byte-for-byte JBang cloning.

  • cache — Inspect or clear compiled-script cache paths and entries.
  • trust — Pin, list, remove, or clear trusted hashes for remote scripts.
  • app — Install, list, or uninstall Java scripts as PATH commands.
  • alias — Add, remove, and list aliases from nearby jbang-catalog.json files.
  • catalog — Add and list external catalogs in jbang-catalog.json.
  • template — List built-in and imported templates for jbx init.
  • init — Create Java sources from built-in or imported templates.