Skip to main content

Crate sandogasa_cli

Crate sandogasa_cli 

Source
Expand description

Shared CLI utilities for sandogasa tools.

Re-exports§

pub use defaults::parse_with_defaults;

Modules§

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 against http:// 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 --json output) 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 CryptoProvider as 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 name is on $PATH (a lightweight check that does not run the tool).
wrap_prefixed
Word-wrap text to width columns and prefix every line with prefix (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.