| name | raycast-alfred-1-raycast-script-commands |
| description | Sub-skill of raycast-alfred: 1. Raycast Script Commands. |
| version | 1.0.0 |
| category | operations |
| type | reference |
| scripts_exempt | true |
1. Raycast Script Commands
1. Raycast Script Commands
#!/bin/bash
PROJECT="$1"
PROJECT_DIR="$HOME/projects/$PROJECT"
if [ -d "$PROJECT_DIR" ]; then
code "$PROJECT_DIR"
echo "Opened $PROJECT"
else
echo "Project not found: $PROJECT"
exit 1
fi
#!/bin/bash
cd "$(pwd)" || exit 1
if [ -d ".git" ]; then
echo "Branch: $(git branch --show-current)"
echo ""
echo "Status:"
git status --short
echo ""
echo "Recent commits:"
git log --oneline -5
else
echo "Not a git repository"
exit 1
fi
import uuid
import subprocess
import sys
format_type = sys.argv[1] if len(sys.argv) > 1 else "standard"
new_uuid = str(uuid.uuid4())
if format_type == "nodash":
new_uuid = new_uuid.replace("-", "")
elif format_type == "upper":
new_uuid = new_uuid.upper()
subprocess.run(["pbcopy"], input=new_uuid.encode(), check=True)
print(f"Copied: {new_uuid}")
#!/bin/bash
PORT="$1"
PID=$(lsof -ti:$PORT 2>/dev/null)
if [ -z "$PID" ]; then
echo "No process on port $PORT"
exit 0
fi
kill -9 $PID 2>/dev/null
if [ $? -eq 0 ]; then
echo "Killed process $PID on port $PORT"
else
echo "Failed to kill process on port $PORT"
exit 1
fi