# stategraph/stategraph

Terraform without the state file bottleneck

Repository: https://github.com/stategraph/stategraph
Canonical: https://ross.abutalabs.com/products/stategraph
Homepage: https://stategraph.com
Language: OCaml
License: MPL-2.0
License Family: copyleft
Topics: automation, cloud-management, devops, github-actions, infrastructure-as-code, infrastructure-automation, infrastructure-orchestration, ocaml, opentofu, tacos, terraform, terraform-github-actions, pulumi
Last push: 2026-09-02T19:14:32+00:00

## Health v2 (maintenance only)
Score: 86/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 100, release rhythm 88, longevity 49
- inputs: {"age_days": 699, "days_push": 0, "days_rel": 0, "gap_med": 0.0, "n_releases_24m": 577}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1279, forks 73 (observed 2026-09-03T02:15:18.120792+00:00)

## What it is
Stategraph is a platform that replaces Terraform/OpenTofu's file-based state with a Postgres-backed dependency graph, enabling resource-level locking, parallel plan/apply, and SQL queries over infrastructure. It also includes GitOps orchestration (formerly Terrateam) for PR-based plans, policy checks, and drift detection, available as SaaS or self-hosted.

## Use cases
- run terraform plan and apply in parallel without state lock contention
- query my terraform infrastructure with sql
- detect infrastructure drift early
- analyze blast radius of a terraform change
- gitops workflow for terraform pull requests
- estimate cloud costs from terraform state
- manage terraform state across multiple states in one plan

## When to choose
- your team hits frequent terraform state lock errors or splits state files to reduce contention
- plans are slow because they refresh the entire state for small changes
- you want SQL-queryable infrastructure inventory, audit history, and cost analysis
- you want PR-based Terraform/OpenTofu automation with policy and cost checks

## When to avoid
- you need a drop-in replacement for the full terraform CLI surface (init, fmt, console have no equivalents)
- your HCL uses patterns not yet covered by Stategraph's model - run stategraph diagnostics first
- you want a lightweight wrapper like Terragrunt/Terramate rather than a state storage replacement
- you cannot accept a hosted service or privately distributed self-hosted server image

## Facets
- artifact type: service
- maturity: active
- function: infrastructure-as-code, deployment, configuration-management, database, cli, ci-cd, monitoring, analytics
- domain: infrastructure-as-code, cloud-computing, self-hosted, databases
- platform: cli, cloud, self-hosted
- tags: terraform, opentofu, state-management, gitops, terrateam, ocaml, postgres, drift-detection, cost-estimation, infrastructure-database, devops, automation, docker, kubernetes, web-server

## Member repositories
- stategraph/stategraph (main) score 86

## Provenance
- Observed fields: from GitHub, fetched 2026-09-03T02:15:18.120792+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-30T05:03:39.986258+00:00, confidence not recorded.
  - readme: https://github.com/stategraph/stategraph (fetched 2026-09-03T02:15:18.120792+00:00, sha 63fc85369a4e)
  - homepage: https://stategraph.com (fetched 2026-08-29T12:15:28.434037+00:00, sha df2eba6899a3)
  - site_page: https://stategraph.com/docs (fetched 2026-08-29T12:15:28.443487+00:00, sha 179eee6f41d4)
  - site_page: https://stategraph.com/docs/cli/diagnostics (fetched 2026-08-29T12:15:28.447680+00:00, sha 479cd2a02795)
  - site_page: https://stategraph.com/docs/reference/terraform-compatibility (fetched 2026-08-29T12:15:28.449407+00:00, sha a8fa9bc7c503)
  - site_page: https://stategraph.com/about (fetched 2026-08-29T12:15:28.451235+00:00, sha 9e2c57b10c36)
  - site_page: https://stategraph.com/features (fetched 2026-08-29T12:15:28.453040+00:00, sha 254275a49ed3)
  - site_page: https://stategraph.com/pricing (fetched 2026-08-29T12:15:28.445468+00:00, sha 7b9004346d25)
  - site_page: https://stategraph.com/changelog (fetched 2026-08-29T12:15:28.454785+00:00, sha b286de575901)
  - site_page: https://stategraph.com/faq (fetched 2026-08-29T12:15:28.456286+00:00, sha b723872b5aa5)
- Data as of 2026-08-30T08:39:29.467469+00:00.
