Skip to main content

gmail_auto_label/
lib.rs

1//! `gmail-auto-label` library entrypoint.
2//!
3//! This crate powers the `gmail-auto-label` CLI workflow.
4//! Most users run it through the binary, while integrators can
5//! invoke [`main_entry`] directly.
6
7mod app;
8mod cache;
9mod classify;
10mod command;
11mod errors;
12mod gog;
13mod models;
14mod utils;
15
16/// Runs the full CLI application flow.
17///
18/// This function parses CLI args and executes the end-to-end process.
19///
20/// # Examples
21///
22/// ```no_run
23/// gmail_auto_label::main_entry();
24/// ```
25pub fn main_entry() {
26    if let Err(e) = app::run() {
27        eprintln!("{e}");
28        std::process::exit(1);
29    }
30}