clarence/
lib.rs

1//! Clarence - A powerful Rust framework for building CLIs that translate commands into HTTP requests
2//!
3//! # Example
4//!
5//! ```rust,no_run
6//! use clarence::{Clarence, Handler, Method};
7//!
8//! Clarence::builder()
9//!     .name("mycli")
10//!     .base_url("https://api.example.com")
11//!     .header("X-App", "cli")
12//!     .help("My CLI tool")
13//!     .version(env!("CARGO_PKG_VERSION"))
14//!     .run();
15//! ```
16
17pub mod builder;
18pub mod context;
19pub mod environment;
20pub mod error;
21pub mod git;
22pub mod handler;
23pub mod http;
24pub mod parser;
25pub mod router;
26pub mod storage;
27
28pub use builder::{Clarence, ClarenceBuilder, HeaderSource, HelpSource, HelpValue, StorageRef};
29pub use context::{Args, Context, HandlerResponse};
30pub use environment::{EnvironmentConfig, EnvironmentConfigBuilder, EnvironmentDef};
31pub use error::{ClarenceError, Result};
32pub use git::GitInfo;
33pub use handler::{Handler, HandlerHelpSource, HandlerHelpValue};
34pub use http::{HttpClient, Method, Response};
35pub use parser::{DefaultParser, JsonCliActionsParser, Parser};
36pub use router::Router;
37pub use storage::{FileStore, Storage};
38
39// Convenience re-export for builder pattern
40pub use environment::EnvironmentConfig as Environment;