| # Create Hugging Face Spaces for all templates | |
| # Prerequisites: | |
| # - huggingface-cli installed and logged in | |
| echo "🤗 Creating Hugging Face Spaces for templates..." | |
| echo "" | |
| echo "Note: You need to be logged in to Hugging Face CLI" | |
| echo "Run: huggingface-cli login" | |
| echo "" | |
| # List of templates | |
| templates=( | |
| "devforge" | |
| "mobilefirst" | |
| "saasify" | |
| "startupkit" | |
| "analyticsdash" | |
| "blog" | |
| "changelog" | |
| "portfolio" | |
| "ai-chat" | |
| "search" | |
| "ecommerce" | |
| "api-docs" | |
| ) | |
| # Create spaces | |
| for template in "${templates[@]}"; do | |
| echo "📦 Creating space: hanzo-community/$template..." | |
| # Create the space using huggingface-cli | |
| huggingface-cli repo create "hanzo-community/$template" \ | |
| --type space \ | |
| --space-sdk docker \ | |
| --private false \ | |
| 2>/dev/null | |
| if [ $? -eq 0 ]; then | |
| echo " ✅ Created successfully!" | |
| else | |
| echo " ⚠️ Space may already exist or creation failed" | |
| fi | |
| done | |
| echo "" | |
| echo "✅ Done! Now you can run ./push-to-huggingface.sh to push templates" |