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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
//! # rich-ext
//!
//! Extensions layered on top of the faithful [`rich`] core, plus the internal
//! plugin registry. **Anything that is not a faithful port of upstream `rich`
//! belongs here**, so the core stays a clean, easily-synced mirror.
//!
//! This crate carries its own independent SemVer (it does not track any upstream
//! version). See `AGENTS.md` → Versioning and `docs/PLUGINS.md`.
//!
//! ## Modules
//!
//! - Errors and logs: [`diagnostic`], [`dashboard`], [`stacktrace`],
//! [`hyperlink`], [`log_handler`] (`RichHandler`, `SpanView`), `adapters`
//! (`log` / `tracing` features), [`event`].
//! - Data and authoring: `data`, `deps` (Cargo dependency trees) and `schema`
//! (JSON Schema trees and diffs), all behind the `data` feature;
//! [`derive`](mod@derive), [`macros`] (the
//! `macros` feature re-exports `richf!` and `#[derive(Rich)]`), [`cli_doc`]
//! (`clap` feature for `clap::Command`).
//! - Diffs and testing: [`diff`], `testing` and `qa` (`testing` feature).
//! - Terminals: [`capabilities`], [`fidelity`], [`a11y`], [`target`],
//! [`ansi_explain`], [`sanitize`], [`encoding`], [`clipboard`] (OSC 52).
//! - Workflows: [`workflow`], [`transfer`], [`countdown`], [`notify`],
//! [`cancel`], [`table`], [`badge`], [`size_bar`], [`format`](mod@format), [`redact`]
//! (experimental).
//! - Charts: [`chart`] (sparklines, bars, histograms, line and scatter plots,
//! gauges, heatmaps, status matrices, KPI cards and timelines).
//! - Inspectors: [`source_view`], [`hex`], [`unicode_inspect`],
//! [`env_inspect`].
//! - Layout and live output: [`layout`], [`live`].
//! - Pipelines: [`transform`], and `data::transform` (`jsonpath` feature).
//!
//! The user guide (<https://buchochelliq-labs.github.io/rs-rich-cli/guide/ext/>)
//! covers each module with compiled examples.
//!
//! ```
//! use rich::{Console, ColorSystem};
//! use rich_ext::ConsoleExt;
//!
//! let mut console = Console::builder()
//! .force_terminal(true)
//! .color_system(Some(ColorSystem::Truecolor))
//! .build();
//! console.install_extensions(); // registers the number highlighter, etc.
//! let out = console.render_str_to_string("count=7");
//! assert!(out.contains("\x1b[1;36m7\x1b[0m"));
//! ```
pub use NumberHighlighter;
pub use ;
/// The plugin contract, re-exported so a host needs only `rich_ext`.
pub use rich_plugin_api as plugin;
pub use sanitize_terminal_controls;
pub use ;
use Console;
/// Ergonomic extension methods on the core [`Console`].
///
/// Defined here (not in core) so the core remains free of our additions.
// QA tooling: screenshots, stress, lint, explain, profile, fuzz, matrix, bench.
pub use ;
/// Paths the macros expand to. Not a public API.
pub use ;
// Real sources drawn as trees: Cargo dependency graphs and JSON Schemas.
// CLI authoring: help, errors, completions, docs, config reference and
// precedence from one command description.
// Diffs: engine, views, source/patch renderers, test reports and assertions.
// Transfers, retry/rate-limit countdowns and transient notifications.