Skip to content

Repository files navigation


ZYX Logo

Embeddable Graph Database Engine

ACID-compliant graph database with Cypher queries, vector search, and graph algorithms — embeds anywhere from CLI to browser.

Build Status codecov License: Apache 2.0 C++ Docs


6EFC1EFB-DE5B-400E-88BC-DF08BC9C8B39.mov

Try It

$ zyx database create ./movies.zyx

ZYX Graph Database v0.1.0
Connected to: ./movies.zyx
Type help for commands, exit to quit.

Create nodes and relationships:

ZYX> CREATE (m:Movie {title: 'The Matrix', year: 1999}),
     ··· (a:Actor {name: 'Keanu Reeves'}),
     ··· (a)-[:ACTED_IN {role: 'Neo'}]->(m);
(0 rows, 1.23ms)

Query with pattern matching:

ZYX> MATCH (a:Actor)-[r:ACTED_IN]->(m:Movie)
     ··· RETURN a.name AS actor, m.title AS movie, r.role AS role;
┌────────────────┬────────────┬──────┐
│ actor          │ movie      │ role │
├────────────────┼────────────┼──────┤
│ Keanu Reeves   │ The Matrix │ Neo  │
└────────────────┴────────────┴──────┘
(1 row, 0.85ms)

Aggregation:

ZYX> MATCH (n) RETURN count(n) AS total_nodes;
┌─────────────┐
│ total_nodes │
├─────────────┤
│ 2           │
└─────────────┘
(1 row, 0.42ms)

Or try it in the browser — Live Playground (no install required, runs via WebAssembly).

Highlights

  • Cypher Query EngineMATCH, CREATE, MERGE, WITH, UNION, UNWIND, CALL, LOAD CSV
  • ACID Transactions — Write-ahead logging, crash recovery, snapshot isolation
  • Vector Search — HNSW index with cosine/euclidean/dot-product similarity
  • Graph Algorithms — PageRank, shortest path, community detection via built-in procedures
  • Schema & Indexes — Label indexes, property indexes, uniqueness constraints
  • Embeddable — C++ header-only API, Driver ABI, Python bindings (zyxdb), Node.js bindings, and WebAssembly
  • Cross-Platform — macOS, Linux, Windows

Quick Start

Install

macOS (Homebrew):

brew tap nexepic/zyx
brew install zyx

Linux / Windows: Download a pre-built binary from Releases.

Build from source (all platforms):

./scripts/run_tests.sh          # Full build + tests + coverage
./scripts/build_release.sh      # Release build only

Prerequisites: C++20 compiler (Clang 14+ / GCC 11+), CMake 3.21+, Ninja, Conan 2.x, Python 3.10+

Use

zyx database create ./mydb.zyx      # Create new database
zyx database open ./mydb.zyx        # Open existing database
zyx database exec ./mydb.zyx q.cql  # Execute a Cypher script
zyx import --database ./mydb.zyx \
  --nodes nodes.csv \
  --relationships rels.csv          # Bulk CSV/JSONL import

Embed

C++

#include <zyx/zyx.hpp>

zyx::Database db("./mydb.zyx");
db.open();
auto result = db.query("MATCH (n) RETURN n.name LIMIT 5");
db.close();

Python

import zyxdb

db = zyxdb.Database("./mydb.zyx")
db.open()
result = db.execute("MATCH (n) RETURN n.name LIMIT 5")
db.close()

Documentation

Full docs with architecture deep-dives, API reference, and algorithm guides:

nexepic.github.io/zyx

Feature support details: UNSUPPORTED_CYPHER_FEATURES.md

License

Apache License 2.0. See LICENSE.

About

High-performance, embeddable graph database engine with Cypher queries, ACID transactions, vector search, and WebAssembly support

Topics

Resources

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages