1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
//! Oxur CLI library and binary
//!
//! This crate provides two things:
//!
//! 1. **Library**: Common utilities for building Oxur CLI tools
//! - File I/O helpers (stdin/stdout/file handling)
//! - Colored terminal output (success, error, info, warnings)
//! - Progress tracking for long-running operations
//!
//! 2. **Binary**: The unified `oxur` command-line tool
//!
//! # Library Usage
//!
//! Add to your CLI's `Cargo.toml`:
//!
//! ```toml
//! [dependencies]
//! oxur-cli = { path = "../oxur-cli" }
//! ```
//!
//! ## Basic I/O
//!
//! ```no_run
//! use oxur_cli::common::io::{read_input, write_output};
//! use std::path::PathBuf;
//!
//! # fn main() -> anyhow::Result<()> {
//! // Read from file or stdin
//! let content = read_input(&PathBuf::from("input.txt"))?;
//!
//! // Write to file or stdout
//! write_output(&content, Some(&PathBuf::from("output.txt")))?;
//! # Ok(())
//! # }
//! ```
//!
//! ## Colored Output
//!
//! ```no_run
//! use oxur_cli::common::output::{success, error, info};
//!
//! success("Operation completed!");
//! error("Something went wrong");
//! info("Processing files...");
//! ```
//!
//! ## Progress Tracking
//!
//! ```no_run
//! use oxur_cli::common::progress::ProgressTracker;
//!
//! # fn main() -> anyhow::Result<()> {
//! let mut progress = ProgressTracker::new(true);
//!
//! progress.step("Loading data");
//! // ... do work ...
//! progress.done();
//!
//! progress.step("Processing data");
//! // ... do work ...
//! progress.done();
//!
//! progress.success("All done!");
//! # Ok(())
//! # }
//! ```
// Args module requires clap (part of binary feature)
// REPL module requires binary feature dependencies
// Re-export commonly used items for convenience
pub use ProgressTracker;
pub use ;
// Re-export args when available
pub use ReplArgs;