#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

#355 in Command-line interface

Download history 527404/week @ 2023-12-23 779387/week @ 2023-12-30 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 1071451/week @ 2024-04-06

5,077,816 downloads per month
Used in 186 crates (36 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–8.5MB
~44K SLoC