Skip to main content
Glama

DollhouseMCP

by DollhouseMCP
post-checkout.backupโ€ข12.5 kB
#!/bin/bash # GitFlow Guardian - Post-checkout Hook # Provides helpful reminders when switching branches # Get the directory where this hook is located HOOK_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # Load configuration if it exists CONFIG_FILE="$HOOK_DIR/config" if [ -f "$CONFIG_FILE" ]; then source "$CONFIG_FILE" else # Default configuration USE_COLORS=true SHOW_CHECKOUT_MESSAGES=true MAX_DISPLAY_LENGTH=50 fi # Exit early if messages are disabled if [ "$SHOW_CHECKOUT_MESSAGES" != "true" ]; then exit 0 fi # Colors (only if enabled) if [ "$USE_COLORS" = "true" ]; then RED='\033[0;31m' YELLOW='\033[1;33m' GREEN='\033[0;32m' BLUE='\033[0;34m' CYAN='\033[0;36m' NC='\033[0m' else RED='' YELLOW='' GREEN='' BLUE='' CYAN='' NC='' fi # Get the branch we just switched to BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null) # Check if this is actually a branch switch (not a file checkout) # $3 is 1 for branch checkout, 0 for file checkout if [ "$3" != "1" ]; then exit 0 fi # Provide helpful messages based on branch case "$BRANCH" in main|master) echo -e "${RED}โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—${NC}" echo -e "${RED}โ•‘ ๐Ÿ“ You are now on the MAIN branch โ•‘${NC}" echo -e "${RED}โ• โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฃ${NC}" echo -e "${RED}โ•‘ โ•‘${NC}" echo -e "${RED}โ•‘ โš ๏ธ This is the PRODUCTION branch! โ•‘${NC}" echo -e "${RED}โ•‘ โ•‘${NC}" echo -e "${RED}โ•‘ Remember: โ•‘${NC}" echo -e "${RED}โ•‘ โ€ข DO NOT commit directly here โ•‘${NC}" echo -e "${RED}โ•‘ โ€ข Only merge from release/* or hotfix/* branches โ•‘${NC}" echo -e "${RED}โ•‘ โ€ข All changes should go through pull requests โ•‘${NC}" echo -e "${RED}โ•‘ โ•‘${NC}" echo -e "${RED}โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•${NC}" ;; develop) echo -e "${YELLOW}โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—${NC}" echo -e "${YELLOW}โ•‘ ๐Ÿ“ You are now on the DEVELOP branch โ•‘${NC}" echo -e "${YELLOW}โ• โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฃ${NC}" echo -e "${YELLOW}โ•‘ โ•‘${NC}" echo -e "${YELLOW}โ•‘ This is the integration branch for new features. โ•‘${NC}" echo -e "${YELLOW}โ•‘ โ•‘${NC}" echo -e "${YELLOW}โ•‘ Remember: โ•‘${NC}" echo -e "${YELLOW}โ•‘ โ€ข Create feature branches for new work: โ•‘${NC}" echo -e "${YELLOW}โ•‘ ${GREEN}git checkout -b feature/your-feature${YELLOW} โ•‘${NC}" echo -e "${YELLOW}โ•‘ โ€ข Don't commit directly unless it's a merge โ•‘${NC}" echo -e "${YELLOW}โ•‘ โ€ข Keep this branch stable for other developers โ•‘${NC}" echo -e "${YELLOW}โ•‘ โ•‘${NC}" echo -e "${YELLOW}โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•${NC}" ;; feature/*) # Truncate long branch names to fit in the box if [ ${#BRANCH} -gt $MAX_DISPLAY_LENGTH ]; then TRUNCATE_LENGTH=$((MAX_DISPLAY_LENGTH - 3)) DISPLAY_BRANCH="${BRANCH:0:$TRUNCATE_LENGTH}..." else DISPLAY_BRANCH="$BRANCH" fi echo -e "${GREEN}โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—${NC}" echo -e "${GREEN}โ•‘ โœ… You are on a FEATURE branch โ•‘${NC}" echo -e "${GREEN}โ• โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฃ${NC}" echo -e "${GREEN}โ•‘ โ•‘${NC}" echo -e "${GREEN}โ•‘ Branch: ${CYAN}$DISPLAY_BRANCH${GREEN}${NC}" echo -e "${GREEN}โ•‘ โ•‘${NC}" echo -e "${GREEN}โ•‘ You can safely commit and experiment here! โ•‘${NC}" echo -e "${GREEN}โ•‘ โ•‘${NC}" echo -e "${GREEN}โ•‘ When ready: โ•‘${NC}" echo -e "${GREEN}โ•‘ 1. Push your branch: ${CYAN}git push -u origin $BRANCH${GREEN} โ•‘${NC}" echo -e "${GREEN}โ•‘ 2. Create a PR: ${CYAN}gh pr create${GREEN} โ•‘${NC}" echo -e "${GREEN}โ•‘ โ•‘${NC}" echo -e "${GREEN}โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•${NC}" ;; fix/*|bugfix/*) # Truncate long branch names to fit in the box if [ ${#BRANCH} -gt $MAX_DISPLAY_LENGTH ]; then TRUNCATE_LENGTH=$((MAX_DISPLAY_LENGTH - 3)) DISPLAY_BRANCH="${BRANCH:0:$TRUNCATE_LENGTH}..." else DISPLAY_BRANCH="$BRANCH" fi echo -e "${BLUE}โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—${NC}" echo -e "${BLUE}โ•‘ ๐Ÿ”ง You are on a FIX branch โ•‘${NC}" echo -e "${BLUE}โ• โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฃ${NC}" echo -e "${BLUE}โ•‘ โ•‘${NC}" echo -e "${BLUE}โ•‘ Branch: ${CYAN}$DISPLAY_BRANCH${BLUE}${NC}" echo -e "${BLUE}โ•‘ โ•‘${NC}" echo -e "${BLUE}โ•‘ Good practices for fixes: โ•‘${NC}" echo -e "${BLUE}โ•‘ โ€ข Keep changes focused on the specific bug โ•‘${NC}" echo -e "${BLUE}โ•‘ โ€ข Add tests to prevent regression โ•‘${NC}" echo -e "${BLUE}โ•‘ โ€ข Update documentation if needed โ•‘${NC}" echo -e "${BLUE}โ•‘ โ•‘${NC}" echo -e "${BLUE}โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•${NC}" ;; hotfix/*) # Truncate long branch names to fit in the box if [ ${#BRANCH} -gt $MAX_DISPLAY_LENGTH ]; then TRUNCATE_LENGTH=$((MAX_DISPLAY_LENGTH - 3)) DISPLAY_BRANCH="${BRANCH:0:$TRUNCATE_LENGTH}..." else DISPLAY_BRANCH="$BRANCH" fi echo -e "${RED}โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—${NC}" echo -e "${RED}โ•‘ ๐Ÿšจ You are on a HOTFIX branch โ•‘${NC}" echo -e "${RED}โ• โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฃ${NC}" echo -e "${RED}โ•‘ โ•‘${NC}" echo -e "${RED}โ•‘ Branch: ${CYAN}$DISPLAY_BRANCH${RED}${NC}" echo -e "${RED}โ•‘ โ•‘${NC}" echo -e "${RED}โ•‘ This is for URGENT production fixes only! โ•‘${NC}" echo -e "${RED}โ•‘ โ•‘${NC}" echo -e "${RED}โ•‘ Remember to: โ•‘${NC}" echo -e "${RED}โ•‘ โ€ข Fix ONLY the critical issue โ•‘${NC}" echo -e "${RED}โ•‘ โ€ข Test thoroughly โ•‘${NC}" echo -e "${RED}โ•‘ โ€ข Merge to both main AND develop โ•‘${NC}" echo -e "${RED}โ•‘ โ•‘${NC}" echo -e "${RED}โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•${NC}" ;; release/*) # Truncate long branch names to fit in the box if [ ${#BRANCH} -gt $MAX_DISPLAY_LENGTH ]; then TRUNCATE_LENGTH=$((MAX_DISPLAY_LENGTH - 3)) DISPLAY_BRANCH="${BRANCH:0:$TRUNCATE_LENGTH}..." else DISPLAY_BRANCH="$BRANCH" fi echo -e "${CYAN}โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—${NC}" echo -e "${CYAN}โ•‘ ๐Ÿ“ฆ You are on a RELEASE branch โ•‘${NC}" echo -e "${CYAN}โ• โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฃ${NC}" echo -e "${CYAN}โ•‘ โ•‘${NC}" echo -e "${CYAN}โ•‘ Branch: ${CYAN}$DISPLAY_BRANCH${CYAN}${NC}" echo -e "${CYAN}โ•‘ โ•‘${NC}" echo -e "${CYAN}โ•‘ Only bug fixes and release prep allowed here! โ•‘${NC}" echo -e "${CYAN}โ•‘ โ•‘${NC}" echo -e "${CYAN}โ•‘ No new features! โ•‘${NC}" echo -e "${CYAN}โ•‘ โ•‘${NC}" echo -e "${CYAN}โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•${NC}" ;; esac # Show current status echo "" git status -sb

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DollhouseMCP/DollhouseMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server