# raea's installer for Windows, in PowerShell: irm https://raea.io/install.ps1 | iex # # Puts the raea engine (the `raea` CLI that renders, plays and checks compositions written in React and # TypeScript) under ~\.raea, adds its bin folder to your PATH, and adds raea's agent skills to ~\.claude\skills so a # coding agent (Claude Code, or anything that reads that folder) knows how to write and render with it. Run it again # to update. Windows 10 or 11 on x86_64. raea needs the Microsoft Visual C++ Redistributable (x64), which most # machines already have; this script says so when it's missing. # # $env:RAEA_VERSION = "0.1.0-canary.2" picks a release (the latest by default); RAEA_PREFIX moves ~\.raea; # RAEA_NO_SKILLS=1 leaves the skills out; RAEA_DOWNLOAD serves the releases from somewhere else (a mirror, or a local # folder to test). $ErrorActionPreference = "Stop" $ProgressPreference = "SilentlyContinue" function Say($m) { Write-Host "raea: $m" } # throw, not exit: under `irm | iex` an exit would close the terminal it runs in function Fail($m) { throw "raea: $m" } # a URL, or a local folder (RAEA_DOWNLOAD pointed at one, to test a zip before it is published) function Fetch($from, $to) { if ($from -match "^https?:") { Invoke-WebRequest $from -OutFile $to -UseBasicParsing } else { Copy-Item $from $to } } $repo = "shinyobjectz/raea" $prefix = if ($env:RAEA_PREFIX) { $env:RAEA_PREFIX } else { Join-Path $HOME ".raea" } if ($env:PROCESSOR_ARCHITECTURE -ne "AMD64" -and $env:PROCESSOR_ARCHITEW6432 -ne "AMD64") { Fail "raea runs on x86_64 Windows for now (this is $env:PROCESSOR_ARCHITECTURE)." } if ($env:RAEA_VERSION) { $tag = "v$($env:RAEA_VERSION)" } else { $tag = (Invoke-RestMethod "https://api.github.com/repos/$repo/releases?per_page=1")[0].tag_name if (-not $tag) { Fail "couldn't find a release of $repo." } } $version = $tag.TrimStart("v") $asset = "raea-$version-windows-x86_64.zip" $base = if ($env:RAEA_DOWNLOAD) { $env:RAEA_DOWNLOAD } else { "https://github.com/$repo/releases/download" } $url = "$base/$tag/$asset" $tmp = Join-Path ([IO.Path]::GetTempPath()) ("raea-" + [Guid]::NewGuid()) New-Item -ItemType Directory -Path $tmp | Out-Null try { Say "downloading raea $version" try { Fetch $url (Join-Path $tmp $asset) } catch { Fail "couldn't download $url (has $tag a Windows build?)" } try { Fetch "$url.sha256" (Join-Path $tmp "$asset.sha256") } catch { Fail "couldn't download the checksum" } $want = ((Get-Content (Join-Path $tmp "$asset.sha256") -Raw).Trim() -split '\s+')[0].ToLower() $got = (Get-FileHash (Join-Path $tmp $asset) -Algorithm SHA256).Hash.ToLower() if ($want -ne $got) { Fail "the download's checksum doesn't match." } Expand-Archive (Join-Path $tmp $asset) -DestinationPath $tmp -Force # replace the old install whole (a release's files go together) New-Item -ItemType Directory -Force -Path $prefix | Out-Null foreach ($d in "bin", "share") { $p = Join-Path $prefix $d; if (Test-Path $p) { Remove-Item $p -Recurse -Force } } Move-Item (Join-Path $tmp "raea\bin") $prefix Move-Item (Join-Path $tmp "raea\share") $prefix Copy-Item (Join-Path $tmp "raea\README.txt") $prefix -Force } finally { Remove-Item $tmp -Recurse -Force -ErrorAction SilentlyContinue } $bin = Join-Path $prefix "bin" $user = [Environment]::GetEnvironmentVariable("Path", "User") if (-not (($user -split ";") -contains $bin)) { [Environment]::SetEnvironmentVariable("Path", (@($bin) + ($user -split ";" | Where-Object { $_ })) -join ";", "User") $added = $true } $env:Path = "$bin;$env:Path" Say "installed raea $version in $prefix" # the C runtime's DLLs come from the VC++ redistributable (they're Microsoft's to ship, not ours) $sys = Join-Path $env:SystemRoot "System32" $crt = "vcruntime140.dll", "vcruntime140_1.dll", "msvcp140.dll" | Where-Object { -not (Test-Path (Join-Path $sys $_)) } if ($crt) { Say "raea needs the Microsoft Visual C++ Redistributable (x64), which isn't installed ($($crt -join ', ') missing). Get it from" Say " https://aka.ms/vs/17/release/vc_redist.x64.exe (or: winget install Microsoft.VCRedist.2015+.x64)" } if (-not $env:RAEA_NO_SKILLS) { $skills = Join-Path $HOME ".claude\skills" New-Item -ItemType Directory -Force -Path $skills | Out-Null foreach ($s in Get-ChildItem (Join-Path $prefix "share\raea\skills") -Directory) { $to = Join-Path $skills $s.Name if (Test-Path $to) { Remove-Item $to -Recurse -Force } Copy-Item $s.FullName $to -Recurse } Say "added the raea and raea-bevy skills to $skills" } if ($added) { Say "added $bin to your PATH: open a new terminal to pick it up" } Say "try it: raea render your-composition.tsx -o out.mp4" Say "agents: ask your coding agent to make something with raea; the skill tells it how."