Download script/hooks from SaylorTwift/opencode: direct link, hf CLI and curl.
- Browser
- Download file 338 Bytes
-
https://huggingface.co/SaylorTwift/opencode/resolve/main/script/hooks
- Command line
-
hf download hf://SaylorTwift/opencode/script/hooks
-
curl -L -o hooks https://huggingface.co/SaylorTwift/opencode/resolve/main/script/hooks
338 Bytes
| if [ ! -d ".git" ]; then | |
| exit 0 | |
| fi | |
| mkdir -p .git/hooks | |
| cat > .git/hooks/pre-push << 'EOF' | |
| #!/bin/sh | |
| # Ensure dependencies are installed before typecheck | |
| if command -v bun >/dev/null 2>&1; then | |
| bun install >/dev/null 2>&1 || true | |
| fi | |
| bun run typecheck | |
| EOF | |
| chmod +x .git/hooks/pre-push | |
| echo "✅ Pre-push hook installed" | |