# CogNexus - run it in your boundary. https://cognexuslabs.ai/install # # Thin bootstrap, on purpose: everything real lives in the artzain CLI # (PyPI), which this script installs and hands off to. Read it before you # run it - it is short because there is nothing to hide. # # irm https://cognexuslabs.ai/install.ps1 | iex # # Needs: Python 3.10+ and Docker Desktop (the CLI's own preflight checks # Docker and prints a one-line fix for anything missing). WSL2 users can use # install.sh inside the distro instead - both paths are supported equally. $ErrorActionPreference = 'Stop' function Fail([string]$Message) { Write-Error "install.ps1: $Message" exit 1 } $py = $null foreach ($candidate in @('py', 'python3', 'python')) { if (Get-Command $candidate -ErrorAction SilentlyContinue) { $py = $candidate; break } } if (-not $py) { Fail 'Python 3.10+ is required. Install it from python.org (check "Add to PATH"), then re-run.' } & $py -c 'import sys; raise SystemExit(0 if sys.version_info >= (3, 10) else 1)' if ($LASTEXITCODE -ne 0) { Fail "Python 3.10+ is required (found: $(& $py -V))." } # artzain>=0.6.0 is the first release that carries `artzain local`. Pinning # the floor makes an out-of-date index fail loudly instead of installing a # CLI without the installer in it. if (Get-Command pipx -ErrorAction SilentlyContinue) { Write-Host 'Installing the artzain CLI (pipx)...' pipx install --force 'artzain>=0.6.0' if ($LASTEXITCODE -ne 0) { Fail 'pipx install failed - see the output above.' } } else { Write-Host 'pipx not found - installing artzain for this user with pip...' & $py -m pip install --user --upgrade --quiet 'artzain>=0.6.0' if ($LASTEXITCODE -ne 0) { Fail 'pip install failed - see the output above.' } } Write-Host '' Write-Host 'Starting CogNexus (docker compose, images pinned by digest)...' if (Get-Command artzain -ErrorAction SilentlyContinue) { artzain local up @args exit $LASTEXITCODE } # pip --user installs sometimes land off PATH; the module entry point is the # same code either way. & $py -c 'import sys; from artzain.cli import main; sys.argv = ["artzain", "local", "up"] + sys.argv[1:]; main()' @args exit $LASTEXITCODE