Skip to content

gleam-tool

gleam-tool provides some functionality to generate some supporting files required by compiled gleam projects, that would otherwise be created through normal use of commands like gleam build.

Terminal window
$ gleam-tool appspec [out_path] [otp_dependencies]...

generates an application specification for a gleam project.

  • out_path: where to write the generated specification to
  • otp_dependencies (optional): space-separated list of otp applications name that the specification should declare a dependency on
Terminal window
$ gleam-tool entrypoint [target]

generates an application entrypoint for the specified target.

when targeting erlang, it generates and compiles an erlang module called gleam_entrypoint.beam in the current directory.

when targeting javascript, it generates a javascript file called gleam_entrypoint.mjs in the current directory.