We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/MagnetonIO/contextfs'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
post-commit•964 B
#!/bin/bash
# ContextFS Post-Commit Hook
# Incrementally indexes new/changed files after each commit
#
# Install: cp hooks/post-commit .git/hooks/ && chmod +x .git/hooks/post-commit
# Or run: contextfs install-hooks
# Exit on error
set -e
# Check if contextfs is available
if ! command -v contextfs &> /dev/null; then
# Try common locations
if [ -f "$HOME/.local/bin/contextfs" ]; then
CONTEXTFS="$HOME/.local/bin/contextfs"
elif [ -f "$HOME/.pyenv/shims/contextfs" ]; then
CONTEXTFS="$HOME/.pyenv/shims/contextfs"
else
# Silently exit if contextfs not found
exit 0
fi
else
CONTEXTFS="contextfs"
fi
# Get the repo root
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
if [ -z "$REPO_ROOT" ]; then
exit 0
fi
# Run incremental index in background to not block commit
# Index both files and the new commit
(
cd "$REPO_ROOT"
$CONTEXTFS index --incremental --quiet 2>/dev/null &
) &
exit 0