Getting Started with TradAI¶
Complete guide to setting up your TradAI development environment.
Prerequisites¶
Install these tools before proceeding:
| Tool | macOS | Linux | Windows |
|---|---|---|---|
| UV | curl -LsSf https://astral.sh/uv/install.sh \| sh | Same | powershell -c "irm https://astral.sh/uv/install.ps1 \| iex" |
| Just | brew install just | cargo install just | cargo install just |
| Docker | Docker Desktop | apt install docker.io | Docker Desktop (WSL2 backend) |
Verify Prerequisites¶
uv --version # Should show 0.5.x or higher
just --version # Should show 1.x or higher
docker --version
Quick Setup¶
Option 1: Dev Container (Recommended)¶
Open the repository in VS Code and accept "Reopen in Container". All tools are pre-installed.
Option 2: Manual Setup¶
# Clone the repository
git clone <repository-url>
cd tradai-uv
# Run setup (installs Python, syncs deps, configures pre-commit)
just setup
Watch for progress messages:
🚀 TradAI Setup (Step 1/4): Installing Python 3.11...
📦 TradAI Setup (Step 2/4): Syncing dependencies...
🔧 TradAI Setup (Step 3/4): Installing pre-commit hooks...
📋 TradAI Setup (Step 4/4): Checking environment files...
✅ Setup complete!
Verify Environment¶
Run the environment doctor to check everything is configured correctly:
Expected output:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🩺 TradAI Environment Doctor
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔧 Checking required tools...
✓ Python: Python 3.11.x
✓ UV: uv 0.5.x
✓ Just: just 1.x
📦 Checking Python packages...
✓ tradai-common
✓ tradai-data
✓ tradai-strategy
🔒 Checking pre-commit...
✓ Pre-commit hooks installed
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Legend: ✓ OK ⚠ Warning ✗ Error (fix required)
Fix any items marked with ✗ before continuing.
Start Services¶
Start all TradAI services with Docker:
You should see: - Backend (port 8000) - API gateway - Data Collection (port 8002) - Market data sync - Strategy Service (port 8003) - Backtesting engine - MLflow (port 5001) - Experiment tracking
Verify CLI¶
Test the TradAI CLI:
You should see commands for: - tradai up/down/logs/ps - Docker management - tradai strategy - Strategy management - tradai indicator - Indicator testing - tradai backtest - Backtest visualization - tradai data - Data collection
Environment Configuration¶
Copy the example environment file:
Key settings in .env:
# Exchange API (optional for paper trading)
BINANCE_API_KEY=your_api_key
BINANCE_SECRET_KEY=your_secret_key
# Services
BACKEND_URL=http://localhost:8000
TRADAI_UI_URL=http://localhost:3000
Troubleshooting¶
"UV not found"¶
# Reinstall UV
curl -LsSf https://astral.sh/uv/install.sh | sh
source ~/.bashrc # or restart terminal
"Docker service connection refused"¶
"Pre-commit not installed"¶
Next Steps¶
- Create Your First Strategy - Build a custom trading strategy
- Run Your First Backtest - Test with historical data
- Explore Indicators - Test indicator expressions
Quick Reference¶
| Command | Description |
|---|---|
just setup | Initial environment setup |
just doctor | Verify environment health |
just up | Start all services |
just down | Stop all services |
just ps | Show service status |
just check | Run lint + typecheck + tests |
just fmt | Format code |
tradai --help | CLI help |