Skip to main content
Glama
pre-commit602 B
#!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" # Ensure we're in the project directory GIT_ROOT=$(git rev-parse --show-toplevel) cd "$GIT_ROOT" || exit 1 # Get staged files STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -E '\.(js|jsx|ts|tsx|json|css|scss|md|yaml|yml)$' || true) if [ -n "$STAGED_FILES" ]; then echo "Formatting staged files before commit..." # Use the installed Prettier to format only the staged files ./node_modules/.bin/prettier --write --ignore-unknown $STAGED_FILES # Re-add the formatted files to the staging area git add $STAGED_FILES fi

Latest Blog Posts

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/guangxiangdebizi/email-mcp'

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