Download the CLI for your operating system:
If you purchased a Pro or Enterprise license:
# Place the license file in your project root
mv ~/Downloads/.aphelion-license ./
# Or in your home directory
mkdir -p ~/.aphelion
mv ~/Downloads/.aphelion-license ~/.aphelion/
# Verify installation
aphelion license verify
# Clone an existing database structure
aphelion clone postgres://user:pass@localhost:5432/prod_db \
--output ./test_db.json \
--rows 1000
# Generate synthetic data
aphelion generate ./test_db.json \
--target postgres://user:pass@localhost:5432/test_db
PostgreSQL domains are now fully supported! Aphelion automatically detects domain types, extracts constraints, and ensures all generated values are valid:
CREATE DOMAIN year AS integer CHECK (VALUE >= 1901 AND VALUE <= 2155);
CREATE TABLE films (release_year year);
✅ All generated release_year values will be between 1901 and 2155!
The biggest pain point is now solved! Tables are automatically ordered by foreign key dependencies using topological sort:
❌ Before v1.7.0:
$ psql -d db -f customer.sql
ERROR: violates foreign key constraint
✅ v1.7.0:
$ cd output && ./load.sh my_database
✅ All tables loaded successfully!
Every generate command now creates load.sh
(Unix/Linux/macOS) and load.bat (Windows) scripts that load all SQL files in the
correct dependency order:
$ aphelion generate schema.json --output output
✔ Generated 22 tables
✔ Wrote 22 SQL files to output
✔ Generated load scripts (load.sh, load.bat) ← NEW!
$ cd output && ./load.sh my_database
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Aphelion Data Loader
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Database: my_database
Tables: 22
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[01/22] Loading country...
[02/22] Loading city...
...
✅ All tables loaded successfully!
Features: Transaction support, error handling, progress messages, cross-platform (Unix + Windows)
📖 Full Release Notes: See v1.7.0 announcement for complete details and migration guide.
# Step 1: Clone production schema (read-only, safe)
aphelion clone postgres://readonly:pass@prod.example.com:5432/myapp \
--output myapp-schema.json \
--rows 10000 \
--exclude audit_logs,sessions
# Step 2: Generate test data
aphelion generate myapp-schema.json \
--target postgres://testuser:testpass@localhost:5432/myapp_test \
--truncate
Keep sensitive credentials out of command history:
# Set environment variables
export DB_USER="myuser"
export DB_PASS="mypassword"
export DB_HOST="localhost"
export DB_NAME="mydb"
# Use them in connection strings
aphelion clone "postgres://${DB_USER}:${DB_PASS}@${DB_HOST}:5432/${DB_NAME}" \
--output schema.json
aphelion generate schema.json \
--target "postgres://${DB_USER}:${DB_PASS}@${DB_HOST}:5432/test_${DB_NAME}"
⚠️ Handling Special Characters in Passwords
If your password contains special characters like $,
@, #, &, etc., you must URL-encode them or use quotes
properly:
# Method 1: URL-encode special characters
# $ becomes %24, @ becomes %40, # becomes %23
export DB_PASS="my%24pass%40word" # For password: my$pass@word
# Method 2: Use single quotes to prevent shell expansion
export DB_PASS='my$pass@word' # Single quotes preserve literal values
# Method 3: Escape special characters
export DB_PASS="my\$pass@word" # Backslash escapes the $
# Then use in connection string (always use double quotes)
aphelion clone "postgres://user:${DB_PASS}@localhost:5432/db" \
--output schema.json
Common URL encodings: @ →
%40, : → %3A, / → %2F,
? → %3F, # → %23, $ →
%24
Generate identical data every time for consistent testing:
# Generate with seed 42
aphelion generate schema.json \
--target postgres://user:pass@localhost:5432/test_db \
--seed 42
# Running again with same seed produces identical data
aphelion generate schema.json \
--target postgres://user:pass@localhost:5432/test_db2 \
--seed 42
Automated test data refresh in your pipeline:
#!/bin/bash
# .github/workflows/test-data.sh
# Use pipeline ID as seed for reproducibility
aphelion generate schema.json \
--target $TEST_DB_URL \
--seed $CI_PIPELINE_ID \
--auto-approve \
--truncate
# Run your tests
npm test
Three ways to control how much data is generated:
1. During Clone (Set Defaults)
aphelion clone postgres://... \
--output schema.json \
--rows 5000 # Each table gets 5,000 rows by default
2. During Generate (Override)
aphelion generate schema.json \
--target postgres://... \
--rows 50000 # Override to 50,000 rows per table
3. Edit Schema JSON (Per-Table Control)
{
"tables": {
"users": {
"rowCount": 10000, // 10k users
...
},
"orders": {
"rowCount": 100000, // 100k orders
...
}
}
}
Aphelion includes pre-built, production-ready schemas for various industries. Use these as starting points or for testing:
Complete EHR system with patients, encounters, medications, lab results, and clinical notes
aphelion generate examples/healthcare/schema.json \
--target postgres://user:pass@localhost:5432/healthcare_test \
--rows 5000
Tables: patients, encounters, medications, lab_results, diagnoses, procedures, clinical_notes
Trading platform with securities, portfolios, trades, and market data
aphelion generate examples/investment-banking/schema.json \
--target postgres://user:pass@localhost:5432/trading_test \
--rows 10000
Tables: securities, portfolios, trades, positions, market_data, clients
Banking system with accounts, transactions, loans, and customers
aphelion generate examples/retail-banking/schema.json \
--target postgres://user:pass@localhost:5432/banking_test \
--rows 8000
Tables: customers, accounts, transactions, loans, cards, branches
Insurance platform with policies, claims, and underwriting
aphelion generate examples/insurance/schema.json \
--target postgres://user:pass@localhost:5432/insurance_test \
--rows 5000
Tables: policies, claims, policyholders, coverage, premiums
Online store with products, orders, customers, and inventory
aphelion generate examples/ecommerce/schema.json \
--target postgres://user:pass@localhost:5432/ecommerce_test \
--rows 10000
Tables: products, orders, customers, inventory, reviews, categories
Flight booking system with flights, bookings, and passengers
aphelion generate examples/airlines/schema.json \
--target postgres://user:pass@localhost:5432/airlines_test \
--rows 7000
Tables: flights, bookings, passengers, airports, aircraft
Template Features
Automatically respects all foreign keys, unique constraints, and NOT NULL requirements
Automatically detects and generates realistic fake data for emails, names, SSNs, credit cards, and more
Same seed = same data every time. Perfect for reproducible testing
Pre-built schemas for Healthcare, Finance, E-commerce, and more
aphelion cloneExtract schema from an existing database and save it as JSON
aphelion clone <connection-string> --output schema.json
--output, -o - Output file path (required)--rows, -r - Default row count for generation (default: 100)--tables, -t - Specific tables to clone (comma-separated)--exclude - Tables to exclude (comma-separated)# Clone entire database
aphelion clone postgres://user:pass@localhost:5432/mydb \\
--output schema.json
# Clone specific tables only
aphelion clone postgres://user:pass@localhost:5432/mydb \\
--output schema.json \\
--tables users,orders,products
# Clone with custom row count
aphelion clone postgres://user:pass@localhost:5432/mydb \\
--output schema.json \\
--rows 5000
aphelion generateGenerate synthetic data from a schema file
aphelion generate <schema-file> --target <connection-string>
--target, -t - Target database connection string (required)--seed, -s - Random seed for deterministic output (default: random)--rows, -r - Override row count from schema--auto-approve - Skip confirmation prompts (Pro/Enterprise only)--drop-existing - Drop existing tables before generation--truncate - Truncate existing tables before generation# Basic generation
aphelion generate schema.json \\
--target postgres://user:pass@localhost:5432/test_db
# Deterministic generation with seed
aphelion generate schema.json \\
--target postgres://user:pass@localhost:5432/test_db \\
--seed 12345
# CI/CD mode (Pro/Enterprise)
aphelion generate schema.json \\
--target postgres://user:pass@localhost:5432/test_db \\
--auto-approve \\
--truncate
# Override row count
aphelion generate schema.json \\
--target postgres://user:pass@localhost:5432/test_db \\
--rows 10000
aphelion licenseManage and verify your Aphelion license
# Verify license is valid
aphelion license verify
# Show license details
aphelion license info
# Show version
aphelion --version
Aphelion searches for licenses in this order:
./.aphelion-license~/.aphelion/.aphelion-license# Show all commands
aphelion --help
# Show command-specific help
aphelion clone --help
aphelion generate --help
| Feature | Free | Pro | Enterprise |
|---|---|---|---|
| Max Rows per Table | 1,000 | Unlimited | Unlimited |
| CI/CD Auto-Approve | ❌ | ✅ | ✅ |
| Advanced PII Profiles | ❌ | ✅ | ✅ |
| Support | Community | Priority |
Aphelion works seamlessly in CI/CD pipelines using authenticated binary downloads. Choose your platform for a detailed setup guide:
Automate testing in your GitHub workflows. Includes caching and secret management.
Integrate with GitLab's built-in CI/CD. Optimization tips for artifacts and parallel testing.
Fast, deterministic data for CircleCI jobs using Docker executors.
Containerize Aphelion for Kubernetes and Docker Compose workflows.
Pro and Enterprise users can download binaries using their license key for automated deployments.
# Download Pro binary
curl -L "https://algomimic.com/api/download/pro?key=YOUR_LICENSE_KEY" -o aphelion
chmod +x aphelion
# Verify download
./aphelion --version
Validates license key against database in real-time
Automatically checks if license is expired
Ensures correct tier access (Pro/Enterprise)
Serves the correct binary for your platform
💡 Tip: Store your license key as a secret in your CI/CD platform (GitHub Secrets, GitLab CI Variables, etc.) to keep it secure.
Our team is here to support you