--- id: strip-ansi version: "0.1.1" license: unclear license_treatment: unclear maintenance: dormant --- # strip-ansi — Strip ANSI escape sequences from a string License: unclear · Maintenance: dormant · Downloads: 176.5K/mo ## What it is and what it does strip-ansi is a minimal utility that removes ANSI escape sequences—the control codes terminals use for colors, bold, underline, and other text formatting—from strings. It takes a string containing these codes and returns the plain text content. The package has no runtime dependencies and installs quickly. It is typically used when you need to log, store, or process terminal output that includes color codes but you want only the readable text. Common scenarios include cleaning up colored CLI output for storage in files, parsing terminal logs, or preparing text for analysis where formatting codes would interfere. Use it for: - Strip color codes from CLI tool output before writing to a log file or database. - Clean up terminal output captured from colored command-line utilities for text processing. - Prepare colored terminal text for analysis or comparison where ANSI codes would cause false mismatches. - Remove formatting codes from captured pytest or test runner output for plain-text reporting. - Sanitize colored output from third-party CLI tools before displaying in a non-terminal context. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Removes ANSI escape sequences (color codes, formatting directives) from strings, leaving plain text. Yes, if you need to strip ANSI codes from strings and accept dormant maintenance. The package is simple, dependency-free, and has no known vulnerabilities. However, verify the license before use, and be aware that no updates have been released since June 2020—if future Python versions introduce breaking changes to string handling or ANSI standards, this package may not adapt. ## Install pip install strip-ansi uv add strip-ansi poetry add strip-ansi ## Installing strip-ansi Before you install: Low install friction; no runtime dependencies. Maintenance is dormant—last release June 2020, no updates since, though the repository remains active with a recent commit in December 2024. License in practice: License status is unclear; the package metadata contains no SPDX identifier or raw license text. Verify the actual license before using in proprietary or copyleft-sensitive contexts. Quickstart: pip install strip_ansi from strip_ansi import strip_ansi result = strip_ansi("\033[38mLorem ipsum\033[0m") print(result) # Output: Lorem ipsum Requires Python 3.6 or later; author notes uncertainty about compatibility with Python 2 or versions below 3.6. Verify before relying: - Whether the package is actively maintained or if dormancy signals abandonment risk for future Python versions. - Actual license terms—metadata does not declare one, so check the repository directly. - Whether ANSI stripping handles all modern terminal escape sequences or only a subset. ## Package facts - License: not declared (unclear) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 176.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags strip ansi escape codes, remove terminal color codes, clean ansi sequences, ansi string sanitizer, terminal output cleanup, ansi escape removal, plain text from colored output, ansi-escape-codes, terminal-output, text-cleaning [View on SkillFed](https://skillfed.io/packages/strip-ansi) · [View on PyPI](https://pypi.org/project/strip-ansi/)