fob_cli/
lib.rs

1//! Fob CLI - Modern JavaScript bundler with Rust performance.
2//!
3//! This crate provides the command-line interface for the Fob bundler, exposing
4//! all functionality from `fob-bundler` through an intuitive CLI with excellent
5//! error messages and user experience.
6//!
7//! # Architecture
8//!
9//! The CLI is organized into several key modules:
10//!
11//! - [`error`] - Comprehensive error types with actionable messages
12//! - [`logger`] - Structured logging with tracing
13//! - [`ui`] - Terminal UI utilities for progress bars and formatted output
14//! - `commands` - Individual CLI command implementations
15//! - `config` - Configuration file handling
16//! - `server` - Development server
17//!
18//! # Features
19//!
20//! - **Type-safe error handling**: Uses `thiserror` for structured errors
21//! - **Structured logging**: Built on `tracing` for better debugging
22//! - **Beautiful terminal UI**: Progress bars, colors, and formatting
23//! - **File watching**: Automatic rebuilds on file changes
24//! - **Configuration profiles**: Environment-specific settings
25//!
26//! # Example
27//!
28//! ```rust
29//! use fob_cli::{error::Result, logger};
30//!
31//! fn main() -> Result<()> {
32//!     logger::init_logger(false, false, false);
33//!     // CLI command implementations...
34//!     Ok(())
35//! }
36//! ```
37
38// Public modules
39pub mod cli;
40pub mod commands;
41pub mod config;
42pub mod dev;
43pub mod error;
44pub mod logger;
45pub mod ui;
46
47// Re-export commonly used types
48pub use error::{BuildError, CliError, ConfigError, Result, ResultExt};