#strip #terminal #wincon

anstream

IO stream adapters for writing colored text that will gracefully degrade according to your terminal's capabilities

32 releases (1 stable)

new 1.0.0 Feb 11, 2026
0.6.21 Oct 2, 2025
0.6.20 Aug 5, 2025
0.6.19 Jun 4, 2025
0.2.6 Mar 17, 2023

#135 in Command-line interface

Download history 4876593/week @ 2025-10-22 5130527/week @ 2025-10-29 5225166/week @ 2025-11-05 5379830/week @ 2025-11-12 5443616/week @ 2025-11-19 4244386/week @ 2025-11-26 5445676/week @ 2025-12-03 5466132/week @ 2025-12-10 4698209/week @ 2025-12-17 2730985/week @ 2025-12-24 3622767/week @ 2025-12-31 5577768/week @ 2026-01-07 5587957/week @ 2026-01-14 6141839/week @ 2026-01-21 6229351/week @ 2026-01-28 6572200/week @ 2026-02-04

25,637,196 downloads per month
Used in 1,025 crates (149 directly)

MIT/Apache

215KB
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.

Contribute

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–1.8MB
~33K SLoC