Files
cline/sdk/examples/hooks/PreToolUse.sh
T
Renee Huang e215d3d91c chore: rename example folders; fix references (#60)
* rename folders

* fix examples reorg references

* move over files

* having agent fixing and validating all examples are still working

* fix sidecar paths

---------

Co-authored-by: abeatrix <beatrix@cline.bot>
2026-05-07 20:38:04 -07:00

17 lines
516 B
Bash
Executable File

#!/usr/bin/env bash
# Cline Hook: PreToolUse
# Logs every tool call before it executes
# Copy to ~/.cline/hooks/PreToolUse.sh and chmod +x
input=$(cat)
tool=$(echo "$input" | jq -r '.tool_call.name // "unknown"')
args=$(echo "$input" | jq -r '.preToolUse.parameters | to_entries | map("\(.key)=\(.value)") | join(", ")' 2>/dev/null || echo "")
echo "🔧 Tool: $tool" >&2
if [ -n "$args" ] && [ "$args" != "null" ]; then
echo " Args: $args" >&2
fi
# Return empty object to allow the call to proceed
echo '{}'