# scottrogowski/code2flow

Pretty good call graphs for dynamic languages

Repository: https://github.com/scottrogowski/code2flow
Canonical: https://ross.abutalabs.com/products/code2flow
Language: Python
License: MIT
License Family: permissive
Last push: 2025-07-27T18:18:05+00:00

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

## Adoption (not part of the score)
Stars 4604, forks 332 (observed 2026-08-28T04:08:54.903066+00:00)

## What it is
Code2flow is a command-line tool that generates approximate call graphs for dynamic languages (Python, JavaScript, Ruby, PHP) by parsing source files into ASTs and connecting function definitions to call sites. It outputs DOT flowcharts visualized with Graphviz.

## Use cases
- generate a call graph for a python project
- untangle spaghetti code and see which functions call which
- find orphaned functions that are never called
- onboard new developers by visualizing codebase structure
- extract a subset of the call graph around a target function
- visualize source code as dot flowcharts

## When to choose
- you work in Python, JavaScript, Ruby, or PHP and want a quick approximate call graph
- you need to understand or document the structure of an unfamiliar dynamic-language codebase
- you want a lightweight CLI that outputs Graphviz DOT files

## When to avoid
- you need a perfectly accurate call graph for duck-typed dynamic code
- you work primarily in statically typed languages like Java or C++
- you need IDE-integrated interactive navigation rather than static diagrams

## Facets
- artifact type: cli-tool
- maturity: active
- function: parser, developer-tools, data-visualization
- domain: developer-tools, programming-languages, parsers
- platform: python, cli, cross-platform
- tags: call-graph, static-analysis, code-visualization, graphviz, ast, python, javascript, ruby, php

## Member repositories
- scottrogowski/code2flow (main) score 47

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:54.903066+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-29T18:19:45.475646+00:00, confidence not recorded.
  - readme: https://github.com/scottrogowski/code2flow (fetched 2026-08-28T04:08:54.903066+00:00, sha 12cf8d344517)
  - registry_pypi: https://pypi.org/pypi/code2flow/json (fetched 2026-08-29T09:04:53.325452+00:00, sha ba6ff728863f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
