Quick Start

1. Download Aphelion

Download the CLI for Linux (macOS and Windows coming soon):

Linux x64

Available Now

macOS

Coming Soon

Windows

Coming Soon

2. Install Your License (Team/Enterprise)

If you purchased a Team 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

3. Generate Your First Dataset

# Clone an existing database structure
aphelion clone postgres://user:pass@localhost:5432/prod_db \
  --output ./test_db.json \
  --rows 1000

# Generate synthetic data
# Generate synthetic data
aphelion generate ./test_db.json --output ./output

# Load into database
cd ./output && ./load.sh postgres://user:pass@localhost:5432/test_db

What's New in v1.7.8

Weighted Distributions

Control the frequency of generated values with precision! Define weights for your Enum fields to match real-world distributions:

"status": {
  "type": "weighted_enum",
  "options": {
    "active": 80,
    "inactive": 15,
    "banned": 5
  }
}

✅ Create realistic data skew for better testing!

Temporal Constraints

Enforce logical time relationships within your rows. Ensure end_date always comes after start_date:

"end_date": {
  "type": "temporal",
  "rule": "after",
  "column": "start_date",
  "min_offset": "1 day"
}

✅ Zero invalid date ranges in your test data!

100% Rust Feature Parity

The transition is complete! v1.7.8 brings full feature parity with the legacy Node.js version, including all advanced generation patterns, now running at Rust speeds.

$ 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.7 announcement for complete details and migration guide.

Complete Workflow Examples

Basic Workflow

# 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
# Step 2: Generate test data
aphelion generate myapp-schema.json --output ./output --overwrite

# Step 3: Load into database
cd ./output && ./load.sh postgres://testuser:testpass@localhost:5432/myapp_test

Using Environment Variables

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 --output ./output

# Load using environment variables
cd ./output && ./load.sh "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

Reproducible Data (Same Seed)

Generate identical data every time for consistent testing:

# Generate with seed 42
# Generate with seed 42
aphelion generate schema.json --output ./output --seed 42

# Load data (deterministic)
cd ./output && ./load.sh postgres://user:pass@localhost:5432/test_db

# Running again with same seed produces identical data
aphelion generate schema.json --output ./output2 --seed 42
cd ./output2 && ./load.sh postgres://user:pass@localhost:5432/test_db2

CI/CD Integration (Team/Enterprise)

Automated test data refresh in your pipeline:

#!/bin/bash
# .github/workflows/test-data.sh

# Use pipeline ID as seed for reproducibility
# Use pipeline ID as seed for reproducibility
aphelion generate schema.json \
  --output ./output \
  --seed $CI_PIPELINE_ID \
  --auto-approve \
  --overwrite

# Load data
cd ./output && ./load.sh $TEST_DB_URL

# Run your tests
npm test

Controlling Data Volume

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. Edit Schema JSON (Per-Table Control)

{
  "tables": {
    "users": {
      "rowCount": 10000,    // 10k users
      ...
    },
    "orders": {
      "rowCount": 100000,   // 100k orders
      ...
    }
  }
}

Industry-Specific Templates

Aphelion includes pre-built, production-ready schemas for various industries. Use these as starting points or for testing:

Healthcare (HIPAA)

Complete EHR system with patients, encounters, medications, lab results, and clinical notes

aphelion generate examples/healthcare/schema.json --output ./output --seed 42
cd ./output && ./load.sh postgres://user:pass@localhost:5432/healthcare_test

Tables: patients, encounters, medications, lab_results, diagnoses, procedures, clinical_notes

Investment Banking

Trading platform with securities, portfolios, trades, and market data

aphelion generate examples/investment-banking/schema.json --output ./output --seed 42
cd ./output && ./load.sh postgres://user:pass@localhost:5432/trading_test

Tables: securities, portfolios, trades, positions, market_data, clients

Retail Banking

Banking system with accounts, transactions, loans, and customers

aphelion generate examples/retail-banking/schema.json --output ./output --seed 42
cd ./output && ./load.sh postgres://user:pass@localhost:5432/banking_test

Tables: customers, accounts, transactions, loans, cards, branches

Insurance

Insurance platform with policies, claims, and underwriting

aphelion generate examples/insurance/schema.json --output ./output --seed 42
cd ./output && ./load.sh postgres://user:pass@localhost:5432/insurance_test

Tables: policies, claims, policyholders, coverage, premiums

E-commerce

Online store with products, orders, customers, and inventory

aphelion generate examples/ecommerce/schema.json --output ./output --seed 42
cd ./output && ./load.sh postgres://user:pass@localhost:5432/ecommerce_test

Tables: products, orders, customers, inventory, reviews, categories

Airlines

Flight booking system with flights, bookings, and passengers

aphelion generate examples/airlines/schema.json --output ./output --seed 42
cd ./output && ./load.sh postgres://user:pass@localhost:5432/airlines_test

Tables: flights, bookings, passengers, airports, aircraft

Template Features

Core Features

Constraint-Safe Generation

Automatically respects all foreign keys, unique constraints, and NOT NULL requirements

PII Detection & Masking

Automatically detects and generates realistic fake data for emails, names, SSNs, credit cards, and more

Deterministic Output

Same seed = same data every time. Perfect for reproducible testing

Industry Templates

Pre-built schemas for Healthcare, Finance, E-commerce, and more

CLI Commands

aphelion introspect

Inspect database schema and output as JSON (no data generation)

Basic Usage:

aphelion introspect --url <connection-string> [--output schema.json]

Options:

  • --url - Database connection string (required)
  • --schema - Schema name (default: "public")
  • --output - Output file path (optional, prints to stdout if not provided)

Examples:

# Introspect and save to file
aphelion introspect --url postgres://user:pass@localhost:5432/mydb \
  --schema public \
  --output schema.json

# Print to stdout for piping
aphelion introspect --url postgres://user:pass@localhost:5432/mydb

# Introspect MySQL database
aphelion introspect --url mysql://user:pass@localhost:3306/mydb \
  --output mysql-schema.json

# Introspect specific schema
aphelion introspect --url postgres://user:pass@localhost:5432/mydb \
  --schema analytics \
  --output analytics-schema.json

aphelion clone

Extract schema from an existing database and save it as JSON

Basic Usage:

aphelion clone <connection-string> --output schema.json

Options:

  • --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)

Examples:

# 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 generate

Generate synthetic data from a schema file

Basic Usage:

aphelion generate <schema-file> --output <dir>
cd <dir> && ./load.sh <connection-string>

Options:

  • --output, -o - Output directory (required)
  • --seed, -s - Random seed for deterministic output (default: random)
  • --auto-approve - Skip confirmation prompts (Team/Enterprise only)
  • --overwrite - Overwrite existing files

Examples:

# Basic generation
aphelion generate schema.json --output ./output
cd ./output && ./load.sh postgres://user:pass@localhost:5432/test_db

# Deterministic generation with seed
aphelion generate schema.json --output ./output --seed 12345
cd ./output && ./load.sh postgres://user:pass@localhost:5432/test_db

# CI/CD mode (Team/Enterprise)
aphelion generate schema.json \
  --output ./output \
  --auto-approve \
  --overwrite
cd ./output && ./load.sh postgres://user:pass@localhost:5432/test_db


                

aphelion license

Manage and verify your Aphelion license

Subcommands:

# Verify license is valid
aphelion license verify

# Show license details
aphelion license info

# Show version
aphelion --version

License Locations:

Aphelion searches for licenses in this order:

  1. Current directory: ./.aphelion-license
  2. Home directory: ~/.aphelion/.aphelion-license

Getting Help

# Show all commands
aphelion --help

# Show command-specific help
aphelion clone --help
aphelion generate --help

Tier Comparison

Feature Developer Team
Max Rows per Table 1,000 1.5 Million
CI/CD Auto-Approve
Advanced PII Profiles

CI/CD Integration

Aphelion works seamlessly in CI/CD pipelines using authenticated binary downloads. Choose your platform for a detailed setup guide:

Authenticated Binary Downloads

Team and Enterprise users can download binaries using their license key for automated deployments.

Download with License Key

# Download Pro binary
curl -L "https://algomimic.com/api/download/pro?key=YOUR_LICENSE_KEY" -o aphelion
chmod +x aphelion

# Verify download
./aphelion --version

Features

✅ License Validation

Validates license key against database in real-time

✅ Expiration Checking

Automatically checks if license is expired

✅ Tier Verification

Ensures correct tier access (Team/Enterprise)

✅ Linux Support

Optimized binary for Linux environments

💡 Tip: Store your license key as a secret in your CI/CD platform (GitHub Secrets, GitLab CI Variables, etc.) to keep it secure.

Need Help?

Our team is here to support you