HelixDB is a high-performance graph-vector database built in Rust, optimized for RAG and AI applications. It combines graph traversals, vector similarity search, and full-text search in a single database.
We welcome contributions from the community! This guide will help you get started with contributing to HelixDB.
- Check existing GitHub Issues to avoid duplicates
- Use a clear, descriptive title
- Include steps to reproduce for bugs
- Provide system information (OS, Rust version, HelixDB version)
- Add relevant logs or error messages
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/helix-db.git cd helix-db - Create a feature branch from
main:git checkout -b feature/your-feature-name
- Make your changes following our coding guidelines
- Commit your changes with clear, descriptive commit messages:
git commit -m "feat: add new feature description" - Push to your fork:
git push origin feature/your-feature-name
- Open a Pull Request against the
mainbranch - Respond to feedback from reviewers
- Link related issues in the PR description
- Ensure all tests pass
- Add tests for new features
- Update documentation if needed
- Keep PRs focused on a single feature or fix
- Write clear commit messages following conventional commits format
- Rust: 1.75.0 or later (install via rustup)
- Cargo: Comes with Rust
- Git: For version control
- cargo-watch: For development auto-reloading
- cargo-nextest: Faster test runner
- rust-analyzer: IDE support
-
Clone the repository:
git clone https://github.com/HelixDB/helix-db.git cd helix-db -
Build all components:
cargo build
-
Build in release mode (optimized):
cargo build --release
- CLI only:
cargo build -p helix-cli - Core database:
cargo build -p helix-db - Container:
cargo build -p helix-container
-
Install the CLI (development version):
cargo install --path helix-cli
-
Initialize a test project:
mkdir test-project && cd test-project helix init
-
Deploy locally:
helix push dev
The heart of HelixDB containing all database functionality.
-
helix_engine/- Database engine implementationbm25/- Full-text search using BM25 algorithmstorage_core/- LMDB-based storage backend via heed3traversal_core/- Graph traversal operations and query executionvector_core/- Vector storage and HNSW similarity searchtests/- Integration and unit teststypes.rs- Core type definitionsmacros.rs- Helper macros
-
helix_gateway/- Network layerbuiltin/- Built-in query handlers (node_by_id, all_nodes_and_edges, node_connections, nodes_by_label)embedding_providers/- Integration with embedding servicesrouter/- Request routing to handlersworker_pool/- Concurrent request processing (formerly thread_pool)mcp/- Model Context Protocol supportgateway.rs- Main gateway implementationintrospect_schema.rs- Schema introspection utilities
-
helixc/- Query compilerparser/- Parser for.hxfiles (using Pest grammar)analyzer/- Type checking, validation, and diagnosticsgenerator/- Rust code generation from parsed queries
-
grammar.pest- 295-line Pest grammar defining HQL syntax -
protocol/- Wire protocol and data types -
utils/- Shared utilities across the codebase
The server process that hosts compiled queries and handles requests.
Files:
main.rs- Initializes graph engine and HTTP gatewayqueries.rs- Generated code placeholder (populated during build)docker-compose.yml- Container orchestration configurationDockerfile- Development container image
Architecture:
- Loads compiled queries via inventory crate route discovery
- Creates HelixGraphEngine with LMDB storage backend
- Starts HelixGateway on configured port (default: 6969)
- Routes HTTP requests to registered handlers
Environment Variables:
HELIX_DATA_DIR- Database storage locationHELIX_PORT- Server port
User-facing CLI for managing HelixDB instances and deployments.
Directory Structure:
helix-cli/
├── src/
│ ├── commands/ # CLI command implementations
│ │ ├── integrations/ # Cloud deployment integrations
│ │ │ ├── docker_hub.rs
│ │ │ ├── ecr.rs # AWS ECR
│ │ │ ├── fly.rs # Fly.io
│ │ │ ├── ghcr.rs # GitHub Container Registry
│ │ │ └── helix.rs # Helix Cloud
│ │ ├── add.rs # Add dependencies
│ │ ├── auth.rs # Authentication (login/logout/create-key)
│ │ ├── build.rs # Build queries
│ │ ├── check.rs # Validate schema and queries
│ │ ├── compile.rs # Compile queries
│ │ ├── delete.rs # Delete instances
│ │ ├── init.rs # Initialize new projects
│ │ ├── metrics.rs # Metrics configuration
│ │ ├── migrate.rs # Database migrations
│ │ ├── prune.rs # Cleanup unused resources
│ │ ├── pull.rs # Pull from cloud deployments
│ │ ├── push.rs # Push to cloud deployments
│ │ ├── start.rs # Start instances
│ │ ├── status.rs # Instance status
│ │ ├── stop.rs # Stop instances
│ │ └── update.rs # Update CLI
│ ├── tests/ # CLI tests
│ ├── config.rs # Configuration management
│ ├── docker.rs # Docker integration
│ ├── errors.rs # Error handling
│ ├── lib.rs # Library interface
│ ├── main.rs # Entry point
│ ├── metrics_sender.rs # Metrics collection
│ ├── project.rs # Project management
│ ├── update.rs # Self-update functionality
│ └── utils.rs # Utilities
Available Commands:
helix add- Add dependencies to projecthelix auth- Authentication management (login/logout/create-key)helix build- Build queries without deployinghelix check- Validate schema and query syntaxhelix compile- Compile queries to Rust codehelix delete- Remove instance and datahelix init- Create new project with template fileshelix metrics- Configure metrics collection (full/basic/off/status)helix migrate- Run database migrationshelix prune- Clean up unused resourceshelix pull- Pull deployment from cloudhelix push- Push deployment to cloud (dev/staging/prod)helix start- Start stopped instanceshelix status- Show instance statushelix stop- Stop running instanceshelix update- Update CLI to latest version
Deployment Integrations:
- Helix Cloud (managed hosting)
- AWS ECR (Elastic Container Registry)
- Fly.io
- Docker Hub
- GitHub Container Registry (GHCR)
- Local deployment
Build & Deploy Flow:
- Read
.hxfiles (schema.hx, queries.hx) - Parse and analyze using helixc
- Generate Rust code with handler functions
- Write to container/src/queries.rs
- Build release binary with optimizations
- Push to target deployment (cloud or local)
Procedural macros for HelixDB including route registration and code generation utilities.
Test files for the Helix Query Language (HQL).
Performance benchmarking and metrics collection.
HelixDB uses a custom query language defined in .hx files:
QUERY addUser(name: String, age: I64) =>
user <- AddN<User({name: name, age: age})
RETURN user
- Nodes (N::) - Graph vertices with properties
- Edges (E::) - Relationships between nodes
- Vectors (V::) - High-dimensional embeddings
- Graph traversals:
In,Out,InE,OutE - Vector search: HNSW-based similarity search
- Text search: BM25 full-text search
- CRUD:
AddN,AddE,Update,Drop
- Definition: Write queries in
.hxfiles - Compilation:
helix checkparses and validates - Deployment:
helix deployloads into container - Execution: Gateway routes requests to compiled handlers
- Storage: LMDB handles persistence with ACID guarantees
- Prefer functional patterns (pattern matching, iterators, closures)
- Document code inline - no separate docs needed
- Minimize dependencies
- Use asserts liberally in production code
Run Clippy to check code quality:
./clippy_check.shThe clippy_check.sh script at the repository root runs clippy with project-specific rules:
- Treats warnings as errors
- Excludes
hql-testscrate - Can run in dashboard mode with additional features
HelixDB has a comprehensive test suite organized across multiple levels:
Unit Tests (within src/ directories)
/helix-db/src/helix_engine/tests/- Engine unit tests/helix-db/src/helix_gateway/tests/- Gateway unit tests- Inline
#[cfg(test)]modules throughout the codebase
Integration Tests
/helix-db/tests/- Database integration tests
CLI Tests
/helix-cli/src/tests/- Command-line interface testscheck_tests.rs- Validation testingcompile_tests.rs- Compilation testinginit_tests.rs- Project initializationproject_tests.rs- Project management
HQL End-to-End Tests
/hql-tests/tests/- 54+ test directories covering:- Graph operations (add_n, add_e, traversals)
- Vector search (search_v_with_embed)
- Text search (search_bm25)
- Aggregations and counting
- Migrations
- Cloud queries
- Rerankers
- Knowledge graphs
- Benchmarks
Benchmark Tests
/helix-db/benches/bm25_benches.rs- Full-text search performance/helix-db/benches/hnsw_benches.rs- Vector search performance
# Run all tests
cargo test --workspace
# Run specific crate tests
cargo test -p helix-db
cargo test -p helix-cli
# Run HQL tests
cd hql-tests
./test.sh
# Run benchmarks
cargo test --benches- Write tests for all new features
- Include both positive and negative test cases
- Add benchmarks before optimizing performance-critical code
- Ensure tests pass locally before opening PR
- DST (Deterministic Simulation Testing) coming soon
- Currently 1000x faster than Neo4j for graph operations
- On par with Qdrant for vector search
- LMDB provides memory-mapped performance
- Discord: Join our Discord community for real-time discussions, questions, and support
- GitHub Issues: Report bugs or request features at github.com/HelixDB/helix-db/issues
- Documentation: Check docs.helix-db.com for comprehensive guides
- Twitter/X: Follow @helixdb for updates and announcements
- Search existing GitHub issues and Discord for similar questions
- Check the documentation for relevant guides
- Try to create a minimal reproducible example
- Include error messages, logs, and system information
- Be respectful and constructive
- Help others when you can
- Share your use cases and learnings
- Follow our Code of Conduct
- Correctness: Does the code work as intended?
- Tests: Are there adequate tests? Do they pass?
- Code style: Does it follow Rust and HelixDB conventions?
- Performance: Are there obvious performance issues?
- Documentation: Are complex parts explained?
- Scope: Is the PR focused on a single feature/fix?
- Failing tests or CI checks
- No tests for new functionality
- Breaks existing functionality
- Code style violations
- Too broad in scope (mixing multiple unrelated changes)
- Missing documentation for complex features
- Performance regressions without justification
- Address all reviewer comments
- Ask for clarification if feedback is unclear
- Make requested changes in new commits (don't force push during review)
- Mark conversations as resolved after addressing them
- Be patient and respectful - reviewers are volunteers
- Initial response: Usually within 2-3 days
- Follow-up reviews: 1-2 days after updates
- Complex PRs may take longer
- Feel free to ping on Discord if your PR hasn't been reviewed after a week
- Install CLI:
curl -sSL "https://install.helix-db.com" | bash - Install Helix:
helix install - Initialize project:
helix init --path <path> - Write queries in
.hxfiles - Deploy:
helix deploy
AGPL (Affero General Public License)
For commercial support: founders@helix-db.com