# facebookarchive/pfff

Tools for code analysis, visualizations, or style-preserving source transformation.

Repository: https://github.com/facebookarchive/pfff
Canonical: https://ross.abutalabs.com/products/pfff
Homepage: http://github.com/facebook/pfff/wiki/Main
Language: OCaml
License: NOASSERTION
License Family: other
Archived: true
Last push: 2019-03-27T23:04:23+00:00

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

## Adoption (not part of the score)
Stars 2437, forks 203 (observed 2026-08-28T04:06:51.496272+00:00)

## What it is
pfff is a set of OCaml tools and APIs for static analysis, code visualization, code navigation, and style-preserving source-to-source transformations like refactoring. It includes tools such as sgrep (syntactical grep), spatch (syntactical patch), codemap, and codegraph, with good support for C, Java, JavaScript, PHP, and OCaml.

## Use cases
- find precise code patterns across a codebase with a syntactical grep
- apply structural patches to refactor source code while preserving style
- visualize and navigate source code dependencies
- index a codebase and query its structure
- generate Emacs tags for code navigation
- lint-like bug finding in PHP or other supported languages

## When to choose
- you need structural, syntax-aware code search or patching for C, Java, PHP, or JavaScript
- you want to embed language parsers and analysis APIs into your own OCaml tooling
- you need dependency visualization for a legacy codebase

## When to avoid
- you need actively maintained tooling - the project was archived in 2019 and is read-only
- you want modern language support or up-to-date parsers
- you need a pure grep/patch replacement without building OCaml dependencies

## Facets
- artifact type: library
- maturity: abandoned
- function: parser, static-site-generator, search-engine, developer-tools, code-review
- domain: developer-tools, parsers, programming-languages
- platform: cross-platform
- tags: static-analysis, code-visualization, refactoring, sgrep, spatch, ocaml, archived, static analysis, linux, macos

## Member repositories
- facebookarchive/pfff (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:51.496272+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-30T02:31:00.140257+00:00, confidence not recorded.
  - readme: https://github.com/facebookarchive/pfff (fetched 2026-08-28T04:06:51.496272+00:00, sha a423e6b07e8e)
  - homepage: http://github.com/facebook/pfff/wiki/Main (fetched 2026-08-29T10:12:17.180347+00:00, sha 759c702c8fc9)
- Data as of 2026-08-30T08:39:29.467469+00:00.
