Instagram/LibCST
View on GitHub ↗ ★ 1,966 Python
A concrete syntax tree parser and serializer library for Python that preserves many aspects of Python's abstract syntax tree
11 mentions on Hacker News by 8 people: 1 story, 10 comments · first 2019-08-07 · latest 2026-07-26
20082026
-
…https://crates.io/crates/rustpython-ruff_python_parser .. https://github.com/astral-sh/ruff LibCST: https://github.com/Instagram/LibCST
comment by westurner · 2026-07-26 · in Ruff v0.16.0 – Significant new updates – 413 default rules up from 59 -
…optimization make libCST or bandit faster? https://news.ycombinator.com/item?id=39111747 libCST: https://github.com/Instagram/LibCST bandit: https://github.com/PyCQA/bandit Links to codemod tools; "Baby Steps into Genetic Programming"…
comment by westurner · 2026-06-16 · in Making ast.walk 220x Faster -
…most robust tool I’ve found but you can just use built-in ast.py and ad-hoc file:line parsing too. https://github.com/Instagram/LibCST [1] Sorry to be a fanboi but Antimemetics is amazing! https://qntm.org/fiction
comment by gorgoiler · 2026-02-02 · in Ratchets in software development (2021) -
I was going to suggest libCST, it works really well and is much less of a hassle to set up than this. https://github.com/Instagram/LibCST
comment by carlmr · 2024-09-28 · in Refactoring Python with Tree-sitter and Jedi -
…Jedi or manually edit the source (and then deal with nasty off-set re-parsing logic). Or libCST: https://github.com/Instagram/LibCST docs: https://libcst.readthedocs.io/en/latest/ : > LibCST parses Python 3.0 -> 3.12 source code as a CST…
comment by westurner · 2024-09-27 · in Refactoring Python with Tree-sitter and Jedi -
…`black` (and `precommit run --all-files`) to format the code after mutating it? Instagram/LibCST: https://github.com/Instagram/LibCST PyCQA/redbaron: https://github.com/PyCQA/redbaron E.g. PyCQA/bandit does static analysis for security…
comment by westurner · 2024-01-24 · in Show HN: Codemodder – A new codemod library for Java and Python -
…using other interesting tools and libraries from FB (Instagram) like libcst [1] or fixit [2] [1] https://github.com/Instagram/LibCST/ [2] https://github.com/Instagram/Fixit
comment by nezirus · 2023-01-05 · in Pyright: Static Type Checker for Python -
Never used it but it appears that Facebook/Instagram have a format preserving CST library for Python: https://github.com/Instagram/LibCST
comment by trankas · 2021-06-07 · in Abstract Syntax Tree for Patching Code and Assessing Code Quality -
Are you sure it wraps the LibCST library ( https://github.com/Instagram/LibCST )? > Bowler builds on top of the Concrete Syntax Tree (CST) provided by lib2to3 in the standard library.
comment by codethief · 2021-06-07 · in Abstract Syntax Tree for Patching Code and Assessing Code Quality -
…used by the likes of black and yapf. There’s also a good third party options now in the form of https://github.com/Instagram/LibCST . There’s been talks about adding a CST module to PSL, but I don’t think the proposal went anywhere.…
comment by oefrha · 2021-06-07 · in Abstract Syntax Tree for Patching Code and Assessing Code Quality -
▲ 16
LibCST: A Concrete Syntax Tree Parser and Serializer Library for Pythonstory by pipeep · 2019-08-07 · 0 comments