Skip to main content

faucet_cli/commands/
mod.rs

1//! Subcommand implementations. Each module owns its `run(...)` entry point
2//! and stays free of clap so the integration tests can drive it directly.
3
4pub mod backfill;
5#[cfg(feature = "catalog")]
6pub mod catalog;
7pub mod completions;
8pub mod conformance;
9#[cfg(feature = "contract")]
10pub mod contract;
11#[cfg(feature = "cli-dev")]
12pub mod dev;
13pub mod discover;
14pub mod dlq;
15pub mod doctor;
16pub mod explain;
17pub mod fmt;
18#[cfg(feature = "catalog")]
19pub mod history;
20pub mod init;
21pub mod install;
22pub mod list;
23#[cfg(feature = "masking")]
24pub mod masking;
25#[cfg(feature = "mcp")]
26pub mod mcp;
27pub mod migrate;
28pub mod new;
29#[cfg(feature = "notify")]
30pub mod notify;
31pub mod plan;
32pub mod preview;
33pub mod replicate;
34pub mod run;
35#[cfg(feature = "schedule")]
36pub mod schedule;
37pub mod schema;
38pub mod search;
39#[cfg(feature = "serve")]
40pub mod serve;
41#[cfg(feature = "templates")]
42pub mod template;
43pub mod test;
44pub mod validate;
45
46use crate::error::CliError;
47
48/// Render any [`CliError`] to a single line on stderr, scrubbing any resolved
49/// secret values that may have reached the error chain.
50pub fn report(err: &CliError) {
51    use crate::secrets::registry::redact;
52    eprintln!("error: {}", redact(&err.to_string()));
53    let mut src = std::error::Error::source(err);
54    while let Some(s) = src {
55        eprintln!("  caused by: {}", redact(&s.to_string()));
56        src = std::error::Error::source(s);
57    }
58}