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.

// Find the shortest path between two people
MATCH path = shortestPath(
(a:Person {name: "Alice"})-[:FRIEND*]-(b:Person {name: "Hank"})
)
RETURN path, length(path) AS hopsEverything you need to build with graphs
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.
Query with Cypher. Expose with GraphQL.
- 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
// 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# Auto-generated GraphQL API
query GetEngineers {
person(first: 10) {
id
name
outgoing_friend {
edges {
since
node {
name
}
}
}
}
}Built from the ground up in Rust
217 source files across 14 modular workspace crates
View all3,345 Rust unit tests + 207 Cypher integration tests
View allLua (21), Native Rust (20), JavaScript (8), Python (8), Starlark (8), WASM (7)
View allBuilt-in library of graph utility functions and procedures
View allNative drivers for Rust, TypeScript, Python, and Go
Deep dives: ACID, WAL, ARIES, B+ Tree, LRU Cache, MVCC, Volcano, Compression
View allFrequently 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.
Start Building
Install the CLI, spin up a database, and start querying in minutes.