graph.json, but you can load it into Neo4j to query it in Cypher, join it with other data, or view it in Neo4j Browser and Bloom. You can write a Cypher script and import it, or push the graph straight to a running database.
What you’ll build
- A
cypher.txtimport script for your graph. - The graph loaded into Neo4j, with indexes on node ids.
- Cypher queries for callers, hubs and dependencies.
Setup
neo4j extra adds the Python driver used by --push. The script export doesn’t need it. You need a Neo4j 5 database, local or hosted.
Step 1: Write a Cypher script
graphify-out/cypher.txt. Nodes come first, labeled by type, then relationships:
Code, Rationale and Concept. Relationship types are the graph’s relations in upper case, such as CALLS, CONTAINS, IMPORTS and REFERENCES, and each carries its confidence.
Step 2: Import the script
id. On a large graph, create an index for each node label first so the import doesn’t scan every node:
Step 3: Or push directly
--push creates an index on id for each node label, then upserts nodes and relationships with MERGE, so you can push again after a rebuild without duplicates. Pushed nodes carry every scalar property from the graph, including source_file, source_location and community. The script from Step 1 only sets id and label, so use --push when you want file and line in your query results. Set the password in NEO4J_PASSWORD rather than --password, so it stays out of your shell history and process list.
Step 4: Query in Cypher
The most connected functions:When it goes wrong
neo4j driver not installed. Install the extra: uv tool install "graphifyy[neo4j]".
The import is very slow. Create the indexes in Step 2 before running the script, or use --push, which creates them for you.
Labels have odd names. Graphify strips characters Neo4j can’t use in a label, falling back to Entity. Relationship names are upper-cased, with spaces and dashes turned into underscores.
Production patterns
- Rebuild and push from CI on the default branch, so the database matches what shipped.
- Use FalkorDB the same way with
graphify export falkordband--push. - For other tools,
graphify export graphmlwrites GraphML for Gephi and similar. - In Graphify, the hosted product, you query the graph from your agent over MCP with no database to run.
Complete example
What you built
Your code graph lives in Neo4j, indexed and queryable in Cypher, and you can refresh it after every rebuild.Next steps
Exports
Every export format: wiki, HTML, GraphML, Neo4j and more.
Postgres schema graph
Add your database schema before you export.
Try it in Graphify
We build and host the graph for you. Start with a 14-day Pro trial, then keep up to 3 repositories on Free. No card required.