Installation¶
Grafeo supports Python, Node.js/TypeScript, Go, C#, Dart, Rust and WebAssembly. Choose the installation method for the preferred language.
Python¶
Using uv (Recommended)¶
uv is a fast Python package installer:
Using pip (alternative)¶
Verify Installation¶
import grafeo
# Print version
print(grafeo.__version__)
# Create an in-memory test database
db = grafeo.GrafeoDB()
print("Grafeo installed successfully!")
# Or create a persistent database on disk
db = grafeo.GrafeoDB("/path/to/my_graph.db")
Platform Support¶
| Platform | Architecture | Support |
|---|---|---|
| Linux | x86_64 | Full |
| Linux | aarch64 | Full |
| macOS | x86_64 | Full |
| macOS | arm64 (M1/M2) | Full |
| Windows | x86_64 | Full |
Node.js / TypeScript¶
Verify Installation¶
const { GrafeoDB } = require('@grafeo-db/js');
const db = await GrafeoDB.create();
console.log('Grafeo installed successfully!');
await db.close();
Go¶
Verify Installation¶
package main
import (
"fmt"
grafeo "github.com/GrafeoDB/grafeo/crates/bindings/go"
)
func main() {
db, _ := grafeo.OpenInMemory()
defer db.Close()
fmt.Println("Grafeo installed successfully!")
}
WebAssembly¶
Verify Installation¶
import init, { Database } from '@grafeo-db/wasm';
await init();
const db = new Database();
console.log('Grafeo WASM installed successfully!');
C# / .NET¶
Verify Installation¶
Dart¶
Add to pubspec.yaml:
Verify Installation¶
import 'package:grafeo/grafeo.dart';
void main() {
final db = GrafeoDB.memory();
print('Grafeo installed successfully!');
db.close();
}
Rust¶
Using Cargo¶
Add Grafeo to the project:
Or add it manually to Cargo.toml:
Feature Flags¶
Grafeo uses persona-based feature profiles that describe use cases rather than deployment targets. Compose them freely to match your needs:
[dependencies]
# Default (lpg profile): GQL + AI + algorithms + parallel
grafeo = "0.5"
# Add RDF/SPARQL support
grafeo = { version = "0.5", features = ["rdf"] }
# Graph analytics
grafeo = { version = "0.5", features = ["analytics"] }
# Full feature set
grafeo = { version = "0.5", default-features = false, features = ["enterprise"] }
# Minimal: GQL only
grafeo = { version = "0.5", default-features = false, features = ["gql"] }
# With ONNX embedding generation (opt-in, ~17MB)
grafeo = { version = "0.5", features = ["embed"] }
Persona Profiles¶
| Profile | Contents | Use case |
|---|---|---|
lpg | GQL, AI, algorithms, parallel | Default for libraries and apps |
rdf | SPARQL, triple-store, ring-index | Knowledge graphs, linked data |
analytics | Algorithms, parallel | Graph analytics pipelines |
ai | Vector, text, hybrid search, CDC | RAG, semantic search |
edge | GQL, compact, regex-lite | WASM, resource-constrained |
enterprise | All features | Full-featured deployments |
Deprecated profiles
The old deployment-target profiles (embedded, browser, server, full) still work as aliases but are deprecated and scheduled for removal in 0.7.0. Migrate to persona profiles when convenient.
Convenience Groups¶
| Group | Contents | Description |
|---|---|---|
languages | gql, cypher, sparql, gremlin, graphql, sql-pgq | All query language parsers |
ai | vector-index, text-index, hybrid-search, cdc | AI/RAG search + change tracking |
storage | wal, spill, mmap, grafeo-file | Persistence backends |
algos | graph algorithms | SSSP, PageRank, centrality, community detection |
embed | ort, tokenizers | ONNX embedding generation (opt-in, ~17MB) |
Individual Language Flags¶
| Feature | Description |
|---|---|
gql | GQL (ISO/IEC 39075): default query language |
cypher | Cypher (openCypher 9.0) |
sparql | SPARQL (W3C 1.1) + RDF support |
gremlin | Gremlin (Apache TinkerPop) |
graphql | GraphQL |
sql-pgq | SQL/PGQ (SQL:2023 GRAPH_TABLE) |
Individual AI Flags¶
| Feature | Description |
|---|---|
vector-index | HNSW approximate nearest neighbor index |
text-index | BM25 inverted index for full-text search |
hybrid-search | Combined text + vector search with score fusion |
cdc | Change data capture (before/after property snapshots) |
Verify Installation¶
use grafeo::GrafeoDB;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let db = GrafeoDB::new_in_memory();
println!("Grafeo installed successfully!");
Ok(())
}
Grafeo Server (Docker)¶
For a standalone database server accessible via REST API, use grafeo-server:
Three image variants are available:
| Variant | Tag | Description |
|---|---|---|
| lite | grafeo-server:lite | GQL only, no UI, smallest footprint |
| standard | grafeo-server:latest | All languages + AI/search + web UI |
| full | grafeo-server:full | Everything + auth + TLS + ONNX embed |
# Lite: minimal, GQL only
docker run -p 7474:7474 grafeo/grafeo-server:lite
# Full: production with auth and TLS
docker run -p 7474:7474 grafeo/grafeo-server:full \
--auth-token my-secret --data-dir /data
Server at http://localhost:7474. Web UI (standard/full) at http://localhost:7474/studio/.
See the grafeo-server documentation for full API reference and configuration.
Building from Source¶
Clone the Repository¶
Build Rust Crates¶
Build Python Package¶
Build Node.js Package¶
Build WASM Package¶
Next Steps¶
With Grafeo installed, continue to the Quick Start guide.