# AI Memory Engine Installation Script
Write-Host "AI Memory Engine Installer" -ForegroundColor Cyan
# Determine install directory
$installDir = "$env:LOCALAPPDATA\AIMemoryEngine"
Write-Host "Install directory: $installDir" -ForegroundColor Green
# Create install directory
if (-not (Test-Path $installDir)) {
New-Item -ItemType Directory -Path $installDir -Force | Out-Null
Write-Host "Created install directory" -ForegroundColor Green
}
# Copy binary
$sourceBinary = ".\target\release\aimemoryengine.exe"
$targetBinary = "$installDir\aimemoryengine.exe"
if (Test-Path $sourceBinary) {
Copy-Item $sourceBinary $targetBinary -Force
Write-Host "Copied aimemoryengine.exe" -ForegroundColor Green
} else {
Write-Host "Binary not found. Please run 'cargo build --release' first" -ForegroundColor Red
exit 1
}
# Add to PATH
$currentPath = [Environment]::GetEnvironmentVariable("PATH", "User")
if ($currentPath -notlike "*$installDir*") {
$newPath = "$currentPath;$installDir"
[Environment]::SetEnvironmentVariable("PATH", $newPath, "User")
Write-Host "Added to PATH (restart terminal)" -ForegroundColor Green
} else {
Write-Host "Already in PATH" -ForegroundColor Green
}
Write-Host ""
Write-Host "Installation successful!" -ForegroundColor Green
Write-Host "Next steps:" -ForegroundColor Cyan
Write-Host "1. Restart your terminal" -ForegroundColor White
Write-Host "2. Run: aimemoryengine license activate 'your-key'" -ForegroundColor White
Write-Host "3. Run: aimemoryengine init" -ForegroundColor White