Skip to main content

REPL & Tooling

  • add-classpath

    Adds extra-classpath, a string as for example returned by clojure -Spath, to the current classpath.

  • add-deps

    Takes deps edn map and optionally a map with :aliases (seq of keywords) which will used to calculate classpath. The cl...

  • clojure

    Starts clojure similar to CLI. Use `rlwrap bb` for `clj`-like invocation. Invokes java with babashka.process/process f...

  • get-classpath

    Returns the current classpath as set by --classpath, BABASHKA_CLASSPATH and add-classpath.

  • merge-deps

    Merge multiple deps edn maps from left to right into a single deps edn map.

  • split-classpath

    Returns the classpath as a seq of strings, split by the platform specific path separator.

  • demunge

    Given a string representation of a fn class, as in a stack trace element, returns a readable version.

  • repl-caught

    Default :caught hook for repl

  • repl-requires

    A sequence of lib specs that are applied to `require` by default when a new command-line REPL is started.

  • with-bindings

    Executes body in the context of thread-local bindings for several vars that often need to be set!: *ns* *warn-on-refle...

  • with-read-known

    Evaluates body with *read-eval* set to a "known" value, i.e. substituting true for :unknown if necessary.

  • set-break-handler!

    Register INT signal handler. After calling this, Ctrl-C will cause the given function f to be called with a single ar...

  • source

    Prints the source code for the given symbol, if it can find it. This requires that the symbol resolve to a Var define...