Prerequisites
- Rust version 1.88.0 or higher (required)
- Docker Desktop for local development (required)
- Git for first-time Helix source cache (required)
- Cloud CLIs: AWS CLI, Fly CLI for cloud deployment (optional)
Install Steps
-
Install Helix CLI
Note: Run
helix updateto upgrade;helix migrateto migrate existing projects from CLI v1 to CLI v2. -
Create project
Creates a new project in the current directory with
helix.tomlfile anddbdirectory containingschema.hxandqueries.hxfiles. Read thehelix.tomlfile for more information about the configuration. -
Define schema and queries
Define the schema and queries in the
schema.hxandqueries.hxfiles in thedbdirectory. There will be default schema and queries commented out at the top of the files for you. -
Build and deploy locally
Build and deploy the project to the local HelixDB instance.
Replace
<dev>with the actual name of the instance. Check the CLI commands for more information about the build and deploy process. Once Helix CLI is installed and your instance is initialized, continue to configurations to customize ports and instances or jump to HelixDB SDKs or cURL to test your first query. -
Test connection
- If you are using a local HelixDB instance, verify that it now runs inside Docker on port designated in the
helix.tomlfile (usually6969). - Calling a query in the
queries.hxfile should return the expected result. Replace<port>,<query_name>, and<parameter_name>with the actual port, query name, and parameter name. Remember to run create query first before running read, update, delete queries.
- If you are using a local HelixDB instance, verify that it now runs inside Docker on port designated in the
Best Practices
-
Development
- Run
helix checkbefore every deploy - Use descriptive instance names
- Keep dev/prod configs separate
- Clean unused resources with
helix prune - Version-control
helix.toml
- Run
-
Production
- Set
build_mode = "release" - Tune vector parameters to data scale
- Enable monitoring & logging
- Automate backups
- Test migrations in staging first
- Set
-
Security
- Never commit credentials
- Use env vars for secrets
- Rotate API keys regularly
- Keep CLI updated:
helix update - Use private instances for prod data