JBANG EDIT
SYNOPSIS
jbang edit [OPTIONS] [<scriptOrFile>] [<additionalFiles>...]
Opens your script for editing in an IDE. By default it opens the script’s existing location and assumes the editor has JBang support (see https://jbang.dev/ide). With --sandbox (-b) it instead creates a temporary IDE project linking your script and its dependencies, so you get code completion without a build file - handy for editors without JBang support. Choose the editor with --open (or $JBANG_EDITOR); --no-open only prints the path, and --live (sandbox only) regenerates the project when dependencies change.
Examples:
jbang edit hello.java
jbang edit --open=code hello.java
jbang edit --no-open hello.java
jbang edit --sandbox hello.java
jbang edit --sandbox --live --open=idea hello.java
OPTIONS
- -s, --sources=<sources>
-
Add additional sources.
- --files=<files>
-
Add additional files.
- -T, --source-type=<source-type>
-
Force input to be interpreted as the given type. One of: java, jshell, kotlin, groovy, markdown.
- --jsh
-
Force input to be interpreted with jsh/jshell. Deprecated: use '--source-type jshell'
- --catalog=<catalog>
-
Path to catalog file to be used instead of the default
- -D=<key>=<value>
-
set a system property
Default:
true - --deps=<deps>
-
Add additional dependencies (Use commas to separate them).
- --repos=<repos>
-
Add additional repositories.
- --cp=<cp>
-
Add class path entries.
Aliases:
--class-path - --ignore-transitive-repositories
-
Ignore remote repositories found in transitive dependencies
Aliases:
--itr - --live
-
Open directory in IDE’s that support JBang or generate temporary project with option to regenerate project on dependency changes.
- --open=<open>
-
Opens editor/IDE on the temporary project.
Default: ``
- --no-open
-
Explicitly prevent JBang from opening an editor/IDE
- -b, --sandbox
-
Edit in sandbox mode. Useful when the editor/IDE used has no JBang support
- -h, --help
-
Display this help and exit
- --config=<config>
-
Path to config file to be used instead of the default
- --insecure
-
Enable insecure trust of all SSL certificates.
- --[no-]verbose
-
jbang will be verbose on what it does.
- --[no-]quiet
-
jbang will be quiet, only print when error occurs.
- -o, --[no-]offline
-
Work offline. Fail-fast if dependencies are missing.
- --[no-]fresh
-
Make sure we use fresh (i.e. non-cached) resources.
- -x, --[no-]stacktrace
-
Print exceptions stacktraces to stderr (even when quiet).
- --netrc=<netrc>
-
Path to a .netrc file for HTTP authentication credentials.
- --no-netrc
-
Disable .netrc authentication lookup.