Skip to main content

cornerstone/
lib.rs

1//! # Lib Cornerstone
2//!
3//! The shared foundation every CLI is built on. Declare *what your commands are
4//! and what they do*; Cornerstone supplies everything else: argument parsing,
5//! nested subcommands, help menus (three presets or a custom renderer), global
6//! flags, colored themeable output, tables, trees, key/value blocks, progress
7//! bars and spinners, timers, structured errors with exit codes, config loading
8//! with env/flag precedence, interactive prompts, shell-completion generation,
9//! fuzzy "did you mean?" suggestions, signal handling, and safety guards for
10//! root and destructive operations.
11//!
12//! Everything is zero-dependency, neutral by default, and overridable — the
13//! library encapsulates the work without imposing a house style.
14//!
15//! ```ignore
16//! use cornerstone::prelude::*;
17//!
18//! fn main() {
19//!     App::new("mytool")
20//!         .about("Does the thing")
21//!         .command("hello", "Say hello", |ctx| ctx.ok("hello!"))
22//!         .run();
23//! }
24//! ```
25
26pub mod app;
27pub mod complete;
28pub mod config;
29pub mod ctx;
30pub mod docs;
31pub mod error;
32pub mod guard;
33pub mod help;
34pub mod json;
35pub mod log;
36pub mod out;
37pub mod parse;
38pub mod prelude;
39pub mod prompt;
40pub mod sig;
41pub mod spec;
42pub mod style;
43pub mod suggest;
44pub mod theme;