Cheer.Reference (Cheer v0.2.0)

Copy Markdown View Source

Generate a reference document for a command tree, suitable for a docs site or a repository reference page. Derives everything from Cheer.tree/1, so hidden options, arguments, and subcommands are omitted.

Usage

iex> Cheer.Reference.generate(MyApp.CLI, :markdown, prog: "myapp")

Currently supports the :markdown format.

Summary

Functions

Render a reference document for the command tree rooted at root.

Functions

generate(root, format \\ :markdown, opts \\ [])

@spec generate(module(), :markdown, keyword()) :: String.t()

Render a reference document for the command tree rooted at root.

Options:

  • :prog - program name for the top-level heading (default: root command name)