Now in Public Alpha

The Graph Database
Forged for Performance

A Rust-powered graph database with native Cypher support, ACID transactions, built-in algorithms, and a GraphQL API - engineered for speed, safety, and scale.

Anvil Logo
example.cyphercypher
// Find the shortest path between two people
MATCH path = shortestPath(
  (a:Person {name: "Alice"})-[:FRIEND*]-(b:Person {name: "Hank"})
)
RETURN path, length(path) AS hops
Core Capabilities

Everything you need to build with graphs

Anvil ships with a complete toolkit - from query execution, document and file storage, to row-level security and clustering - so you can focus on your data, not your infrastructure. See what makes Anvil unlike any other database →

Cypher Query Engine

Full Cypher with multi-hop BFS pattern matching, quantified paths, ALL SHORTEST, ORDER BY/LIMIT/SKIP/DISTINCT, comma-separated patterns, MERGE, and aggregation - all in safe Rust.

ACID Transactions

Multi-version concurrency control with snapshot isolation, automatic deadlock detection, write-ahead logging, and ARIES-style crash recovery.

Graph Algorithms

Built-in PageRank, Dijkstra, community detection, betweenness centrality, and more - executed natively on the storage engine for maximum throughput.

Plugin Ecosystem

Extend Anvil with Rust, Lua, Python, WASM, JavaScript, TypeScript, or Starlark plugins. Ship custom functions, procedures, and storage backends.

Clustering & Replication

Raft-based consensus for leader election, WAL streaming replication for read replicas, and hash-based sharding for horizontal scale-out.

GraphQL API

Auto-generated GraphQL schema from your graph model with Relay-spec connections, real-time subscriptions, and batched DataLoader queries.

Native Document Store

Built-in NoSQL with schema-namespaced collections, composite keys, TTL, secondary indexes, and bidirectional graph-document sync - no separate database needed.

File Storage

Built-in object storage with content-addressed blobs, signed URLs, on-the-fly image transforms, TUS resumable uploads, and pluggable backends (local, S3, R2, MinIO).

Row-Level Security

PostgreSQL-inspired RLS policies on nodes, relationships, and documents with sync pairs - plus column-level property masks like HIDE PROPERTY email ON :User FROM reader.

Authentication

Graph-native auth with JWT RS256 tokens, JWKS endpoint, Argon2id password hashing, refresh tokens, and per-request session middleware.

Apps & Multi-Tenancy

First-class apps: each tenant gets its own isolated schema, membership with reader/editor/admin privileges, scoped settings, custom auth emails, and one-click JSON backup & restore.

Functions & Triggers

Stored Cypher functions with typed parameters and CALL...YIELD. Event-driven triggers on INSERT/UPDATE/DELETE with BEFORE/AFTER timing and OLD/NEW variables.

Observability

Built-in event log, slow query detection, query analytics with p95/p99 latency, dependency analysis, and configurable alert rules.

Data Import

Import Neo4j-compatible Cypher scripts via CLI, REST API, or Hammer UI. Supports multi-CREATE, MERGE, and variable binding across statements.

Edge Functions

Run JavaScript/TypeScript on the server via HTTP endpoints. Deno or Node.js subprocess runtime with on-demand execution.

Developer Experience

Query with Cypher. Expose with GraphQL.

Write expressive Cypher queries to traverse your graph, then expose the same data through an auto-generated, Relay-compliant GraphQL API - complete with connections, pagination, and real-time subscriptions.
  • Full Cypher language support with cost-based optimization
  • Auto-generated GraphQL schema from your graph model
  • Relay-spec connections with cursor-based pagination
  • Real-time subscriptions over WebSockets
queries.cyphercypher
// Create a social graph
CREATE (alice:Person:Engineer {name: "Alice"})
CREATE (bob:Person:Designer {name: "Bob"})
CREATE (alice)-[:FRIEND {since: 2023}]->(bob)

// Query with pattern matching
MATCH (p:Person:Engineer)-[r:FRIEND]->(friend)
RETURN p.name, collect(friend.name) AS friends
schema.graphqlgraphql
# Auto-generated GraphQL API
query GetEngineers {
  person(first: 10) {
    id
    name
    outgoing_friend {
      edges {
        since
        node {
          name
        }
      }
    }
  }
}
Under the Hood

Built from the ground up in Rust

A layered architecture designed for performance, safety, and extensibility - from the storage engine to the client drivers.
Client Layer
Hammer UIRust DriverTypeScript DriverPython DriverGo Driver
API Layer
Cypher EndpointGraphQL APIREST AdminDocument API
Engine Layer
Query OptimizerGraph AlgorithmsPlugin RuntimeTransaction ManagerRLS EngineAuth Middleware
Storage Layer
Page ManagerWALB+ Tree IndexesCompressionTiered StorageDocument StoreObject BucketsImage PipelineSigned URLsTUS Resumable
Cluster Layer
Raft ConsensusWAL StreamingShard RouterGossip Protocol
FAQ

Frequently Asked Questions

What is Anvil DB?

Anvil DB is a Rust-powered graph database with a full Cypher query engine, ACID transactions, a native document store with bidirectional graph-document sync, row-level security, a GraphQL API, and built-in graph algorithms. It ships as a single self-hostable binary; Hammer, a desktop app for macOS and Windows, is how you run it.

How do I install Anvil DB?

Run curl -fsSL https://anvildb.com/install.sh | sh on macOS or Linux (PowerShell installer available for Windows), then start the server with anvil start. Pre-built binaries for every platform are on the GitHub releases page.

Is Anvil DB self-hostable?

Yes - self-hosting is the default. Anvil runs as a single binary on your own hardware or VPS, with your data staying entirely yours. TLS, authentication, backups, and clustering are built in.

What query languages does Anvil DB support?

Cypher is the primary query language, covering pattern matching, aggregation, paths, and DDL for indexes, triggers, policies, and apps. The same data is also queryable through an auto-generated GraphQL API and a document-oriented REST API.

Does Anvil DB support multi-tenancy?

Yes. First-class apps give each tenant an isolated schema, membership with reader/editor/admin privileges, scoped settings, custom auth emails, and one-click JSON backup and restore - all inside one server.

Get Started

Start Building

Install the CLI, spin up a database, and start querying in minutes.