Skip to main content
This guide walks through common workflows and best practices for developing with Helix CLI v2.

Local Development Workflow

Initial Setup

1

Create project

Note that helix init with no arguments defaults to making a local instance called dev.
2

Define schema

Edit db/schema.hx:
3

Create queries

Edit db/queries.hx:
4

Validate

5

Build and deploy

6

Test connection

Development Iteration

When making changes during development:

Working with Multiple Instances

Create different instances for different purposes:

Multi-Environment Setup

Development → Staging → Production

Cloud Deployment Workflows

Helix Cloud Deployment

1

Authenticate

2

Initialize cloud instance

3

Configure production settings

Edit helix.toml:
4

Deploy

5

Monitor

Fly.io Deployment

Prerequisites: Install and authenticate flyctl
Deploy to Fly.io:
1

Add Fly.io instance

2

Build and deploy

3

Check deployment

4

Scale if needed

AWS ECR Deployment

Prerequisites: Configure AWS CLI
Deploy to ECR:
1

Add ECR instance

2

Build image

3

Push to ECR

This will:
  • Create ECR repository if needed
  • Authenticate Docker with ECR
  • Tag and push the image
4

Deploy to ECS/EKS

Use the pushed image in your container orchestration:

Best Practices

  • Always run helix check before deploying
  • Use descriptive instance names
  • Keep development and production configurations separate
  • Regularly clean up unused resources with helix prune
  • Version control your helix.toml file
  • Use build_mode = "release" for production
  • Configure appropriate vector parameters for your data scale
  • Enable monitoring and logging
  • Set up automated backups
  • Test migrations in staging first
  • Never commit credentials to version control
  • Use environment variables for sensitive data
  • Regularly rotate API keys
  • Keep CLI updated with helix update
  • Use private instances for production data

Next Steps

Troubleshooting

Solutions to common issues

Configuration Guide

Advanced configuration options