Download the CLI for Linux (macOS and Windows coming soon):
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
# 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
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!
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!
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.
# 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
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
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
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
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
...
}
}
}
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 --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
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
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 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
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
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
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 introspectInspect database schema and output as JSON (no data generation)
aphelion introspect --url <connection-string> [--output schema.json]
--url - Database connection string (required)--schema - Schema name (default: "public")--output - Output file path (optional, prints to stdout if not provided)# 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 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> --output <dir>
cd <dir> && ./load.sh <connection-string>
--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# 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 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 | Developer | Team |
|---|---|---|
| Max Rows per Table | 1,000 | 1.5 Million |
| CI/CD Auto-Approve | ❌ | ✅ |
| Advanced PII Profiles | ❌ | ✅ |
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.
Team 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 (Team/Enterprise)
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.
Our team is here to support you