TL;DR
- Complete CLI: All commands for managing HelixDB instances and projects
- Multi-platform: Local Docker, Fly.io, AWS ECR, and Helix Cloud support
- Project lifecycle: init â check â build â push â monitor â stop
- Instance types: Local development, cloud staging, production deployments
- Migration support: Built-in v1 to v2 project migration tools
Commands
Global Options
--help, -h- Show help information for the command--version, -V- Display the CLI version
Project Management
helix init
Initialize a new Helix project with configuration and structure.
Usage: helix init [OPTIONS] [SUBCOMMAND]
Options:
--path, -p [PATH]- The path to the project--template [TEMPLATE]- The template to use for the project--queries-path, -q [PATH]- The path to the query files
helix init cloud [OPTIONS]- Initialize cloud instance--region [REGION]- The region the instance is deployed to--name [NAME]- The name of the instance
helix init ecr [OPTIONS]- Initialize AWS ECR instance--name [NAME]- The name of the AWS ECR repository (creates if needed)
helix init fly [OPTIONS]- Initialize Fly.io instance--name [NAME]- The name of the Fly.io app--volume-size- The volume size in GB--vm-size [SIZE]- VM size options:shared-cpu-1x- 1 shared vCPU, 256MB RAMshared-cpu-2x- 2 shared vCPUs, 512MB RAMshared-cpu-4x- 4 shared vCPUs, 1GB RAMperformance-4x- 4 dedicated vCPUs, 8GB RAMperformance-8x- 8 dedicated vCPUs, 16GB RAM
--public- Make instance public
helix init local [OPTIONS]- Initialize local instance--name [NAME]- The name of the local instance
helix init with no arguments defaults to making a local instance called dev.
helix add
Add a new instance to an existing Helix project.
Usage: helix add [SUBCOMMAND]
Subcommands:
helix add cloud [OPTIONS]- Add cloud instance--region [REGION]- The region the instance is deployed to--name [NAME]- The name of the instance
helix add ecr [OPTIONS]- Add AWS ECR instance--name [NAME]- The name of the AWS ECR repository (creates if needed)
helix add fly [OPTIONS]- Add Fly.io instance--name [NAME]- The name of the Fly.io app--volume-size- The volume size in GB--vm-size [SIZE]- VM size options (same ashelix init fly)--public- Make instance public
helix add local [OPTIONS]- Add local instance--name [NAME]- The name of the local instance
helix migrate
Migrate a v1 Helix project to v2 format.
Usage: helix migrate [OPTIONS]
Options:
--path, -p [PATH]- The path to the project to migrate (default: current directory)--queries-dir, -q [DIR]- The directory to move .hx files to (default: â./db/â)--instance-name, -i [NAME]- The name for the default local instance (default: âdevâ)--port [PORT]- The port for the local instance (default: 6969)--dry-run- Show what would be migrated without making changes--no-backup- Skip creating backup of v1 files
Validation & Compilation
helix check
Validate project configuration and query syntax.
Usage: helix check [INSTANCE]
[INSTANCE]- Name of the instance to check (defaults to all instances)
helix compile
Compile project queries into executable format.
Usage: helix compile [OPTIONS]
Options:
--path, -p [PATH]- The path to the project--output, -o [PATH]- The output path for compiled queries
helix build
Build and prepare an instance for deployment.
What it does:
- Validates configuration and queries
- Compiles queries
- Generates Docker configuration files
- Prepares the instance workspace
helix build [INSTANCE]
[INSTANCE]- The instance to build
Deployment & Instance Management
helix push
Deploy or update a running instance.
What it does:
- Builds the instance if needed
- Creates/updates Docker container for local instances
- Pushes to cloud provider for remote instances
- Starts the instance
helix push [INSTANCE]
[INSTANCE]- The instance to deploy
helix pull
** COMING SOON **
helix start
Start a stopped instance without rebuilding.
Usage: helix start [INSTANCE]
[INSTANCE]- The instance to start
helix stop
Stop a running instance.
Usage: helix stop [INSTANCE]
[INSTANCE]- The instance to stop
helix status
Show the status of all instances in the project.
Cleanup & Maintenance
helix prune
Remove unused containers, images, and workspace files.
What it removes:
- Stopped containers
- Unused Docker images
- Workspace files
- Note: Preserves data volumes
helix prune [OPTIONS] [INSTANCE]
[INSTANCE]- The instance to prune--all, -a- Prune all instances in the project
helix delete
Permanently delete an instance and all its data.
What it removes:
- Container and images
- All data volumes
- Workspace files
- Configuration entries
helix delete [INSTANCE]
[INSTANCE]- The instance to delete
Authentication & Cloud
helix auth
Manage authentication for Helix Cloud.
Usage: helix auth [SUBCOMMAND]
Subcommands:
login- Initiates browser-based authentication flowlogout- Clears authentication tokens from~/.helix/credentialscreate-key- Generates a new API key for programmatic access
Configuration & Settings
helix metrics
Configure telemetry and usage metrics collection.
Usage: helix metrics [SUBCOMMAND]
Subcommands:
full- Enable full metrics collection (requires email)basic- Enable minimal anonymous metricsoff- Disable all metrics collectionstatus- Show current metrics configuration
helix update
Update the Helix CLI to the latest version.
Usage: helix update [OPTIONS]
Options:
--force- Force update even if already on latest version
Support
- GitHub Issues: https://github.com/HelixDB/helix-db/issues
- Discord: https://discord.gg/2stgMPr5BD
- Email: [email protected]
Configurations
@tags: config, toml, settings, deployment, referenceTL;DR
- Central config: Single
helix.tomlfile manages all project settings - Multi-environment: Local dev, staging, production configurations in one file
- Flexible deployment: Support for Docker, Fly.io, AWS ECR, and Helix Cloud
- Vector tuning: Configurable HNSW parameters for different data scales
- Build modes: Debug, release, and dev modes for different use cases
Configuration File Structure
Thehelix.toml file is the central configuration for your Helix project, defining project metadata, instance configurations, and deployment settings.
Basic Structure
Project Configuration
The[project] section defines global project settings:
Local Instance Configuration
Local instances use Docker for containerized development environments.Basic Local Configuration
Advanced Local Settings
Multiple Local Instances
You can define multiple local instances for different purposes:Cloud Instance Configuration
Helix Cloud
AWS ECR Configuration
Fly.io Configuration
Build Modes
Build modes control optimization and debugging capabilities:Mode Characteristics
Common Issues
- Port conflicts: Ensure unique ports for each local instance
- Missing credentials: Run
helix auth loginfor cloud features - Invalid paths: Use relative paths from project root
- Memory limits: Adjust
db_max_size_gbbased on available RAM
Workflows
@tags: workflows, development, deployment, devops, patternsTL;DR
- Local-first: Start with local Docker development, scale to cloud
- Environment progression: dev â staging â production with isolated configs
- CI/CD ready: Scriptable commands for automated deployments
- Multi-instance: Run multiple environments simultaneously on different ports
- Cloud options: Deploy to Fly.io, AWS ECR, or Helix Cloud with same commands
Local Development
Initial Setup
-
Create a new project
Note:
helix initwith no arguments defaults to making a local instance calleddev. -
Define schema and queries
Edit
db/schema.hxanddb/queries.hx. -
Validate
Check the project configuration and query syntax.
-
Build and deploy
Build and deploy the project to the local HelixDB instance.
Development Iteration
When making changes during development:- Edit your .hx files
- Validate changes:
helix check - Build and deploy:
helix push dev - Check status:
helix status - View logs:
docker logs <docker_container_name> - Stop when done:
helix stop dev
Working with Multiple Instances
Create different instances for different purposes:helix.toml:
Cloud Deployment
Cloud deployment supports three platforms with the same workflow pattern:- Helix Cloud: Managed service (contact team for cluster)
- Fly.io: Container platform
- AWS ECR: Container registry for ECS/EKS
Universal Setup Pattern
-
Add cloud instance
-
Configure platform-specific settings in
helix.toml: Helix Cloud:Fly.io:AWS ECR: -
Deploy
-
Monitor
Platform-Specific Prerequisites
Helix Cloud:- Authenticate:
helix auth login - Warning: Contact HelixDB team to create new clusters
- Install
flyctl: - Authenticate:
fly auth login
- Configure AWS CLI:
aws configure - Warning: Ensure AWS CLI has necessary ECR permissions
Environment Progression Pattern
Configuration example for all platforms:Platform-Specific Management
Helix Cloud:- Scaling: Contact support for cluster scaling
- Security: Use private clusters, rotate API keys with
helix auth create-key
- Check status:
fly status -a <app_name> - View logs:
fly logs -a <app_name> - Security: Use private apps, monitor resource usage
- Repository management:
- Security: Use IAM roles with least privilege, enable lifecycle policies
Migration from CLI V1 to CLI V2
@tags: migration, upgrade, v1, v2, legacyTL;DR
- One-command upgrade:
helix migrateconverts v1 projects automatically - Safe migration: Creates backups by default, dry-run option available
- File reorganization:
config.hx.jsonâhelix.toml, queries âdb/directory - Zero downtime: Test locally before deploying migrated configurations
- Backward compatible: Existing queries and schemas work unchanged
Migration Steps
-
Find and enter V1 project
Note: The path should be to the directory containing the old
config.hx.jsonfile. -
Migrate project
This will migrate your project to v2 format.
Migration Details
What gets migrated
config.hx.jsonâhelix.toml- Query files â
db/queries.hx - Schema files â
db/schema.hx - Instance configurations â
helix.tomlsections
Backup creation
By default,helix migrate creates backups of your v1 files. Use --no-backup to skip this.
Dry run option
Use--dry-run to see what would be migrated without making changes:
Post-migration checklist
- Review helix.toml Check the generated configuration file for accuracy.
-
Test locally
- Update deployment scripts Update any CI/CD scripts to use v2 commands.
- Update documentation Update any internal documentation to reference v2 commands and configuration.
Troubleshooting
@tags: troubleshooting, errors, fixes, debug, logs, docker, auth, network, migration, performance, common-errorsTL;DR
- Installation issues: Ensure PATH is updated, use sudo if needed
- Configuration issues: Check if you are in the correct project directory, check the
helix.tomlfile - Docker issues: Start Docker Desktop, add user to docker group, use different port
- Authentication issues: Run
helix auth loginto authenticate - Build & deployment issues: Check if queries directory exists, check port binding
- Migration issues: Run
helix migrate --dry-runto see what would be migrated without making changes - Performance issues: Use release mode for production only, reduce vector config for development, clean Docker cache
- Network issues: Check if container is running, test localhost connection, check firewall settings
Installation Issues
After installation, helix command is not recognized.
Error: command not found: helix
Solution:
- Ensure PATH is updated (Bash):
- Ensure PATH is updated (Zsh):
- Verify installation:
Permission denied during installation
Error: installation fails with permission errors.
Solution:
Use system-wide installation with sudoProject Configuration Issues
Not in a Helix project directory
Error: Not in a Helix project directory. Run helix init to create one.
Solution:
- Check if you are in the correct project directory.
-
Check if the
helix.tomlfile exists.
- If not found, create a new project with
helix init.
Invalid configuration in helix.toml
Error: Failed to parse helix.toml: invalid type: string â6969â, expected u16
Solution:
Ensure port numbers are integers without quotesInstance not found
Error: Instance âproductionâ not found in configuration
Solution:
- Check available instances with
helix status.
- If not found, add the missing instance with
helix add <instance_type> --name <instance_name>.
Docker Issues
Docker daemon not running
Error: Cannot connect to Docker daemon. Is the Docker daemon running?
Solution:
- For macOS/Windows, start Docker Desktop. For Linux, start Docker daemon (sudo systemctl start docker).
- Verify Docker is running
Permission denied for Docker socket
Error: permission denied while trying to connect to the Docker daemon socket
Solution:
Add user to docker groupPort already in use
Error: bind: address already in use
Solution:
- Find process using the port
- Stop conflicting service or use different port
Container name conflict
Error: Container name â/helix_my-app_devâ is already in use
Solution:
- Check if container is running/in use
- Remove old container
Authentication Issues
Helix Cloud authentication failed
Error: Credentials file not found. Please run âhelix auth loginâ first.
Solution:
Runhelix auth login to authenticate.
Expired credentials
Error: Authentication token expired
Solution:
Re-authenticateFly.io authentication issues
Error: Error authenticating with Fly.io
Solution:
Run CLI auth to authenticate.AWS ECR authentication failed
Error: no basic auth credentials
Solution:
- Configure AWS CLI
- Login to ECR
Build & Deployment Issues
Build fails with missing files
Error: Failed to copy queries: No such file or directory
Solution:
Ensure queries directory existsPush fails for cloud instance
Error: Failed to upload to cloud: network timeout
Solution:
- Check internet connection
- Verify authentication
- Check cloud service status
Instance wonât start after helix push dev succeeds
Error: Instance wonât start after helix push dev succeeds
Solution:
- Check container status
- View container logs
- Test connection
- Check port binding
Migration Issues
v1 project detected
Error: Found v1 project configuration. Run âhelix migrateâ to upgrade to v2.
Solution:
Migrate project to v2 format.Migration backup failed
Error: Failed to create backup directory
Solution:
Create backup directory manuallyPerformance Issues
Slow build times
Solution:
- Use release mode for production only
- Reduce vector config for development
- Clean Docker cache
High memory usage
Solution:
- Limit database size
- Adjust Docker resources in Docker Desktop settings as needed.
Container crashes
Solution:
- Check logs
- Inspect exit code
- Increase memory limits
Network Issues
Cannot connect to instance
Solution:
- Check if container is running
- Test localhost connection
- Check firewall settings
Connection refused
Solution:
- Verify port configuration
- Check port forwarding
- Try different port
Common Error Messages
Error: âENOENT: no such file or directoryâ
Solution:
Missing required files. Runhelix init to create project structure.
âEADDRINUSE: address already in useâ
Error: âEADDRINUSE: address already in useâ
Solution:
Port conflict. Use a different port or stop the conflicting service.âEPERM: operation not permittedâ
Error: âEPERM: operation not permittedâ
Solution:
Permission issue. Check file permissions or run with appropriate privileges.âECONNREFUSED: Connection refusedâ
Error: âECONNREFUSED: Connection refusedâ
Solution:
Service not running. Start the instance withhelix push <instance>.
âETIMEDOUT: operation timed outâ
Error: âETIMEDOUT: operation timed outâ
Solution:
Network or performance issue. Check network connection and increase timeouts.Debug Mode
Enable debug logging for detailed troubleshooting:- Set log level
- Run command with debug output
- View detailed Docker logs
Getting Help
When reporting issues, include:- Helix CLI version (
helix --version) - Operating system and version
- Docker version (
docker --version) - Error messages and logs
- Steps to reproduce
helix.toml(redact secrets)
Quick Fixes Checklist
Before reporting an issue, try these steps:- Update CLI:
helix update - Validate configuration:
helix check - Restart Docker Desktop
- Clean up resources:
helix prune - Check disk space:
df -h - Verify network connectivity
- Review recent changes to
.hxfiles - Check file permissions
- Try with a fresh project:
helix init - Enable debug logging:
HELIX_LOG_LEVEL=debug