Expand description
Shared CLI utilities for sandogasa tools.
Re-exports§
pub use defaults::parse_with_defaults;
Modules§
- claim
- Whether a tool should claim the work it is closing.
- date
- Shared calendar date range parsing for CLI tools.
- defaults
- Flag defaults from the tool’s config file.
Constants§
- ALLOW_
INSECURE_ URL_ ENV - Environment variable that, when set to a non-empty value,
disables
ensure_secure_url’s plaintext-credential guard. Intended for local testing againsthttp://mock servers or a trusted internal proxy — never for production credentials.
Functions§
- confirm
- Ask a yes/no question on stderr (keeping stdout clean for piped
or
--jsonoutput) and read one line from stdin. - ensure_
secure_ url - Refuse to hand credentials to a base URL that would transmit them in cleartext.
- init
- Standard process-wide initialization for sandogasa tools.
- install_
crypto_ provider - Install the ring-based rustls
CryptoProvideras the process default. - require_
tools - Check that a batch of external tools is available, returning a single error that lists every missing one with its install hint.
- tool_
exists - Whether an executable named
nameis on$PATH(a lightweight check that does not run the tool). - wrap_
prefixed - Word-wrap
texttowidthcolumns and prefix every line withprefix(e.g."> "for a Markdown blockquote, or the leading indent of a wrapped list item). Collapses runs of whitespace and never splits a word, so a single token longer than the width — a URL, typically — overflows rather than being broken. Such a token also stays on the line it started on: breaking before a word that won’t fit on a fresh line either would only orphan whatever label introduces it (LINK:,Minutes:) while still overflowing.