NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #515 most downloaded on PyPI
A concrete syntax tree with AST-like properties for Python 3.0 through 3.15 programs.
Last release 2 months ago
29 Jul 2026
Release timing varies
gaps range from 2 weeks to 9 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
7 years old
66 releases · first in 2019
Add support for Python 3.15 by @AlexWaygood and @thatch in #1454 and #1456
CodemodCommand helpers for adding and removing imports by @frvnkliu in #1432**rest in class patterns by @itamaro in #1438CodemodCommand import helpers by @frvnkliu in #1437tokenize function's docstring grammar by @galenseilis in #1434Full Changelog: v1.8.6...v1.9.0
One column per quarter.
CodemodCommand helpers for adding and removing imports by @frvnkliu in https://github.com/Instagram/LibCST/pull/1432**rest in class patterns by @itamaro in https://github.com/Instagram/LibCST/pull/1438CodemodCommand import helpers by @frvnkliu in https://github.com/Instagram/LibCST/pull/1437tokenize function's docstring grammar by @galenseilis in https://github.com/Instagram/LibCST/pull/1434Full Changelog: https://github.com/Instagram/LibCST/compare/v1.8.6...v1.9.0
Update pyproject.toml for 3.14t by @itamaro in #1417
Full Changelog: https://github.com/Instagram/LibCST/compare/v1.8.5...v1.8.6
fix: circular import error by @drinkmorewaterr in #1406
Full Changelog: v1.8.4...v1.8.5
fixed: generate Attribute nodes when applying type annotations by @tungol in #1396
Full Changelog: v1.8.2...v1.8.4
Full Changelog: https://github.com/Instagram/LibCST/compare/v1.8.2...v1.8.4
fix(dependency): add back typing-extensions for 3.9 by @Lee-W in #1358
add helper to convert nodes to matchers by @zsol in #1351
Full Changelog: v1.8.0...v1.8.1
Full Changelog: https://github.com/Instagram/LibCST/compare/v1.8.0...v1.8.1
Allow configuring empty formatter lists in codemod CLI by @ngoldbaum in #1319
Full Changelog: v1.7.0...v1.8.0
Full Changelog: https://github.com/Instagram/LibCST/compare/v1.7.0...v1.8.0
add free-threaded CI by @ngoldbaum in #1312
chic and upgrade annotate-snippets by @zanieb in #1293Full Changelog: v1.6.0...v1.7.0
chic and upgrade annotate-snippets by @zanieb in https://github.com/Instagram/LibCST/pull/1293Full Changelog: https://github.com/Instagram/LibCST/compare/v1.6.0...v1.7.0
rename: store state in scratch by @zsol in #1250
typing.Union to | by @yangdanny97 in #1270Full Changelog: v1.5.1...v1.6.0
typing.Union to | by @yangdanny97 in https://github.com/Instagram/LibCST/pull/1270Full Changelog: https://github.com/Instagram/LibCST/compare/v1.5.1...v1.6.0
build wheels for musllinux by @MrMino in #1243
Full Changelog: https://github.com/Instagram/LibCST/compare/v1.5.0...v1.5.1
FullyQualifiedNameProvider: Optionally consider pyproject.toml files when determining a file's module name and package by @camillol in https://github.
license instead of license-file by @michel-slm in https://github.com/Instagram/LibCST/pull/1189Full Changelog: https://github.com/Instagram/LibCST/compare/v1.4.0...v1.5.0
Fix Literal parse error in RemoveImportsVisitor by @camillol in https://github.com/Instagram/LibCST/pull/1130
docs/source/metadata.rst by @tiangolo in https://github.com/Instagram/LibCST/pull/1134docs/source/scope_tutorial.ipynb by @tiangolo in https://github.com/Instagram/LibCST/pull/1135Full Changelog: https://github.com/Instagram/LibCST/compare/v1.3.1...v1.4.0
ImportError due to missing mypy_extensions dependency by @zsol in https://github.com/Instagram/LibCST/pull/1128
mypy_extensions dependency by @zsol in https://github.com/Instagram/LibCST/pull/1128Full Changelog: https://github.com/Instagram/LibCST/compare/v1.3.0...v1.3.1
Removed dependencies on typing_extensions and typing_inspect by @zsol in https://github.com/Instagram/LibCST/pull/1126
typing_extensions and typing_inspect by @zsol in https://github.com/Instagram/LibCST/pull/1126Full Changelog: https://github.com/Instagram/LibCST/compare/v1.2.0...v1.3.0
Support running LibCST on Python 3.12 and drop support for running it on 3.8
Element::codegen to be used by external users by @Wilfred in https://github.com/Instagram/LibCST/pull/1071Full Changelog: https://github.com/Instagram/LibCST/compare/v1.1.0...v1.2.0
parser: PEP 695 - Type Parameter Syntax #1004
Full Changelog: https://github.com/Instagram/LibCST/compare/v1.0.1...v1.1.0
Fix type of evaluated_value on string to allow bytes by @ljodal in https://github.com/Instagram/LibCST/pull/721
evaluated_value on string to allow bytes by @ljodal in https://github.com/Instagram/LibCST/pull/721Full Changelog: https://github.com/Instagram/LibCST/compare/v1.0.0...v1.0.1
The first major release of LibCST is essentially the same as 0.4.10, but using the newer, Rust-based parser implementation by default. The old, pure P
The first major release of LibCST is essentially the same as 0.4.10, but using the
newer, Rust-based parser implementation by default. The old, pure Python parser is
scheduled for removal in the next (non-patch) release. Until then, it is available with
the LIBCST_PARSER_TYPE environment variable set to pure.
Full Changelog: https://github.com/Instagram/LibCST/compare/v0.4.10...v1.0.0
@and-semakin made their first contribution in https://github.com/Instagram/LibCST/pull/816
Full Changelog: https://github.com/Instagram/LibCST/compare/v0.4.9...v0.4.10
Bump setuptools-rust version by @zsol in https://github.com/Instagram/LibCST/pull/809
Full Changelog: https://github.com/Instagram/LibCST/compare/v0.4.8...v0.4.9
@dhruvmanila made their first contribution in https://github.com/Instagram/LibCST/pull/728
graphviz-dev package pre-installed any more by @MapleCCC in https://github.com/Instagram/LibCST/pull/751FullRepoManager by @MapleCCC in https://github.com/Instagram/LibCST/pull/750TypeOf is one of options in OneOf / AllOf by @MapleCCC in https://github.com/Instagram/LibCST/pull/756ExpressionContextProvider by @MapleCCC in https://github.com/Instagram/LibCST/pull/760Full Changelog: https://github.com/Instagram/LibCST/compare/v0.4.7...v0.4.8
@Chenguang-Zhu made their first contribution in https://github.com/Instagram/LibCST/pull/720
Full Changelog: https://github.com/Instagram/LibCST/compare/v0.4.6...v0.4.7
@superbobry made their first contribution in https://github.com/Instagram/LibCST/pull/702
@zzl0 made their first contribution in https://github.com/Instagram/LibCST/pull/704
Full Changelog: https://github.com/Instagram/LibCST/compare/v0.4.4...v0.4.5
@adamchainz made their first contribution in https://github.com/Instagram/LibCST/pull/688
Full Changelog: https://github.com/Instagram/LibCST/compare/v0.4.3...v0.4.4
Restore the 0.4.1 behavior for libcst.helpers.get_absolute_module by @lpetre in https://github.com/Instagram/LibCST/pull/684
Full Changelog: https://github.com/Instagram/LibCST/compare/v0.4.2...v0.4.3
@stanislavlevin made their first contribution in https://github.com/Instagram/LibCST/pull/650
Full Changelog: https://github.com/Instagram/LibCST/compare/v0.4.1...v0.4.2
@ariebovenberg made their first contribution in https://github.com/Instagram/LibCST/pull/605
This release contains a new parsing infrastructure that is turned off by default. You can enable it by setting the LIBCST_PARSER_TYPE environment vari
This release contains a new parsing infrastructure that is turned off by default. You
can enable it by setting the LIBCST_PARSER_TYPE environment variable to native
before parsing an input with the usual LibCST APIs. Parsing Python 3.10 documents is
only supported in this new mode.
Note: the new parser is built as a native extension, so LibCST will ship with binary wheels from now on.
Nothing published for this version
Fixes incorrectly missing annotations by @lpetre in https://github.com/Instagram/LibCST/pull/561
Full Changelog: https://github.com/Instagram/LibCST/compare/v0.3.22...v0.3.23
Add --indent-string option to libcst.tool print by @jreese in https://github.com/Instagram/LibCST/pull/525
libcst.tool print by @jreese in https://github.com/Instagram/LibCST/pull/525m.OneOf() docs by @Zac-HD in https://github.com/Instagram/LibCST/pull/529from __future__ import annotations in ATAV by @stroxler in https://github.com/Instagram/LibCST/pull/540Full Changelog: https://github.com/Instagram/LibCST/compare/0.3.21...v0.3.22
libcst.tool print #525Fix pyre command for type inference provider #523
Don't reset subprocess environment to fix codemodding on windows #495
Return more specific QNames for assignments #477
Add FlattenSentinel to support replacing a statement with multiple statements #455
Optimization: reduce the number of unused parallel processes #440
Support PEP-604 style unions in decorator annotations #429
Support Named Unicode Characters and yield in f-strings #424
Fix is_annotation for types used in classdef base and assign value #406
Use correct type for AugAssign and AnnAssign target #396
fix RemoveImportsVisitor crash when ImportAlias is inserted without comma #397
Update return type of ParentNodeProvider to be CSTNode #377
Handle string annotations in ScopeProvider #373
Support string type annotations in RemoveUnusedImports #353
Handle type subscripts when applying annotations. #335
Added RenameCommand to rename all instances of a local or imported object to a specified new name. #308
RenameCommand to rename all instances of a local or imported object to a specified new name. #308ImportError under Python 3.9. #306stdout being plugged into successfully codemod-ed files. #309QualifiedName retrieval for names with repeated substrings. #312ApplyTypeAnnotationsVisitor. #314ExpressionContextProvider by giving subscript values a LOADcontext. #319Added ConvertNamedTupleToDataclassCommand to convert NamedTuple class declarations to Python 3.7 dataclasses using the @dataclass(frozen=True) decorat
ConvertNamedTupleToDataclassCommand to convert NamedTuple class declarations to Python 3.7 dataclasses using the @dataclass(frozen=True) decorator. #299Expose more granular Assignments and Accesses for dotted imports in ScopeProvider. #284
Assignments and Accesses for dotted imports in ScopeProvider. #284get_qualified_names_for returns the most appropriate qualified name. #290SyntaxError raised by formatter in codemod run. #288 #289ApplyTypeAnnotationsVisitor.add_stub_to_context as ApplyTypeAnnotationsVisitor.store_stub_in_context and add overwrite_existing_annotations to allow overwrite existing type annotations. #289Too many open files on OSX. #283ApplyTypeAnnotationsVisitor.add_stub_to_context is renamed as ApplyTypeAnnotationsVisitor.store_stub_in_context.Supported CST parsing for Python 3.0, 3.1 and 3.3. #261
RemoveUnusedImportsCommand for removing unused import codemod. #266ApplyTypeAnnotationsVisitor.add_stub_to_context for apply type annotations from stub modules. #265get_metadata when MetadataWrapper is not used. #257ByteSpanPositionProvider provides start offset and length of CSTNode as metadata.
ByteSpanPositionProvider provides start offset and length of CSTNode as metadata.get_docstring helper provides docstring from Module, ClassDef and FunctionDef node types.ScopeProvider performance to run faster and use less memory:
Assignment of keyword Arg.infer_accesses step._assignments mutation when calling read-only Scope.get_qualified_names_for and __contains__.Added RemoveImportsVisitor to remove an import if it's not used in a module.
RemoveImportsVisitor to remove an import if it's not used in a module.GatherExportsVisitor to gather exports specified in __all__.evaluated_name and evaluated_name in ImportAlias.get_absolute_module_for_import and get_absolute_module_for_import_or_raise.CodemodContext.full_module_name for full dotted module name.ConvertFormatStringCommand._version.py and can print it by python -m libcst.tool --version.EnsureImportPresentCommand with --alias option.ConvertFormatStringCommand with --allow-strip-comments and --allow-await options.Added helpers to get both the raw and evaluated value of a SimpleString.
get_full_name_for_node_or_raise helper to remove boilerplate of checking against None.libcst codemod command.get_full_name_for_node now supports decorators.libcst list crashing if a codemod does unsafe work on import.Deprecated exporting ensure_type from libcst in favor of libcst.helpers.
get_full_name_for_expression helper method.has_name helper to QualifiedNameProvider.--python-version flag to libcst.tool print utility.del statements.ensure_type from libcst in favor of libcst.helpers.ExtSlice and helper code in favor of SubscriptElement.default_params attribute on Parameters.SyntacticPositionProvider and BasicPositionProvider.CodePosition and CodeRange exports on libcst in favor of libcst.metadata.Command-line interface now shows rough estimate of time remaining while executing a codemod.
Added Codemod framework for running code transform over a codebase in parallel.
Deprecated parsing function parameters with defaults into default_params attribute. They can be found in the params attribute instead.
extract, extractall and replace functions to Matchers API.AllOf and OneOf so that they can be used with sequence expansion operators.default_params attribute. They can be found in the params attribute instead.Fixed broken types for sequence matchers.
Deprecated BasicPositionProvider and SyntacticPositionProvider in favor of WhitespaceInclusivePositionProvider and PositionProvider.
unsafe_skip_copy optimization to MetadataWrapper.findall function.MatchMetadataIfTrue special matcher.QualifiedName now supports imported attributtes.ExpressionContext properly marks loop variables as STORE.BasicPositionProvider and SyntacticPositionProvider in favor of WhitespaceInclusivePositionProvider and PositionProvider.Deprecated ExtSlice in favor of SubscriptElement.
deep_with_changes helper method on CSTNode.LocalScope (FunctionScope, ClassScope or ComprehensionScope).CodePosition and CodeRange from libcst.metadata instead of libcst.@visit or @leave decorators.deep_clone potentially blowing the stack with large LibCST trees.ExtSlice in favor of SubscriptElement.Subscript slices directly into Index or Slice nodes.Your coding agent can read these notes before it upgrades. Set up the MCP server →