--- id: libcst version: "1.9.0" license: All contributions towards LibCST are MIT licensed. Some Python files have been derived from the standard library and are therefore PSF licensed. Modifications on these files are dual licensed (both… (full text in the JSON record) license_treatment: permissive maintenance: active --- # libcst — A concrete syntax tree with AST-like properties for Python 3.0 through 3.15 programs. License: permissive · Maintenance: active · Popularity: top 1,000 on PyPI ## Install pip install libcst uv add libcst poetry add libcst ## Description .. image:: docs/source/_static/logo/horizontal.svg :width: 600 px :alt: LibCST A Concrete Syntax Tree (CST) parser and serializer library for Python |support-ukraine| |readthedocs-badge| |ci-badge| |pypi-badge| |pypi-download| |notebook-badge| |types-badge| .. |support-ukraine| image:: https://img.shields.io/badge/Support-Ukraine-FFD500?style=flat&labelColor=005BBB :alt: Support Ukraine - Help Provide Humanitarian Aid to Ukraine. :target: https://opensource.fb.com/support-ukraine .. |readthedocs-badge| image:: https://readthedocs.org/projects/libcst/badge/?version=latest&style=flat :target: https://libcst.readthedocs.io/en/latest/ :alt: Documentation .. |ci-badge| image:: https://github.com/Instagram/LibCST/actions/workflows/build.yml/badge.svg :target: https://github.com/Instagram/LibCST/actions/workflows/build.yml?query=branch%3Amain :alt: Github Actions .. |pypi-badge| image:: https://img.shields.io/pypi/v/libcst.svg :target: https://pypi.org/project/libcst :alt: PYPI .. |pypi-download| image:: https://pepy.tech/badge/libcst/month :target: https://pepy.tech/project/libcst/month :alt: PYPI Download .. |notebook-badge| image::... ## AI interpretation — verify before relying LibCST parses Python 3.0–3.15 source code into a lossless Concrete Syntax Tree that preserves all formatting (comments, whitespace, parentheses), enabling automated refactoring and linting tools to read and modify code while maintaining exact formatting. Verdict: LibCST is a well-maintained, actively developed parser for building code transformation tools. Its lossless CST design and broad Python version support (3.9–3.15) make it suitable for production refactoring and linting. Medium install friction from native compilation is offset by prebuilt wheels for common platforms and zero known vulnerabilities. [View on SkillFed](https://skillfed.io/packages/libcst) · [View on PyPI](https://pypi.org/project/libcst/)