Turn Terraform into Knowledge

Convert your Terraform dependency graphs into a queryable Neo4j database. Empower AI agents to understand your infrastructure context.

Get Started
GraphX Screenshot - Visualizing Terraform dependencies in Neo4j

What is Terraform GraphX?

Terraform GraphX is a powerful CLI tool designed to bridge the gap between static Infrastructure as Code (IaC) definitions and dynamic infrastructure analysis. By converting `terraform graph` output into a Neo4j graph database, it unlocks capabilities for structural analysis, impact assessment, and AI-driven infrastructure management.

How It Works

Terraform

Parses your `*.tf` or plan files

➜

GraphX

Processes DOT graph to Graph Data

➜

Neo4j

Stores nodes & relationships

➜

MCP / AI

Context for AI Agents

Why this matters?

Traditional `terraform graph` outputs generic DOT files that are hard to query. GraphX transforms this directly into a labeled property graph where you can ask complex questions like:


MATCH (dependent)-[*]->(target {id: 'aws_vpc.main'}) RETURN dependent

Key Features

πŸš€

Zero Configuration

Built-in Docker integration means you don't need to manually set up a database. GraphX handles the Neo4j container lifecycle for you.

πŸ”„

Idempotent Updates

Run updates as many times as you want. The graph is intelligently updated via Cypher transactions, preventing duplicate nodes or edges.

πŸ€–

AI Ready (MCP)

Designed to feed context to AI agents via the Model Context Protocol. Give your LLMs "sight" over your infrastructure dependencies.

πŸ”’

Secure by Default

Auto-generates strong passwords and manages local permissioning. Database volumes are kept local to your project.

πŸ“Š

Plan Analysis

Don't just graph what you haveβ€”graph what you will have. Pass Terraform plan binary files to preview changes.

πŸ’Ž

Go Powered

Written in Go for cross-platform portability and high performance on heavy infrastructure graphs.

Connect with MCP

Use the Official Neo4j MCP Server

To let your AI assistants (like Claude, Cursor, or Ollama) query your infrastructure graph, we recommend using the Official Neo4j MCP Server.

It provides a standardized way for LLMs to execute Cypher queries against your GraphX database, enabling them to answer questions like "What depends on this VPC?" or "Are there circular dependencies?".

Read Neo4j MCP Docs

Configure the MCP server to connect to your GraphX instance at bolt://localhost:7687 using the credentials generated by terraform-graphx init.

Installation & Usage

1. Initial Setup

Initialize the project config. This creates a `.terraform-graphx.yaml` and a secure password.

terraform-graphx init

2. Start Database

Spin up the local Neo4j container. Data is persisted in `./neo4j-data`.

terraform-graphx start

3. Update Graph

This runs `terraform graph`, parses it, and pushes it to Neo4j.

terraform-graphx update

Or analyze a specific plan:

terraform-graphx update --plan=tfplan.binary

4. Verify & Explore

Check connectivity and open your browser to localhost:7474 to see your graph.

terraform-graphx check

Stop Container

Free up resources when you are done.

terraform-graphx stop
×