Skip to main content

Crate pimalaya_cli

Crate pimalaya_cli 

Source
Expand description

Shared building blocks for the Pimalaya command-line tools.

This crate factors out the pieces every Pimalaya CLI would otherwise reimplement: argument parsing glue, output rendering, logging, interactive prompts and the account setup wizards. Each piece sits behind its own cargo feature, so a binary pulls in only what it uses.

Unlike the io-* protocol libraries this crate is deliberately std: it exists to talk to a terminal, a filesystem and a human, so it never targets no_std.

The clap module wires shared arguments and the completion and manual commands into a binary’s parser. The printer and error modules render command output and failures to stdout, while the log module initializes the logger. The prompt, spinner and table modules handle interactive input and formatted output, and the validator module holds reusable value parsers. The wizard module collects account settings per protocol (IMAP, SMTP, JMAP, CalDAV, CardDAV), each protocol behind its matching feature. The build module exposes helpers for build scripts.

Modules§

buildbuild
Helpers for binary build scripts.
clapterminal
Shared clap building blocks: arguments, value parsers and the ready-made completion and manual generation commands.
errorterminal
Command failure reporting to stdout.
logterminal
Logger initialization from the shared log flags.
printerterminal
Command output rendering to stdout.
promptprompt
Interactive prompt helpers wrapping the inquire crate.
spinnerspinner
Lightweight terminal spinner built on crossterm.
tabletable
Re-export of the comfy-table tabular output crate.
validatorprompt
Reusable inquire input validators.
wizardwizard
Interactive account setup wizards, one submodule per protocol.

Macros§

long_versionterminal
Builds the long version string (version, enabled features, build target and git revision) for a binary’s --version output.