#!/usr/bin/env bash # Setup script for SamurAIGPT/Generative-Media-Skills on macOS, 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: bash setup.sh set -eo pipefail trap 'echo "Setup stopped at the step above. Steps and fixes: https://gitmanual.com/SamurAIGPT/Generative-Media-Skills" >&2' ERR step() { printf '\n\033[1m==> %s\033[0m\n' "$1"; } have() { command -v "$1" >/dev/null 2>&1; } # Installers put programs here; make them usable right away. export PATH="$HOME/.local/share/mise/shims:$HOME/.cargo/bin:$HOME/.local/bin:$HOME/.deno/bin:$HOME/.bun/bin:$PATH" # nvm is a shell function, so load it into this script when it's installed. export NVM_DIR="${NVM_DIR:-$HOME/.nvm}" load_nvm() { [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" || { have brew && [ -s "$(brew --prefix nvm 2>/dev/null)/nvm.sh" ] && mkdir -p "$NVM_DIR" && . "$(brew --prefix nvm)/nvm.sh"; }; } have_nvm() { load_nvm >/dev/null 2>&1; type nvm >/dev/null 2>&1; } step '1/3 Clone the repository' [ -d 'Generative-Media-Skills' ] || git clone https://github.com/SamurAIGPT/Generative-Media-Skills.git cd 'Generative-Media-Skills' step '2/3 Install the required tools' # jq, Python 3, Node.js have jq || brew install jq have python3 || brew install python have node || brew install node step '3/3 Follow the README: 🚀 Quick Start' # In the maintainers' order. Do the README instructions above first — they cover steps outside the terminal. npm install -g muapi-cli pip install muapi-cli npx muapi-cli --help muapi auth configure # (fill in your own values, then run it) muapi auth configure --api-key "YOUR_MUAPI_KEY" npx skills add SamurAIGPT/Generative-Media-Skills --all npx skills add SamurAIGPT/Generative-Media-Skills --skill muapi-media-generation npx skills add SamurAIGPT/Generative-Media-Skills --all -a claude-code -a cursor muapi image generate "a cyberpunk city at night" --model flux-dev muapi image generate "a sunset over mountains" --model hidream-fast --download ./outputs muapi image generate "product on white bg" --model flux-schnell --output-json --jq '.outputs[0]' bash library/visual/nano-banana/scripts/generate-nano-art.sh \ --file ./my-source-image.jpg \ --subject "a glass hummingbird" \ --style "macro photography" \ --resolution "2k" \ --view bash scripts/generate-film.sh \ --subject "a cybernetic dragon over Tokyo" \ --intent "epic" \ --model "kling-v3.0-pro" \ --duration 10 \ --view bash library/motion/seedance-2/scripts/generate-seedance.sh \ --mode i2v \ --file ./concept.jpg \ --subject "camera slowly pulls back to reveal the full landscape" \ --intent "reveal" \ --view bash library/motion/seedance-2/scripts/generate-seedance.sh \ --mode extend \ # (fill in your own values, then run it) --request-id "YOUR_REQUEST_ID" \ --subject "camera continues pulling back to reveal the vast city" \ --duration 10 # (fill in your own values, then run it) export MUAPI_API_KEY=your_key_here opencode echo 'Set up SamurAIGPT/Generative-Media-Skills.' echo 'Manual: https://gitmanual.com/SamurAIGPT/Generative-Media-Skills'