{
  "id": "jbang",
  "name": "JBang",
  "homepage": "https://www.jbang.dev/documentation/jbang/latest/configuration.html",
  "description": "A Java launcher for running source files and scripts.",
  "executables": [
    "jbang"
  ],
  "dotfiles": {
    "paths": [
      "~/.jbang/jbang.properties"
    ],
    "exclude": [
      "~/.jbang/cache/"
    ],
    "secret": [],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "Run a script",
    "description": "Run a Java, Kotlin, Groovy or JShell script, jar or app with JBang. Other subcommands (init, build, export, app, catalog, jdk, ...), debugging and profiling options are not covered.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "posix",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "docs",
        "kind": "manual",
        "url": "https://raw.githubusercontent.com/jbangdev/jbang/main/docs/modules/ROOT/pages/running.adoc",
        "revision": "main 2026-10-27",
        "evidence": "jbang --deps com.google.gson:gson:2.8.9 app.war\njbang --interactive app.war\njbang --runtime-option=\"-Xmx2g\" --runtime-option=\"--enable-preview\" myapp.java\njbang --compile-option=\"--enable-preview\" --compile-option=\"-source 17\" myapp.java\nOne can also override the main class on the command line by using `--main <name>` or `-m <name>`\n`jbang -o` or `jbang --offline`. In this mode `jbang` will simply fail if dependencies have not been cached already.\nsimply use `--cds` to force it or `--no-cds` to turn it off no matter what the jbang script file contains.\n"
      }
    ],
    "field": [
      {
        "id": "script",
        "label": "Script, jar or catalog alias",
        "description": "Path or URL of the script, a jar, a GAV coordinate or an alias.",
        "type": "string",
        "position": 0,
        "min": 1,
        "sources": [
          "docs"
        ]
      },
      {
        "id": "args",
        "label": "Arguments for the script",
        "type": "string",
        "position": 1,
        "multiple": true,
        "sources": [
          "docs"
        ]
      },
      {
        "id": "deps",
        "label": "Extra dependencies",
        "description": "Maven coordinates (group:artifact:version), one per entry.",
        "type": "string",
        "option": [
          "--deps"
        ],
        "multiple": true,
        "sources": [
          "docs"
        ]
      },
      {
        "id": "runtime_option",
        "label": "JVM options",
        "description": "Passed to the JVM when running the script, for example -Xmx2g.",
        "type": "string",
        "option": [
          "--runtime-option"
        ],
        "multiple": true,
        "sources": [
          "docs"
        ]
      },
      {
        "id": "compile_option",
        "label": "Compiler options",
        "type": "string",
        "option": [
          "--compile-option"
        ],
        "multiple": true,
        "sources": [
          "docs"
        ]
      },
      {
        "id": "main",
        "label": "Main class",
        "type": "string",
        "option": [
          "--main",
          "-m"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "interactive",
        "label": "Interactive (jshell)",
        "description": "Explore the script and its dependencies in jshell.",
        "type": "boolean",
        "option": [
          "--interactive"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "offline",
        "label": "Offline",
        "description": "Fail instead of downloading dependencies that are not cached.",
        "type": "boolean",
        "option": [
          "--offline",
          "-o"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "cds",
        "label": "Class Data Sharing",
        "type": "boolean",
        "option": [
          "--cds"
        ],
        "sources": [
          "docs"
        ]
      }
    ],
    "task": [
      {
        "id": "run",
        "label": "Run a script",
        "fields": [
          "script",
          "args",
          "deps",
          "runtime_option"
        ],
        "required": [
          "script"
        ]
      },
      {
        "id": "repl",
        "label": "Explore in jshell",
        "fields": [
          "script",
          "deps",
          "interactive"
        ],
        "required": [
          "script"
        ],
        "set": {
          "interactive": [
            true
          ]
        }
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "script",
          "args",
          "deps",
          "interactive"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "runtime_option",
          "compile_option",
          "main",
          "offline",
          "cds"
        ]
      }
    ]
  }
}
