bel7_cli/
lib.rs

1// Copyright (C) 2025-2026 Michael S. Klishin and Contributors
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15//! Common CLI utilities for Rust command-line applications.
16//!
17//! This crate provides:
18//!
19//! - Colored console output helpers (success, error, warning, info)
20//! - String truncation for display
21//! - Table styling utilities (requires `tables` feature)
22//! - Clap argument helpers (requires `clap` feature)
23//!
24//! # Features
25//!
26//! - `tables` - Enables table styling with `tabled`
27//! - `clap` - Enables clap argument helper extensions
28//! - `errors` - Enables exit code mapping with `sysexits`
29//! - `full` - Enables all features
30
31#[cfg(feature = "errors")]
32mod errors;
33
34mod output;
35mod truncate;
36
37#[cfg(feature = "tables")]
38mod tables;
39
40#[cfg(feature = "clap")]
41mod clap_ext;
42
43pub use output::*;
44pub use truncate::*;
45
46#[cfg(feature = "tables")]
47pub use tables::*;
48
49#[cfg(feature = "clap")]
50pub use clap_ext::*;
51
52#[cfg(feature = "errors")]
53pub use errors::*;