Gleamoire is a tool for documenting Gleam modules in the command line, inspired by pydoc.
Gleamoire is very easy to quickly look something up. Simply run gleamoire gleam/int to try it out.
Gleamoire renders markdown documentation in the terminal, which makes reading documentation much easier than raw markdown code.
If you have erlang installed, it's as simple as downloading the escript binary, and putting it somewhere in your path.
Run gleamoire --help to see a full usage guide.
To use Gleamoire to view documentation for a module, function or type, simply run:
gleamoire <query>For example:
gleamoire gleam/io.printlnWould document the println function of the gleam/io package.
Sometimes there are a type and value with the same name, for example:
// mod.gleam
pub type Thing {
Thing
OtherThing
}Here, mod.Thing can refer to the type Thing, or the value Thing.
To fix this ambiguity, use the -v flag to print the value, or the -t flag for the type:
gleamoire mod.Thing -v # Documents the `Thing` value
gleamoire mod.Thing -t # Documents the `Thing` typeGleamoire finds documentation based on a query passed to the CLI. The syntax of the query is:
[package:]root/sub1/sub2[.item]
By default, the query looks for a package with the same name as the root module, since that is the most common pattern in Gleam. However, if the two differ, an explicit package can be specified.
Note
A special case is made for official packages (gleam_*), community packages (gleam_community_*), and the standard library, which don't follow
this convention, and are likely to be documented commonly.
Contributions to Gleamoire are welcome! To get started:
# Clone the repository
git clone https://github.com/GearsDatapacks/gleamoire
cd gleamoire
# Verify all tests are passing
gleam test
# Run the CLI
gleam runTo build a Gleamoire escript binary to run a development version:
gleam run -m gleescript