ExLisp.Hex (exlisp v0.1.2)

Copy Markdown

Hex.pm client module. Provides functionality to dynamically download, compile, and load Hex.pm libraries from within the REPL or Lisp scripts.

Summary

Functions

Loads and initializes the Mix and Hex runtime environments. Even in environments like escripts where Mix is not loaded by default, dynamically loads from system Erlang / Elixir installation paths.

Retrieves and returns package information for the specified package. Equivalent to (hex:info :package-name).

Installs and loads the specified Hex package (single or list).

Searches packages on Hex.pm and returns a symbol list of matching package names. Equivalent to (hex:search "query").

Returns the installation directory path for the specified package.

Functions

ensure_mix_loaded()

Loads and initializes the Mix and Hex runtime environments. Even in environments like escripts where Mix is not loaded by default, dynamically loads from system Erlang / Elixir installation paths.

info(package)

Retrieves and returns package information for the specified package. Equivalent to (hex:info :package-name).

install(packages, req_or_opts \\ nil)

Installs and loads the specified Hex package (single or list).

Examples (Lisp)

  • (hex:install :jason)
  • (hex:install :jason "~> 1.4")
  • (hex:install '(:jason :floki))
  • (hex:install '((:jason "~> 1.4") (:floki "~> 0.36")))

search(query)

Searches packages on Hex.pm and returns a symbol list of matching package names. Equivalent to (hex:search "query").

where_is_package(package)

Returns the installation directory path for the specified package.