
Security News
New Study Identifies 53 Slopsquatting Targets Across 5 Frontier LLMs
Five frontier LLMs generated the same nonexistent package names, leaving 53 available for potential slopsquatting across PyPI and npm.
claude-code-spy
Advanced tools
Spy on your Claude Code conversations - Real-time monitoring with AI-powered summaries and full tool visibility
A CLI tool to spy on your Claude Code conversations in real-time. View history in readable format showing both your inputs AND Claude's responses. Monitor sessions with automatic AI-powered summaries and full tool visibility.
~/.claude/history.jsonl and ~/.claude/projects/)chmod +x claude-history
chmod +x claude-history-cli.js
./claude-history --help
export PATH="$PATH:/Users/marcokotrotsos/projects/james"
cd /path/to/your/project
export OPENAI_API_KEY='sk-...' # Optional: for analysis features
./claude-history --watch
Features:
q or Ctrl+C to exitKeyboard Controls:
cd /path/to/your/project
./claude-history --current
Shows session list with timestamps and message counts.
./claude-history --session <session-id>
Shows complete conversation with all tool calls and results.
./claude-history -s "keyword" -l 10 -f
Search for keyword in last 10 entries, showing full responses.
| Command | Purpose | Example |
|---|---|---|
--help, -h | Show help message | ./claude-history --help |
--current, -c | List all sessions for current directory | ./claude-history --current |
--watch, -w | Watch session in real-time with keyboard controls | ./claude-history --watch |
--session ID | View specific session by ID | ./claude-history --session abc123 |
--archer | AI analysis of recent conversations | ./claude-history --archer |
--stats | Show usage statistics | ./claude-history --stats |
| Command | Purpose | Example |
|---|---|---|
--limit N, -l N | Limit to last N entries | ./claude-history -l 20 |
--search TERM, -s TERM | Search for entries containing TERM | ./claude-history -s "API" |
--project PATH, -p PATH | Filter by project (partial match) | ./claude-history -p myapp |
--after DATE, -a DATE | Show entries after DATE (YYYY-MM-DD) | ./claude-history -a 2025-10-25 |
--before DATE, -b DATE | Show entries before DATE | ./claude-history -b 2025-10-26 |
--reverse, -r | Show oldest entries first | ./claude-history -r |
| Command | Purpose | Example |
|---|---|---|
--full, -f | Show full conversation with Claude's responses | ./claude-history -l 5 -f |
--output-only | Show only Claude's responses (no user input) | ./claude-history -s "error" --output-only |
| Command | Purpose | Example |
|---|---|---|
--archer | Run AI analysis on recent interactions | ./claude-history --archer |
--archer-limit N | Analyze last N interactions (default: 10) | ./claude-history --archer --archer-limit 20 |
--nano | Use gpt-4-turbo instead of gpt-4o-mini | ./claude-history --archer --nano |
# Show last 10 entries (user input only)
./claude-history -l 10
# Show last 10 entries with Claude's full responses
./claude-history -l 10 -f
# Search for conversations about "database"
./claude-history -s database -f
# Search for errors and show only Claude's responses
./claude-history -s "Error\|error" --output-only
# View history for current project only
./claude-history --current
# Search within a specific project
./claude-history -p myapp -s "authentication" -f
# Search across all projects for a keyword
./claude-history -s "bug fix" -l 20
# Show all entries from today
./claude-history -a 2025-10-25
# Show entries from specific date range
./claude-history -a 2025-10-20 -b 2025-10-23
# Show last 7 days of activity
./claude-history -a 2025-10-18
# Search for "API" in last 5 entries with full responses
./claude-history -s API -l 5 -f
# Search for "deploy" in specific project, last 3 weeks
./claude-history -s deploy -p production -a 2025-10-04
cd /path/to/your/project
export OPENAI_API_KEY='sk-...' # Optional: for analysis features
./claude-history --watch
| Key | Action |
|---|---|
| 'a' | Run Archer analysis on recent conversation |
| 's' | Run Security analysis (manual security review) |
| 'd' | Show tool dependency graph with git commits |
| 'b' | Show bash command history |
| 'f' | Show file changes tracker with LOC count |
| 't' | Show time statistics (wall time, latency, timings) |
| 'h' | Show keyboard shortcuts help |
| 'q' or Ctrl+C | Exit watch mode |
claude-code-spy v2.0.17 β’ π΅οΈ Real-time monitoring
ββ Session Stats
β Messages: 42 (15 user, 27 assistant)
β Tokens: 8234 (196/msg) β’ Rate: 0 msg/min
β Tools:
β’ Bash(12) β’ Edit(8) β’ Read(5) β’ Write(2)
β
[Claude messages appear here in real-time]
[Press 'a' for Archer, 's' for Security, 'd' for dependencies, 'q' to exit]
# Use faster model for analysis
./claude-history --watch --nano
# Analyze more interactions (default: 10)
./claude-history --watch --archer-limit 20
# Watch with historical context (last 5 minutes)
./claude-history --watch --minutes-since 5
# Combine options
./claude-history --watch --nano --archer-limit 15 --minutes-since 10
The --minutes-since flag lets you expand the watch window to include historical messages from the conversation log. It looks back in log time, not real timeβso it travels backwards from the last message recorded:
# Watch with last 5 minutes of log history
./claude-history --watch --minutes-since 5
# Watch with last 30 minutes of log history
./claude-history --watch --minutes-since 30
# Watch with last hour of log history
./claude-history --watch --minutes-since 60
What it does:
--minutes-since 5, the spy travels back 5 minutes in the log from the last message and starts watching from there--minutes-since 10 shows the work from 50 minutes ago onwards (10 minutes before the last message)Examples:
# You're watching a project. Claude's last activity was 30 minutes ago.
# Start the spy now, but see the last 10 minutes of work (from 20 minutes ago):
./claude-history --watch --minutes-since 10
# Then press 'd' to see dependency graph from the last 10 minutes of the log
# Press 'b' to see bash commands from the last 10 minutes of the log
# Press 'f' to see file changes from the last 10 minutes of the log
Press 'h' anytime during watch mode to see a quick reference of all keyboard shortcuts!
# Get your OpenAI API key from https://platform.openai.com/api-keys
# Set temporarily
export OPENAI_API_KEY='sk-...'
# Or add to shell profile for persistence
echo 'export OPENAI_API_KEY="sk-..."' >> ~/.zshrc # or ~/.bashrc
Analyzes recent conversations with Claude to evaluate quality:
cd /path/to/your/project
export OPENAI_API_KEY='sk-...'
./claude-history --archer
# Analyze more interactions (default: 10)
./claude-history --archer --archer-limit 20
# Use faster model (gpt-4-turbo instead of gpt-4o-mini)
./claude-history --archer --nano
# Combine options
./claude-history --archer --archer-limit 30 --nano
| Model | Speed | Accuracy | Cost | Use Case |
|---|---|---|---|---|
gpt-4o-mini (default) | Fast | High | Low | Default choice |
gpt-4-turbo (--nano) | Very Fast | Very High | Very Low | Quick reviews |
πΉ Archer Analysis
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Analyzing session: df369f5e-71a0-44af-8cba-f934a34c7b9b
Analyzing last 10 interactions...
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ARCHER ANALYSIS
Intent Summary: You asked Claude to refactor a React component...
Response Alignment: Claude understood the request and provided...
Security Tasks: Consider adding input validation and error handling...
Potential Misalignments: One suggestion could be improved...
Overall Assessment: Very helpful conversation with minor notes...
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Model: gpt-4o-mini | Tokens used: 234
Manual security-focused evaluation of Claude's implementations to identify:
Press 's' during watch mode to run security analysis:
cd /path/to/your/project
./claude-history --watch
# Press 's' to trigger security analysis
π Security Analysis
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Analyzing recent interactions...
CRITICAL: Missing input validation on user-facing API endpoint
WARNING: Error messages may leak sensitive information
WARNING: Consider adding rate limiting for production
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Shows every bash command executed during the session in order:
Press 'b' during watch mode
Bash Command History
5 commands executed
1. git add .
2. git commit -m "feat: add feature"
3. npm version patch
4. npm publish
5. git push && git push --tags
This helps you quickly copy/review commands or understand your workflow.
Tracks all file edits with line count estimates and warns about large changes. Press 'f' to cycle through three views:
Shows all modified files with edit count and LOC for the last edit:
Press 'f' during watch mode
File Changes Tracker
3 files modified
claude-history-cli.js (5 edits, ~120 LOC)
README-claude-history.md (3 edits, ~45 LOC)
package.json (1 edit, ~2 LOC) β HIGH
Press 'f' again to see top 10 files by total LOC
Shows the top 10 files by total lines added, with edit counts and visual bars:
Press 'f' again in the tracker view
Top 10 Files by Total LOC
3 files edited in total
1. claude-history-cli.js
5x edits β’ 1240 LOC ββββββββββββββββββββ
2. README-claude-history.md
3x edits β’ 450 LOC ββββββββββ
3. package.json
1x edits β’ 25 LOC β
Press 'f' again to see largest files by size
Shows the top 10 largest files in the entire project folder with their actual line counts:
Press 'f' again in the summary view
Top 10 Largest Files in Project
247 total files
1. claude-history-cli.js
1512 LOC β’ 89.6 KB β’ 5x edits (+1240 LOC)
2. README-claude-history.md
856 LOC β’ 23.0 KB β’ 3x edits (+450 LOC)
3. dist/bundle.js
3847 LOC β’ 156.8 KB
4. package.json
45 LOC β’ 920 B β’ 1x edits (+25 LOC)
Press 'f' again to see detailed tracker
Displays comprehensive timing metrics for your session including wall time, response latency, and tool execution estimates:
Press 't' during watch mode
Time Statistics
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Session Duration
Wall Time: 5m 23s
Responses: 12
Avg Latency: 3.45s
Tool Execution Time
Edit: 5x (~0.100s each)
Read: 3x (~0.100s each)
Bash: 2x (~0.100s each)
Total: 1.00s
Response Latency Breakdown
Fastest: 1.23s
Slowest: 5.67s
Average: 3.45s
Useful for understanding:
Shows the complete sequence of tools used since watch started as a visual ASCII tree:
Press 'd' during watch mode to view the dependency graph:
cd /path/to/your/project
./claude-history --watch
# Press 'd' to show tool dependency graph
Started: 2025-10-25 14:32:15 β’ Tokens: 2,567 β’ Errors: 1
ββ Tool Flow
β
ββ Read: package.json
β β
ββ Bash: git add . && git commit -m "update"
β β
ββ Edit: claude-history-cli.js [ERROR]
β β
ββ Bash: npm version patch
β β
ββ Write: README.md
Recent commits:
a1b2c3d feat: add feature
d4e5f6g fix: bug fix
Shows the complete sequence of tool calls since watch started in the order they were executed. Features:
Read: package.json)cd /path/to/your/project
./claude-history --current
Shows all sessions with:
./claude-history --session <session-id>
Shows complete conversation with:
Claude:
[Tool: Grep]
{
"pattern": "category|LLM",
"output_mode": "files_with_matches",
"glob": "*.py"
}
Tool Result:
Found 4 files matching pattern
/path/to/main.py
/path/to/classifier.py
./claude-history --stats
Shows:
# Stats for current month
./claude-history --stats -a 2025-10-01
# Stats for specific date range
./claude-history --stats -a 2025-10-15 -b 2025-10-25
Claude Code stores history in two locations:
~/.claude/history.jsonl
~/.claude/projects/<encoded-path>/*.jsonl
Project paths are encoded in the projects directory:
/Users/name/projects/app β ~/.claude/projects/-Users-name-projects-app/
Pattern: - + path segments joined with -
Watch mode estimates tokens burned during your session:
Issue: No sessions found
./claude-history --current to see available sessions~/.claude/projects/ existsIssue: Search not finding results
-s "pattern|Pattern"-s term -a 2025-10-25Issue: Archer analysis fails
echo $OPENAI_API_KEY| Key | Action |
|---|---|
q | Exit watch mode |
Ctrl+C | Exit any command |
claude-history-cli.js - Main CLI applicationclaude-history - Shell wrapper script for convenience-f flag tries to match user inputs to transcripts (may not always find exact response)--session to view complete conversations~/.zshrc or ~/.bashrc for persistence--stats to track Claude usage patternsv2.0.17 - Watch mode with real-time monitoring, Archer analysis, Security analysis, Tool dependency graph, and full tool visibility
FAQs
Spy on your Claude Code conversations - Real-time monitoring with AI-powered summaries and full tool visibility
The npm package claude-code-spy receives a total of 1 weekly downloads. As such, claude-code-spy popularity was classified as not popular.
We found that claude-code-spy demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Β It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Five frontier LLMs generated the same nonexistent package names, leaving 53 available for potential slopsquatting across PyPI and npm.

Security News
The White Houseβs Gold Eagle Initiative aims to coordinate AI-discovered vulnerabilities, validate findings, and accelerate patching across critical software.

Security News
A Shai-Hulud infection exposed Suno's source code, which shows the AI music startup stream-ripped tracks to train its models.