What is in the graph?
Nodes are repositories, files, functions, services, endpoints, dependencies, findings and fixes. Edges say how they relate:
| Edge | Joins |
|---|---|
CONTAINS | A repository to its files, a file to its functions |
RUNS | A service to the repository whose code it runs |
SERVES | A service to its endpoints |
HANDLED_BY | An endpoint to the function that handles it |
CALLS | Code or a service to a dependency |
FOUND_IN | A finding to the function it is in |
FIRED_ON | A finding to the endpoint or dependency production showed it on |
FIXED_BY | A finding to its fix |
It is built from your code indexes and the production data the engine receives, so it answers questions such as “which endpoints does this function serve?” and “which findings sit behind this failing dependency?”.
How do I open it in the console?
Context graph in the menu opens the Production Context Graph for one repository at a time, with business areas, the services behind them and what they depend on. What needs you most is highlighted first.

demo/partners.The same graph is on every finding, as How this connects, and on every service page, as Map.
How do I export it?
tomosu graph exports the graph from a running engine, or from code indexes alone with --index-dir:
$ tomosu graph --engine http://localhost:7600 --format json
{
"nodes": [
{
"id": "repo:demo/partners",
"type": "repository",
"label": "demo/partners",
"sub": "demo-1",
"repo": "demo/partners",
"props": {
"commit": "demo-1",
"files": 1
}
},
{
"id": "file:demo/partners:app.py",
"type": "file",
"label": "app.py",
"repo": "demo/partners",
"hot": true,
"severity": "Low",
"props": {
"language": "python",
"lines": 54
}
},
{
"id": "fn:demo/partners:app.py:charge",
"type": "function",
"label": "charge",
"sub": "app.py:14",
…
$ tomosu graph --engine http://localhost:7600 --format cypher
// Production Context Graph, exported by the engine. Load with cypher-shell.
CREATE CONSTRAINT IF NOT EXISTS FOR (n:Dependency) REQUIRE n.id IS UNIQUE;
CREATE CONSTRAINT IF NOT EXISTS FOR (n:Endpoint) REQUIRE n.id IS UNIQUE;
CREATE CONSTRAINT IF NOT EXISTS FOR (n:File) REQUIRE n.id IS UNIQUE;
CREATE CONSTRAINT IF NOT EXISTS FOR (n:Finding) REQUIRE n.id IS UNIQUE;
CREATE CONSTRAINT IF NOT EXISTS FOR (n:Fix) REQUIRE n.id IS UNIQUE;
CREATE CONSTRAINT IF NOT EXISTS FOR (n:Function) REQUIRE n.id IS UNIQUE;
CREATE CONSTRAINT IF NOT EXISTS FOR (n:Repository) REQUIRE n.id IS UNIQUE;
CREATE CONSTRAINT IF NOT EXISTS FOR (n:Service) REQUIRE n.id IS UNIQUE;
MERGE (n:Repository {id: 'repo:demo/partners'}) SET n.label = 'demo/partners', n.sub = 'demo-1', n.repo = 'demo/partners', n.severity = '';
MERGE (n:File {id: 'file:demo/partners:app.py'}) SET n.label = 'app.py', n.sub = '', n.repo = 'demo/partners', n.severity = 'Low';
MERGE (n:Function {id: 'fn:demo/partners:app.py:charge'}) SET n.label = 'charge', n.sub = 'app.py:14', n.repo = 'demo/partners', n.severity = 'Critical';
MERGE (n:Function {id: 'fn:demo/partners:app.py:price'}) SET n.label = 'price', n.sub = 'app.py:24', n.repo = 'demo/partners', n.severity = 'High';
MERGE (n:Function {id: 'fn:demo/partners:app.py:notify'}) SET n.label = 'notify', n.sub = 'app.py:30', n.repo = 'demo/partners', n.severity = 'Critical';
…
| Option | What it does |
|---|---|
--format json|graphml|cypher | JSON for scripts, GraphML for graph tools, Cypher for Neo4j |
--focus ID --depth N | Only the neighbourhood of one node, such as fn:demo/shop:app.py:orders, up to 4 hops |
--view system / --view area --area NAME | The system map, or one business area |
--out FILE | Write to a file |
The API is GET /api/graph, with the same options as query parameters.
What does the free graph cover?
The free engine draws the graph for up to five repositories; scanning, findings and linking stay unlimited. The paid enterprise graph in Tomosu Cloud adds every repository, history, infrastructure (Kubernetes, AWS, Terraform) and what fixes held at other organisations. Those layers show locked in the free console.