howdy/ui/cli
The gleam run -m howdy/ui command line.
listshows what can be copied: components, blocks and theme presets.search <words>finds entries by name, description or category.view <name>shows an entry’s description, what it depends on, and its source.add <name>...copies entries into the project, by default undersrc/<app>/ui/, with every component they depend on, and regeneratesall.gleamthere so the export picks them up.diff <name>...compares a copy with the version it came from.initprepares a project: the directory,all.gleam, the packages copies need, and optionally a theme preset.registrywrites the catalogue as JSON andllms.txt, for tools and for publishing a registry of your own.exportbundles the app’s islands intopriv/howdy_islands, then runsgleam export erlang-shipment.islandsonly bundles the islands, for builds that export separately. Run it just beforegleam export erlang-shipment.
Options: --to=<dir> chooses the directory, --force overwrites,
--dry-run shows what would change without changing it, --install
runs gleam add for missing packages, and --registry=<url or dir>
takes entries from another registry published with registry.
Types
Something that can be copied: a built-in entry with its source, or an entry from another registry.
pub type Item {
Item(
name: String,
kind: String,
category: String,
description: String,
module: String,
source: String,
dependencies: List(String),
packages: List(String),
origin: String,
)
}
Constructors
-
Item( name: String, kind: String, category: String, description: String, module: String, source: String, dependencies: List(String), packages: List(String), origin: String, )Arguments
- origin
-
Where it came from, for the header of a copy.
What a command wants done, before any file is touched.
pub type Options {
Options(
names: List(String),
to: option.Option(String),
force: Bool,
dry_run: Bool,
install: Bool,
registry: option.Option(String),
insecure: Bool,
theme: option.Option(String),
out: option.Option(String),
)
}
Constructors
-
Options( names: List(String), to: option.Option(String), force: Bool, dry_run: Bool, install: Bool, registry: option.Option(String), insecure: Bool, theme: option.Option(String), out: option.Option(String), )
Values
pub fn execute(args: List(String)) -> Result(String, String)
Run a command and return its output, or the reason it could not.
pub fn generated(
item: Item,
items: List(Item),
module_path: String,
) -> String
The file add writes: the source with a header, and its imports of
the entries it depends on pointed at the copies beside it.
pub fn template(module: String) -> Result(String, String)
The shipped source of a module: from the project’s build directory for
a hex dependency, from the path in manifest.toml for a path
dependency, or from src when developing howdy_ui itself.