# Setup script for SamurAIGPT/Generative-Media-Skills on Windows (PowerShell), from https://gitmanual.com/SamurAIGPT/Generative-Media-Skills # Read it before you run it: the commands come from the repo's own README and files. # Run: powershell -ExecutionPolicy Bypass -File .\setup.ps1 $ErrorActionPreference = "Stop" function Write-Step($t) { Write-Host "`n==> $t" -ForegroundColor Cyan } # Windows ships a python that only opens the Microsoft Store; it doesn't count. function Have($c) { $cmd = Get-Command $c -ErrorAction SilentlyContinue; [bool]$cmd -and $cmd.Source -notlike '*\WindowsApps\*' } # New installs change PATH; pick it up without opening a new window. function Update-Path { $env:Path = [Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [Environment]::GetEnvironmentVariable("Path", "User") } # Stop when a program fails, like bash's set -e. Dot-sourced, so cd and venv activation carry on to the next step. function Invoke-Step([scriptblock]$Block) { $global:LASTEXITCODE = 0; . $Block; if ($LASTEXITCODE) { throw "Failed with exit code $LASTEXITCODE" } } Write-Step '1/3 Clone the repository' if (-not (Test-Path 'Generative-Media-Skills')) { Invoke-Step { git clone https://github.com/SamurAIGPT/Generative-Media-Skills.git } } Set-Location 'Generative-Media-Skills' Write-Step '2/3 Install the required tools' # jq, Python 3, Node.js Invoke-Step { winget install jqlang.jq -e --accept-source-agreements --accept-package-agreements } if (-not (Have 'python')) { Invoke-Step { winget install Python.Python.3.12 -e --accept-source-agreements --accept-package-agreements }; Update-Path } Invoke-Step { winget install OpenJS.NodeJS.LTS -e --accept-source-agreements --accept-package-agreements } Write-Step '3/3 Follow the README: 🚀 Quick Start' # Run these in Git Bash (installed with Git) or WSL — not PowerShell. Do the README instructions above first. Invoke-Step { npm install -g muapi-cli } Invoke-Step { pip install muapi-cli } Invoke-Step { npx muapi-cli --help } Invoke-Step { muapi auth configure } # (fill in your own values, then run it) muapi auth configure --api-key "YOUR_MUAPI_KEY" Invoke-Step { npx skills add SamurAIGPT/Generative-Media-Skills --all } Invoke-Step { npx skills add SamurAIGPT/Generative-Media-Skills --skill muapi-media-generation } Invoke-Step { npx skills add SamurAIGPT/Generative-Media-Skills --all -a claude-code -a cursor } Invoke-Step { muapi image generate "a cyberpunk city at night" --model flux-dev } Invoke-Step { muapi image generate "a sunset over mountains" --model hidream-fast --download ./outputs } Invoke-Step { muapi image generate "product on white bg" --model flux-schnell --output-json --jq '.outputs[0]' } # (needs Git Bash or WSL on Windows) bash library/visual/nano-banana/scripts/generate-nano-art.sh \ Invoke-Step { --file ./my-source-image.jpg \ } Invoke-Step { --subject "a glass hummingbird" \ } Invoke-Step { --style "macro photography" \ } Invoke-Step { --resolution "2k" \ } Invoke-Step { --view } # (needs Git Bash or WSL on Windows) bash scripts/generate-film.sh \ Invoke-Step { --subject "a cybernetic dragon over Tokyo" \ } Invoke-Step { --intent "epic" \ } Invoke-Step { --model "kling-v3.0-pro" \ } Invoke-Step { --duration 10 \ } Invoke-Step { --view } # (needs Git Bash or WSL on Windows) bash library/motion/seedance-2/scripts/generate-seedance.sh \ Invoke-Step { --mode i2v \ } Invoke-Step { --file ./concept.jpg \ } Invoke-Step { --subject "camera slowly pulls back to reveal the full landscape" \ } Invoke-Step { --intent "reveal" \ } Invoke-Step { --view } # (needs Git Bash or WSL on Windows) bash library/motion/seedance-2/scripts/generate-seedance.sh \ Invoke-Step { --mode extend \ } # (fill in your own values, then run it) --request-id "YOUR_REQUEST_ID" \ Invoke-Step { --subject "camera continues pulling back to reveal the vast city" \ } Invoke-Step { --duration 10 } # (fill in your own values, then run it) export MUAPI_API_KEY=your_key_here Invoke-Step { opencode } Write-Host 'Set up SamurAIGPT/Generative-Media-Skills.' Write-Host 'Manual: https://gitmanual.com/SamurAIGPT/Generative-Media-Skills'