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

anstream

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

23 unstable releases (4 breaking)

0.6.13 Feb 27, 2024
0.6.11 Jan 18, 2024
0.6.5 Dec 8, 2023
0.6.4 Sep 29, 2023
0.2.6 Mar 17, 2023

#272 in Command-line interface

Download history 946754/week @ 2024-01-06 1090926/week @ 2024-01-13 1130563/week @ 2024-01-20 1260237/week @ 2024-01-27 1209283/week @ 2024-02-03 1170505/week @ 2024-02-10 1215333/week @ 2024-02-17 1283711/week @ 2024-02-24 1310573/week @ 2024-03-02 1247463/week @ 2024-03-09 1273078/week @ 2024-03-16 1246398/week @ 2024-03-23 1282771/week @ 2024-03-30 1265892/week @ 2024-04-06 1292827/week @ 2024-04-13 1090801/week @ 2024-04-20

5,108,481 downloads per month
Used in 196 crates (38 directly)

MIT/Apache

205KB
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