-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclaude-history
More file actions
executable file
·34 lines (28 loc) · 1.17 KB
/
claude-history
File metadata and controls
executable file
·34 lines (28 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
# Claude Code Spy - Real-time Claude Code monitoring with AI summaries
# A simple wrapper script for the claude-history-cli.js tool
# Get the directory where this script is actually located (follow symlinks)
SCRIPT_DIR="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)"
CLI_SCRIPT="$SCRIPT_DIR/claude-history-cli.js"
# Try alternative locations if not found
if [ ! -f "$CLI_SCRIPT" ]; then
# Check if we're in node_modules/.bin
if [ -f "$SCRIPT_DIR/../claude-code-spy/claude-history-cli.js" ]; then
CLI_SCRIPT="$SCRIPT_DIR/../claude-code-spy/claude-history-cli.js"
elif [ -f "$SCRIPT_DIR/../../../claude-code-spy/claude-history-cli.js" ]; then
CLI_SCRIPT="$SCRIPT_DIR/../../../claude-code-spy/claude-history-cli.js"
fi
fi
# Check if Node.js is installed
if ! command -v node &> /dev/null; then
echo "Error: Node.js is not installed. Please install Node.js to use this tool."
exit 1
fi
# Check if the CLI script exists
if [ ! -f "$CLI_SCRIPT" ]; then
echo "Error: claude-history-cli.js not found"
echo "Tried: $SCRIPT_DIR/claude-history-cli.js"
exit 1
fi
# Run the CLI with all passed arguments
node "$CLI_SCRIPT" "$@"