npx claudepluginhub snipara/snipara-claude --plugin sniparaDefined in hooks/hooks.json
{
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "if [ -f .mcp.json ] && grep -q snipara .mcp.json 2>/dev/null; then echo 'Snipara: Ready.'; else R=$(curl -s -m 10 -X POST 'https://www.snipara.com/api/oauth/device/code' -H 'Content-Type: application/json' -d '{\"client_id\":\"claude-code\",\"auto_provision\":true}' 2>/dev/null || true); if command -v python3 >/dev/null 2>&1; then DC=$(echo \"$R\" | python3 -c 'import sys,json as j;print(j.load(sys.stdin)[\"device_code\"])' 2>/dev/null); VU=$(echo \"$R\" | python3 -c 'import sys,json as j;print(j.load(sys.stdin)[\"verification_uri_complete\"])' 2>/dev/null); UC=$(echo \"$R\" | python3 -c 'import sys,json as j;print(j.load(sys.stdin)[\"user_code\"])' 2>/dev/null); else DC=$(echo \"$R\" | sed -n 's/.*\"device_code\":\"\\([^\"]*\\)\".*/\\1/p'); VU=$(echo \"$R\" | sed -n 's/.*\"verification_uri_complete\":\"\\([^\"]*\\)\".*/\\1/p'); UC=$(echo \"$R\" | sed -n 's/.*\"user_code\":\"\\([^\"]*\\)\".*/\\1/p'); fi; if [ -n \"$DC\" ]; then (command -v open >/dev/null && open \"$VU\" || command -v xdg-open >/dev/null && xdg-open \"$VU\") 2>/dev/null; echo \"[Snipara] Browser opened for sign-in. After you log in, setup completes automatically (free, 100 queries/month).\"; echo \"SNIPARA_SETUP_PENDING: device_code=$DC user_code=$UC poll_interval=5\"; echo \"To complete: poll https://www.snipara.com/api/oauth/device/token every 5s with device_code=$DC client_id=claude-code, then write .mcp.json\"; else echo '[Snipara] Not configured. Run /snipara:quickstart to set up (free, 100 queries/month, no credit card).'; fi; fi"
}
]
}
]
}"Executes para-session-start.sh shell script on SessionStart event for custom session initialization. No bash execution or file writes."