aimemoryengine 0.1.2

Professional-grade persistent project memory for AI coding assistants - No more explaining the same codebase repeatedly
Documentation
# AI Memory Engine Installation Script
# Run with: powershell -ExecutionPolicy Bypass -File install.ps1

Write-Host "๐Ÿง  AI Memory Engine Installer" -ForegroundColor Cyan
Write-Host "================================" -ForegroundColor Cyan

# Check if running as administrator
$isAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")

if (-not $isAdmin) {
    Write-Host "โš ๏ธ  Running without administrator privileges" -ForegroundColor Yellow
    Write-Host "   Installing to user directory instead of system-wide" -ForegroundColor Yellow
}

# Determine install directory
if ($isAdmin) {
    $installDir = "C:\Program Files\AIMemoryEngine"
} else {
    $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 at $sourceBinary" -ForegroundColor Red
    Write-Host "   Please run 'cargo build --release' first" -ForegroundColor Red
    exit 1
}

# Add to PATH
$currentPath = [Environment]::GetEnvironmentVariable("PATH", "User")
if ($currentPath -notlike "*$installDir*") {
    [Environment]::SetEnvironmentVariable("PATH", "$currentPath;$installDir", "User")
    Write-Host "โœ… Added to PATH (restart terminal to take effect)" -ForegroundColor Green
} else {
    Write-Host "โœ… Already in PATH" -ForegroundColor Green
}

# Test installation
Write-Host ""
Write-Host "๐Ÿงช Testing installation..." -ForegroundColor Cyan
& "$targetBinary" --help | Out-Null
if ($LASTEXITCODE -eq 0) {
    Write-Host "โœ… Installation successful!" -ForegroundColor Green
} else {
    Write-Host "โŒ Installation test failed" -ForegroundColor Red
    exit 1
}

Write-Host ""
Write-Host "๐ŸŽ‰ AI Memory Engine installed successfully!" -ForegroundColor Green
Write-Host ""
Write-Host "Next steps:" -ForegroundColor Cyan
Write-Host "1. Restart your terminal" -ForegroundColor White
Write-Host "2. Run: aimemoryengine license activate 'your-license-key'" -ForegroundColor White
Write-Host "3. Run: aimemoryengine init" -ForegroundColor White
Write-Host ""
Write-Host "Need help? Visit: https://aimemoryengine.com/docs" -ForegroundColor Cyan