Download bootstrap/bootstrap-projectos.ps1 from AnthropicallyHuggingFaces/ProjectOS: direct link, hf CLI and curl.
- Browser
- Download file 1.43 kB
-
https://huggingface.co/spaces/AnthropicallyHuggingFaces/ProjectOS/resolve/main/bootstrap/bootstrap-projectos.ps1
- Command line
-
hf download hf://spaces/AnthropicallyHuggingFaces/ProjectOS/bootstrap/bootstrap-projectos.ps1
-
curl -L -o bootstrap-projectos.ps1 https://huggingface.co/spaces/AnthropicallyHuggingFaces/ProjectOS/resolve/main/bootstrap/bootstrap-projectos.ps1
1.43 kB
| $ErrorActionPreference = 'Stop' | |
| Write-Host '' | |
| Write-Host 'ProjectOS Bootstrap' -ForegroundColor Cyan | |
| Write-Host '' | |
| $projectRoot = Split-Path -Parent $PSScriptRoot | |
| Set-Location $projectRoot | |
| function Require-Command { | |
| param([Parameter(Mandatory = $true)][string]$Name) | |
| if (-not (Get-Command $Name -ErrorAction SilentlyContinue)) { | |
| throw "$Name is missing. Install it and run bootstrap again." | |
| } | |
| } | |
| Require-Command git | |
| Require-Command node | |
| $nodeVersion = [version](node -p "process.versions.node") | |
| if ($nodeVersion -lt [version]'22.5.0') { | |
| throw "Node.js 22.5 or later is required. Found $nodeVersion." | |
| } | |
| if (-not (Get-Command pnpm -ErrorAction SilentlyContinue)) { | |
| Require-Command npm | |
| npm install --global pnpm@10 | |
| } | |
| New-Item -ItemType Directory -Path (Join-Path $projectRoot 'configs') -Force | Out-Null | |
| if (-not (Test-Path (Join-Path $projectRoot 'bootstrap.xml'))) { | |
| Copy-Item -LiteralPath (Join-Path $projectRoot 'defaults\bootstrap.xml') -Destination (Join-Path $projectRoot 'bootstrap.xml') | |
| Write-Host 'Created default bootstrap.xml' | |
| } | |
| pnpm install | |
| if ($LASTEXITCODE -ne 0) { | |
| throw 'pnpm install failed.' | |
| } | |
| pnpm generate | |
| if ($LASTEXITCODE -ne 0) { | |
| throw 'ProjectOS manifest validation or configuration generation failed.' | |
| } | |
| Write-Host '' | |
| Write-Host 'Bootstrap Complete' -ForegroundColor Green | |
| Write-Host 'Generated configuration is ready. Start ProjectOS with: pnpm dev' | |