Graph Tools

Graph Tools

trac3r00 Updated 0 repo stars

File contents

Graph Tools

Every dependency chain is an edge list until someone makes it queryable.

Commands

python3 scripts/graph_tools.py deps.json --stats
python3 scripts/graph_tools.py deps.json --path ui database
python3 scripts/graph_tools.py deps.json --fail-on-cycle   # CI: assert DAG

Input

{"edges": [["ui", "api"], ["api", "db"], ["db", "cache"]]}

Reports

  • Node/edge counts, in/out degree per node (--stats)
  • Cycles as readable paths (a -> b -> c -> a), exit 1 when found
  • Shortest path via BFS (--path FROM TO), exit 1 when none
  • --fail-on-cycle for CI gates on pipelines, imports, migrations

Pairs with

gate-graph (module overlap via AST fingerprints — the code-level view; this is the structure-level view), json-diff (compare two graph snapshots).

trac3r00/agent-skills commit e808218188

Frequently asked questions

npx get-skill add trac3r00/graph-tools