# facebookincubator/Bowler

Safe code refactoring for modern Python.

Repository: https://github.com/facebookincubator/Bowler
Canonical: https://ross.abutalabs.com/products/bowler
Homepage: https://pybowler.io/
Language: Python
License: MIT
License Family: permissive
Archived: true
Last push: 2024-06-21T03:38:05+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3009, "days_push": 803, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1610, forks 136 (observed 2026-08-28T04:05:10.924412+00:00)

## What it is
Bowler is a refactoring tool for manipulating Python source code at the syntax tree level, enabling safe large-scale code modifications that are guaranteed to compile. It offers both a command line interface and a fluent Query API built on lib2to3/fissix concrete syntax trees.

## Use cases
- rename a function across an entire python codebase
- automate large-scale python code modifications
- generate interactive diffs for refactoring changes
- migrate old api calls to modern replacements
- build reusable refactoring scripts with a fluent api
- codemod python 2 code to python 3

## When to choose
- you need safe, syntax-tree-level python refactoring that preserves formatting and comments
- you want a simple fluent API for scripted codemods
- you need to refactor codebases spanning older python grammars

## When to avoid
- you need to refactor code using the newest python grammar features (recommend LibCST instead)
- you want an actively developed tool with a stable API
- you need linting or IDE integration features

## Facets
- artifact type: cli-tool
- maturity: maintenance
- function: parser, developer-tools, cli
- domain: developer-tools, programming-languages
- platform: python, cli, cross-platform
- tags: refactoring, codemod, syntax-tree, lib2to3, fluent-api, automation

## Member repositories
- facebookincubator/Bowler (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:10.924412+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:51:14.191296+00:00, confidence not recorded.
  - readme: https://github.com/facebookincubator/Bowler (fetched 2026-08-28T04:05:10.924412+00:00, sha 56c79a23a87d)
  - homepage: https://pybowler.io/ (fetched 2026-08-29T11:23:23.632001+00:00, sha a459e03d8f2e)
  - site_page: https://pybowler.io/docs/basics-intro (fetched 2026-08-29T11:23:23.640853+00:00, sha b0be3f02bac0)
  - site_page: https://pybowler.io/docs/api-query (fetched 2026-08-29T11:23:23.642601+00:00, sha c4ab927368aa)
  - site_page: https://pybowler.io/docs/dev-roadmap (fetched 2026-08-29T11:23:23.644421+00:00, sha 0add3f368b4b)
  - site_page: https://pybowler.io/docs/dev-intro (fetched 2026-08-29T11:23:23.645981+00:00, sha 678be87187e2)
  - site_page: https://pybowler.io/docs/basics-refactoring (fetched 2026-08-29T11:23:23.647579+00:00, sha d0a7f5cfcbf4)
  - registry_pypi: https://pypi.org/pypi/bowler/json (fetched 2026-08-29T11:23:23.649389+00:00, sha d68b0500b2ec)
- Data as of 2026-08-30T08:39:29.467469+00:00.
