Skip to main content

pimalaya_cli/
lib.rs

1#![cfg_attr(docsrs, feature(doc_cfg))]
2
3//! Shared building blocks for the Pimalaya command-line tools.
4//! Published for internal Pimalaya usage: the API follows the needs of
5//! its consumers (himalaya, neverest, cardamum, calendula and friends)
6//! and may change without notice. Third parties should treat it as
7//! private; the io-* protocol crates and pimalaya-stream are the
8//! supported surface.
9//!
10//! This crate factors out the pieces every Pimalaya CLI would
11//! otherwise reimplement: argument parsing glue, output rendering,
12//! logging, interactive prompts and the account setup wizards. Each
13//! piece sits behind its own cargo feature, so a binary pulls in only
14//! what it uses.
15//!
16//! Unlike the io-* protocol libraries this crate is deliberately std:
17//! it exists to talk to a terminal, a filesystem and a human, so it
18//! never targets no_std.
19//!
20//! The clap module wires shared arguments and the completion, manual
21//! and JSON Schema commands into a binary's parser. The printer and error
22//! modules render command output and failures to stdout, while the log
23//! module initializes the logger. The prompt, spinner and table
24//! modules handle interactive input and formatted output, and the
25//! validator module holds reusable value parsers. The wizard module
26//! collects account settings per protocol (IMAP, SMTP, JMAP, CalDAV,
27//! CardDAV), each protocol behind its matching feature. The build
28//! module exposes helpers for build scripts.
29
30#[cfg(feature = "build")]
31pub mod build;
32#[cfg(feature = "terminal")]
33pub mod clap;
34#[cfg(feature = "terminal")]
35pub mod error;
36#[cfg(feature = "terminal")]
37pub mod log;
38#[cfg(feature = "terminal")]
39pub mod printer;
40#[cfg(feature = "prompt")]
41pub mod prompt;
42#[cfg(feature = "spinner")]
43pub mod spinner;
44#[cfg(feature = "table")]
45pub mod table;
46#[cfg(feature = "prompt")]
47pub mod validator;
48#[cfg(feature = "wizard")]
49pub mod wizard;