Getting Started
Anvil is a graph database written in Rust combining a property graph, native document store, and row-level security into a single binary.
Installation
# Download and install curl -fsSL https://anvildb.com/install.sh | sh
Quick Start
# Start the server (daemonizes by default) anvil start # Or run in foreground for development anvil start --foreground # Check status anvil status # Stop the server anvil stop # Then open Hammer (the desktop app) and point it at http://localhost:7474 # Default login: admin / anvil
The server runs on port 7474 (HTTP API) and 7687 (Bolt protocol). Hammer is a desktop app for macOS and Windows, downloaded from anvildb.com; connect it to the server's HTTP address.
Import Sample Data
Import the built-in sample dataset (8 people, 3 companies, 3 projects, 5 skills - 19 nodes, 51 relationships) to get started quickly.
anvil import --sample
Your First Query
-- Find engineers and their friends
MATCH (p:Person:Engineer)-[r:FRIEND]->(friend)
RETURN p.name, collect(friend.name) AS friends
-- Skills per company
MATCH (p:Person)-[:WORKS_AT]->(c:Company),
(p)-[:HAS_SKILL]->(s:Skill)
RETURN c.name, collect(DISTINCT s.name) AS skills
-- Mentorship chain from Carol
MATCH path = (c:Person {name: 'Carol'})-[:MENTORS*]->(mentee)
RETURN c.name, collect(mentee.name) AS chainBrowse the Documentation
Every section below is its own page. The Cypher and File Storage chapters expand into sub-pages covering each topic in depth.
- Getting Started
- Configuration - anvil.toml configuration and hot-reloadable runtime settings.
- Cypher Query Language - The Cypher query language: syntax, clauses, and execution model. (17 pages: Overview, Reading Data, Writing Data, Filtering & WHERE, Aggregation, Path Patterns, Subqueries, Documents, Functions, Triggers, Row-Level Security, Sync, Indexes, Query Analysis, Built-in Functions, Generated Values, Operators)
- GraphQL API - Auto-generated GraphQL API with queries, mutations, and Cypher passthrough.
- Document Store - The native document store: collections, keys, TTL, and indexing.
- Graph-Document Sync - Bidirectional graph-document synchronization rules.
- Stored Functions - Stored functions written in Cypher.
- Triggers - BEFORE/AFTER triggers on labels and collections.
- Row-Level Security - Row-level security policies and column-level property masks.
- Authentication - Users, roles, JWT, passwordless OTP, OAuth social login, email verification, service accounts.
- Apps & Projects - Multi-tenant apps: isolated schemas, membership, settings, backup and restore.
- File Storage - S3-style file storage: buckets, signed URLs, transforms, resumable uploads. (12 pages: Overview, Quickstart, Buckets, Objects, Cypher Integration, Row-Level Security, Signed URLs, Image Transformations, Resumable Uploads (TUS), Backends, Triggers & Edge Functions, Tutorials)
- Data Import - Bulk import from CSV, JSON, and Cypher scripts.
- Edge Functions - Edge functions running beside the database.
- Observability - Slow-query log, event log, stats, and alerts.
- HTTP API Reference - The complete HTTP API reference.
- Hammer UI - Hammer, the desktop app for running Anvil.
- Client Drivers - Official client driver libraries.