Skip to main content
@tags: cli, commands, reference, v2, management

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
Subcommands:
  • 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 RAM
      • shared-cpu-2x - 2 shared vCPUs, 512MB RAM
      • shared-cpu-4x - 4 shared vCPUs, 1GB RAM
      • performance-4x - 4 dedicated vCPUs, 8GB RAM
      • performance-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
Note: 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 as helix 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:
  1. Validates configuration and queries
  2. Compiles queries
  3. Generates Docker configuration files
  4. Prepares the instance workspace
Usage: helix build [INSTANCE]
  • [INSTANCE] - The instance to build

Deployment & Instance Management

helix push

Deploy or update a running instance. What it does:
  1. Builds the instance if needed
  2. Creates/updates Docker container for local instances
  3. Pushes to cloud provider for remote instances
  4. Starts the instance
Usage: 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
Usage: 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
Usage: 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 flow
  • logout - Clears authentication tokens from ~/.helix/credentials
  • create-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 metrics
  • off - Disable all metrics collection
  • status - 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

Configurations

@tags: config, toml, settings, deployment, reference

TL;DR

  • Central config: Single helix.toml file 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

The helix.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

  1. Port conflicts: Ensure unique ports for each local instance
  2. Missing credentials: Run helix auth login for cloud features
  3. Invalid paths: Use relative paths from project root
  4. Memory limits: Adjust db_max_size_gb based on available RAM

Workflows

@tags: workflows, development, deployment, devops, patterns

TL;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

  1. Create a new project
    Note: helix init with no arguments defaults to making a local instance called dev.
  2. Define schema and queries Edit db/schema.hx and db/queries.hx.
  3. Validate Check the project configuration and query syntax.
  4. Build and deploy Build and deploy the project to the local HelixDB instance.

Development Iteration

When making changes during development:
  1. Edit your .hx files
  2. Validate changes: helix check
  3. Build and deploy: helix push dev
  4. Check status: helix status
  5. View logs: docker logs <docker_container_name>
  6. Stop when done: helix stop dev

Working with Multiple Instances

Create different instances for different purposes:
Environment separation in 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

  1. Add cloud instance
  2. Configure platform-specific settings in helix.toml: Helix Cloud:
    Fly.io:
    AWS ECR:
  3. Deploy
  4. Monitor

Platform-Specific Prerequisites

Helix Cloud:
  • Authenticate: helix auth login
  • Warning: Contact HelixDB team to create new clusters
Fly.io:
  • Install flyctl:
  • Authenticate: fly auth login
AWS ECR:
  • Configure AWS CLI: aws configure
  • Warning: Ensure AWS CLI has necessary ECR permissions

Environment Progression Pattern

Configuration example for all platforms:
Deployment workflow:

Platform-Specific Management

Helix Cloud:
  • Scaling: Contact support for cluster scaling
  • Security: Use private clusters, rotate API keys with helix auth create-key
Fly.io:
  • Check status: fly status -a <app_name>
  • View logs: fly logs -a <app_name>
  • Security: Use private apps, monitor resource usage
AWS ECR:
  • Repository management:
  • Security: Use IAM roles with least privilege, enable lifecycle policies

Migration from CLI V1 to CLI V2

@tags: migration, upgrade, v1, v2, legacy

TL;DR

  • One-command upgrade: helix migrate converts v1 projects automatically
  • Safe migration: Creates backups by default, dry-run option available
  • File reorganization: config.hx.jsonhelix.toml, queries → db/ directory
  • Zero downtime: Test locally before deploying migrated configurations
  • Backward compatible: Existing queries and schemas work unchanged
For users who are using the CLI V1, you can migrate your project to the CLI V2 by following the steps below.

Migration Steps

  1. Find and enter V1 project
    Note: The path should be to the directory containing the old config.hx.json file.
  2. Migrate project
    This will migrate your project to v2 format.

Migration Details

What gets migrated
  • config.hx.jsonhelix.toml
  • Query files → db/queries.hx
  • Schema files → db/schema.hx
  • Instance configurations → helix.toml sections
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

  1. Review helix.toml Check the generated configuration file for accuracy.
  2. Test locally
  3. Update deployment scripts Update any CI/CD scripts to use v2 commands.
  4. 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-errors

TL;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.toml file
  • Docker issues: Start Docker Desktop, add user to docker group, use different port
  • Authentication issues: Run helix auth login to authenticate
  • Build & deployment issues: Check if queries directory exists, check port binding
  • Migration issues: Run helix migrate --dry-run to 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:
  1. Ensure PATH is updated (Bash):
  1. Ensure PATH is updated (Zsh):
  1. Verify installation:

Permission denied during installation

Error: installation fails with permission errors.
Solution:
Use system-wide installation with sudo

Project Configuration Issues

Not in a Helix project directory

Error: Not in a Helix project directory. Run helix init to create one.
Solution:
  1. Check if you are in the correct project directory.
  2. Check if the helix.toml file exists.
  1. 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 quotes

Instance not found

Error: Instance ‘production’ not found in configuration
Solution:
  1. Check available instances with helix status.
  1. 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:
  1. For macOS/Windows, start Docker Desktop. For Linux, start Docker daemon (sudo systemctl start docker).
  1. 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 group

Port already in use

Error: bind: address already in use
Solution:
  1. Find process using the port
  1. Stop conflicting service or use different port

Container name conflict

Error: Container name “/helix_my-app_dev” is already in use
Solution:
  1. Check if container is running/in use
  1. Remove old container

Authentication Issues

Helix Cloud authentication failed

Error: Credentials file not found. Please run ‘helix auth login’ first.
Solution:
Run helix auth login to authenticate.

Expired credentials

Error: Authentication token expired
Solution:
Re-authenticate

Fly.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:
  1. Configure AWS CLI
  1. 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 exists

Push fails for cloud instance

Error: Failed to upload to cloud: network timeout
Solution:
  1. Check internet connection
  2. Verify authentication
  1. Check cloud service status

Instance won’t start after helix push dev succeeds

Error: Instance won’t start after helix push dev succeeds
Solution:
  1. Check container status
  1. View container logs
  1. Test connection
  1. 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 manually

Performance Issues

Slow build times

Solution:
  1. Use release mode for production only
  1. Reduce vector config for development
  1. Clean Docker cache

High memory usage

Solution:
  1. Limit database size
  1. Adjust Docker resources in Docker Desktop settings as needed.

Container crashes

Solution:
  1. Check logs
  1. Inspect exit code
  1. Increase memory limits

Network Issues

Cannot connect to instance

Solution:
  1. Check if container is running
  1. Test localhost connection
  1. Check firewall settings

Connection refused

Solution:
  1. Verify port configuration
  1. Check port forwarding
  1. Try different port

Common Error Messages

Error: “ENOENT: no such file or directory”
Solution:
Missing required files. Run helix 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 with helix 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:
  1. Set log level
  1. Run command with debug output
  1. View detailed Docker logs

Getting Help

  1. Documentation
  2. GitHub Issues
  3. Discord
  4. Email
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:
  1. Update CLI: helix update
  2. Validate configuration: helix check
  3. Restart Docker Desktop
  4. Clean up resources: helix prune
  5. Check disk space: df -h
  6. Verify network connectivity
  7. Review recent changes to .hx files
  8. Check file permissions
  9. Try with a fresh project: helix init
  10. Enable debug logging: HELIX_LOG_LEVEL=debug