turbomcp_cli/prelude.rs
1//! Prelude module for convenient imports
2//!
3//! This module re-exports the most commonly used types for building
4//! applications with the TurboMCP CLI library.
5//!
6//! # Example
7//!
8//! ```rust,no_run
9//! use turbomcp_cli::prelude::*;
10//!
11//! #[tokio::main]
12//! async fn main() -> CliResult<()> {
13//! let cli = Cli::parse();
14//! let executor = CommandExecutor::new(
15//! OutputFormat::Json,
16//! true,
17//! false
18//! );
19//! executor.execute(cli.command).await
20//! }
21//! ```
22
23pub use crate::{
24 // Core CLI types
25 Cli,
26 // Error handling
27 CliError,
28 CliResult,
29 // Execution
30 CommandExecutor,
31 Commands,
32 CompletionCommands,
33 Connection,
34 ErrorCategory,
35
36 Formatter,
37
38 LogLevel,
39
40 OutputFormat,
41 PromptCommands,
42 // Supporting types
43 RefType,
44 ResourceCommands,
45 SamplingCommands,
46
47 ServerCommands,
48 // Subcommands
49 ToolCommands,
50 TransportKind,
51
52 // Entry point
53 run,
54};
55
56// Re-export commonly used client types for convenience
57pub use turbomcp_client::{Client, ClientBuilder};
58
59// Re-export clap for custom CLI extensions
60pub use clap::Parser;