Documentation Index
Fetch the complete documentation index at: https://docs.helix-db.com/llms.txt
Use this file to discover all available pages before exploring further.
For the complete documentation index optimized for AI agents, see llms.txt.
This guide walks through common workflows and best practices for developing with Helix CLI v2 locally.
Initial Setup
Create project
mkdir my-app && cd my-app
helix init
Note that helix init with no arguments defaults to making a local instance called dev.Define schema
Edit db/schema.hx:N::User {
name: String,
INDEX email: String,
created_at: Date DEFAULT NOW
}
N::Post {
title: String,
content: String,
published: Boolean DEFAULT true,
created_at: Date DEFAULT NOW
}
Create queries
Edit db/queries.hx:QUERY createUser(name: String, email: String) =>
user <- AddN<User>({
name: name,
email: email,
})
RETURN user
QUERY getUserByEmail(email: String) =>
user <- N<User>({email: email})
RETURN user
Development Iteration
When making changes during development:
# Edit your .hx files
vim db/queries.hx
# Validate changes
helix check
# Deploy changes (rebuilds automatically if needed)
helix push dev
# Check status
helix status
# View logs
docker logs helix_my-app_dev
# Stop when done
helix stop dev
Working with Multiple Instances
Create different instances for different purposes:
# Add a testing instance
helix add local --name testing
# Configure different port in helix.toml
# [local.testing]
# port = 7070
# Run both instances
helix push dev
helix push testing
# Status shows all instances
helix status