Last active
January 19, 2026 13:15
-
-
Save Vesely/8c01809beb75483abd29d357d43c2a65 to your computer and use it in GitHub Desktop.
install-rozjed-localhost.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Run Project on Localhost installer | |
| # https://gist.githubusercontent.com/Vesely/5bf2910820031dc3ee2b897b49b8ff61/raw/3f376392c94b6fd0ca1ae6a53b0ccefb0bfd3760/rozjed-localhost.md | |
| # Install: curl -fsSL GIST_RAW_URL | bash | |
| set -e | |
| # Colors (only if stdout is a TTY) | |
| if [ -t 1 ]; then | |
| GREEN='\033[32m' | |
| DIM='\033[2m' | |
| RESET='\033[0m' | |
| else | |
| GREEN='' | |
| DIM='' | |
| RESET='' | |
| fi | |
| REPO_URL="https://gist.githubusercontent.com/Vesely/5bf2910820031dc3ee2b897b49b8ff61/raw/3f376392c94b6fd0ca1ae6a53b0ccefb0bfd3760" | |
| COMMAND_FILE="rozjed-localhost.md" | |
| INSTALL_NAME="rozjed-localhost.md" | |
| INSTALLED=0 | |
| echo "Installing Rozjeď Localhost command…" | |
| echo "" | |
| # Amp Code | |
| if [ -d "$HOME/.amp" ]; then | |
| mkdir -p "$HOME/.config/amp/commands" | |
| curl -sL -o "$HOME/.config/amp/commands/$INSTALL_NAME" "$REPO_URL/$COMMAND_FILE" | |
| printf "${GREEN}✓${RESET} Amp Code Skill\n" | |
| INSTALLED=$((INSTALLED + 1)) | |
| fi | |
| # Claude Code | |
| if [ -d "$HOME/.claude" ]; then | |
| mkdir -p "$HOME/.claude/commands" | |
| curl -sL -o "$HOME/.claude/commands/$INSTALL_NAME" "$REPO_URL/$COMMAND_FILE" | |
| printf "${GREEN}✓${RESET} Claude Code Skill\n" | |
| INSTALLED=$((INSTALLED + 1)) | |
| fi | |
| # Cursor (1.6+) | |
| if [ -d "$HOME/.cursor" ]; then | |
| mkdir -p "$HOME/.cursor/commands" | |
| curl -sL -o "$HOME/.cursor/commands/$INSTALL_NAME" "$REPO_URL/$COMMAND_FILE" | |
| printf "${GREEN}✓${RESET} Cursor Command\n" | |
| INSTALLED=$((INSTALLED + 1)) | |
| fi | |
| # OpenCode | |
| if command -v opencode &> /dev/null || [ -d "$HOME/.config/opencode" ]; then | |
| mkdir -p "$HOME/.config/opencode/command" | |
| curl -sL -o "$HOME/.config/opencode/command/$INSTALL_NAME" "$REPO_URL/$COMMAND_FILE" | |
| printf "${GREEN}✓${RESET} OpenCode Command\n" | |
| INSTALLED=$((INSTALLED + 1)) | |
| fi | |
| # Windsurf - appends to global_rules.md | |
| MARKER="# Rozjeď Localhost" | |
| if [ -d "$HOME/.codeium" ] || [ -d "$HOME/Library/Application Support/Windsurf" ]; then | |
| mkdir -p "$HOME/.codeium/windsurf/memories" | |
| RULES_FILE="$HOME/.codeium/windsurf/memories/global_rules.md" | |
| if [ -f "$RULES_FILE" ] && grep -q "$MARKER" "$RULES_FILE"; then | |
| printf "${GREEN}✓${RESET} Windsurf ${DIM}(already installed)${RESET}\n" | |
| else | |
| if [ -f "$RULES_FILE" ]; then | |
| echo "" >> "$RULES_FILE" | |
| fi | |
| echo "$MARKER" >> "$RULES_FILE" | |
| echo "" >> "$RULES_FILE" | |
| curl -sL "$REPO_URL/$COMMAND_FILE" >> "$RULES_FILE" | |
| printf "${GREEN}✓${RESET} Windsurf Command\n" | |
| fi | |
| INSTALLED=$((INSTALLED + 1)) | |
| fi | |
| # Antigravity - uses SKILL.md format in skills folder | |
| if command -v agy &> /dev/null || [ -d "$HOME/.gemini/antigravity" ]; then | |
| SKILL_DIR="$HOME/.gemini/antigravity/skills/rozjed-localhost" | |
| mkdir -p "$SKILL_DIR" | |
| # Download markdown and convert frontmatter to SKILL.md format | |
| # Add name field before description, remove argument-hint | |
| curl -sL "$REPO_URL/$COMMAND_FILE" | sed 's/^description:/name: rozjed-localhost\ | |
| description:/' | grep -v "^argument-hint:" > "$SKILL_DIR/SKILL.md" | |
| printf "${GREEN}✓${RESET} Antigravity Skill\n" | |
| INSTALLED=$((INSTALLED + 1)) | |
| fi | |
| # Gemini CLI - uses TOML command format | |
| if command -v gemini &> /dev/null || [ -d "$HOME/.gemini" ]; then | |
| mkdir -p "$HOME/.gemini/commands" | |
| TOML_FILE="$HOME/.gemini/commands/rozjed-localhost.toml" | |
| # Download markdown and convert to TOML | |
| CONTENT=$(curl -sL "$REPO_URL/$COMMAND_FILE" | sed '1,/^---$/d' | sed '1,/^---$/d') | |
| cat > "$TOML_FILE" << 'TOMLEOF' | |
| description = "Detect project type (Node.js, Python) and run on localhost" | |
| prompt = """ | |
| TOMLEOF | |
| echo "$CONTENT" >> "$TOML_FILE" | |
| echo '"""' >> "$TOML_FILE" | |
| printf "${GREEN}✓${RESET} Gemini CLI Command\n" | |
| INSTALLED=$((INSTALLED + 1)) | |
| fi | |
| echo "" | |
| if [ $INSTALLED -eq 0 ]; then | |
| echo "No supported tools detected." | |
| echo "" | |
| echo "Install one of these first:" | |
| echo " • Amp Code: https://ampcode.com" | |
| echo " • Antigravity: https://antigravity.google" | |
| echo " • Claude Code: https://claude.ai/code" | |
| echo " • Cursor: https://cursor.com" | |
| echo " • Gemini CLI: https://github.com/google-gemini/gemini-cli" | |
| echo " • OpenCode: https://opencode.ai" | |
| echo " • Windsurf: https://codeium.com/windsurf" | |
| echo "" | |
| exit 1 | |
| fi | |
| echo "Done! Run /rozjed-localhost to start your project on localhost." |
Author
Vesely
commented
Jan 19, 2026
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment