#ansi-term #terminal #ansi #terminal-colors #strip #colored-text #cross-platform

anstream

A simple cross platform library for writing colored text to a terminal

25 releases

new 0.6.15 Jul 25, 2024
0.6.13 Feb 27, 2024
0.6.5 Dec 8, 2023
0.6.4 Sep 29, 2023
0.2.6 Mar 17, 2023

#139 in Command-line interface

Download history 1280251/week @ 2024-04-05 1287180/week @ 2024-04-12 1290520/week @ 2024-04-19 1261810/week @ 2024-04-26 1352163/week @ 2024-05-03 1382002/week @ 2024-05-10 1406422/week @ 2024-05-17 1341565/week @ 2024-05-24 1517882/week @ 2024-05-31 1502084/week @ 2024-06-07 1481814/week @ 2024-06-14 1511905/week @ 2024-06-21 1420026/week @ 2024-06-28 1494325/week @ 2024-07-05 1568410/week @ 2024-07-12 1316552/week @ 2024-07-19

6,067,252 downloads per month
Used in 255 crates (50 directly)

MIT/Apache

220KB
4K SLoC

anstream

A simple cross platform library for writing colored text to a terminal.

A portmanteau of "ansi stream"

Documentation License Crates Status

Specialized stdout and stderr that accept ANSI escape codes and adapt them based on the terminal's capabilities.

anstream::adapter::strip_str may also be of interest on its own for low overhead stripping of ANSI escape codes.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~0–7MB
~40K SLoC