You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Search with LSP enrichment
probe search "authenticate" src/ --lsp
# Filter by symbol type
probe search "handler" --lsp --symbol-type function
# Include call hierarchy statistics
probe search "calculate" --lsp --include-call-info --max-results 20
LSP Daemon Commands
probe lsp status
Display daemon status and workspace information.
probe lsp status [OPTIONS]
Options
Option
Type
Default
Description
--detailed
Flag
false
Show detailed server and cache statistics
--memory
Flag
false
Include memory usage information
--json
Flag
false
Output in JSON format
--refresh
Flag
false
Force refresh of cached status
Examples
# Basic status
probe lsp status
# Detailed status with memory info
probe lsp status --detailed --memory
# JSON output for scripts
probe lsp status --json
Probe provides direct access to all LSP operations through the probe lsp call command family, offering IDE-level code intelligence from the command line.
probe lsp call definition
Find the definition of a symbol.
probe lsp call definition <LOCATION> [OPTIONS]
Arguments
Argument
Required
Description
<LOCATION>
Yes
Location in format file:line:column or file#symbol
Options
Option
Type
Default
Description
--output <FORMAT>
String
text
Output format: text, json
--workspace-hint <PATH>
String
Auto
Workspace root hint for context
Examples
# Find definition by line:column
probe lsp call definition src/main.rs:42:10
# Find definition by symbol name
probe lsp call definition src/main.rs#main_function
# JSON output
probe lsp call definition src/auth.rs#authenticate --output json
probe lsp call references
Find all references to a symbol.
probe lsp call references <LOCATION> [OPTIONS]
Arguments
Argument
Required
Description
<LOCATION>
Yes
Location in format file:line:column or file#symbol
Options
Option
Type
Default
Description
--include-declaration
Flag
false
Include the declaration/definition in results
--output <FORMAT>
String
text
Output format: text, json
--workspace-hint <PATH>
String
Auto
Workspace root hint for context
Examples
# Find references without declaration
probe lsp call references src/api.rs:25:8
# Include declaration in results
probe lsp call references src/auth.rs#validate_user --include-declaration
# JSON output for scripting
probe lsp call references src/types.rs#UserAccount --output json
probe lsp call hover
Get hover information (documentation, types) for a symbol.
probe lsp call hover <LOCATION> [OPTIONS]
Arguments
Argument
Required
Description
<LOCATION>
Yes
Location in format file:line:column or file#symbol
Options
Option
Type
Default
Description
--output <FORMAT>
String
text
Output format: text, json, markdown
--workspace-hint <PATH>
String
Auto
Workspace root hint for context
Examples
# Get hover information
probe lsp call hover src/lib.rs:18:5
# Get hover by symbol name
probe lsp call hover src/types.rs#UserAccount
# Markdown format for documentation
probe lsp call hover src/api.rs#process_request --output markdown
probe lsp call document-symbols
List all symbols in a document.
probe lsp call document-symbols <FILE> [OPTIONS]
Arguments
Argument
Required
Description
<FILE>
Yes
File path to analyze
Options
Option
Type
Default
Description
--output <FORMAT>
String
text
Output format: text, json, tree
--symbol-type <TYPE>
String
All
Filter by symbol type
--workspace-hint <PATH>
String
Auto
Workspace root hint for context
Examples
# List all symbols in file
probe lsp call document-symbols src/lib.rs
# Filter by symbol type
probe lsp call document-symbols src/main.rs --symbol-type function
# Tree view output
probe lsp call document-symbols src/types.rs --output tree
Location in format file:line:column or file#symbol
Options
Option
Type
Default
Description
--output <FORMAT>
String
text
Output format: text, json
--workspace-hint <PATH>
String
Auto
Workspace root hint for context
Examples
# Find type definition
probe lsp call type-definition src/main.rs:42:10
# Type definition by symbol
probe lsp call type-definition src/types.rs#user_variable
Cache Management
The LSP daemon provides comprehensive cache management commands for the persistent cache system.
Workspace Cache Commands
probe lsp cache list
List all workspace caches.
probe lsp cache list [OPTIONS]
Options
Option
Type
Default
Description
--detailed
Flag
false
Show detailed information for each workspace cache
--format <FORMAT>
String
terminal
Output format: terminal, json
Examples
# List all workspace caches
probe lsp cache list
# Detailed view
probe lsp cache list --detailed
# JSON output
probe lsp cache list --format json
probe lsp cache info
Show detailed information about workspace caches.
probe lsp cache info [OPTIONS]
Options
Option
Type
Default
Description
--workspace <PATH>
String
All
Workspace path to get info for
--format <FORMAT>
String
terminal
Output format: terminal, json
Examples
# Info for all workspaces
probe lsp cache info
# Info for specific workspace
probe lsp cache info --workspace /path/to/project
# JSON format
probe lsp cache info --format json
probe lsp cache clear-workspace
Clear workspace caches.
probe lsp cache clear-workspace [OPTIONS]
Options
Option
Type
Default
Description
--workspace <PATH>
String
All
Workspace path to clear (all if not specified)
--force
Flag
false
Force clear without confirmation
--format <FORMAT>
String
terminal
Output format: terminal, json
Examples
# Clear specific workspace cache
probe lsp cache clear-workspace --workspace /path/to/project
# Clear all workspace caches with confirmation
probe lsp cache clear-workspace
# Force clear without confirmation
probe lsp cache clear-workspace --force
Global Cache Commands
probe lsp cache stats
Display detailed cache performance statistics and information.
probe lsp cache stats [OPTIONS]
Options
Option
Type
Default
Description
--detailed
Flag
false
Show detailed statistics including file breakdown
--git-info
Flag
false
Include git-related cache information
--json
Flag
false
Output in JSON format
--operation <TYPE>
String
All
Show stats for specific operation type
Examples
# Basic cache statistics
probe lsp cache stats
# Detailed view with git information
probe lsp cache stats --detailed --git-info
# JSON output for programmatic use
probe lsp cache stats --json
# Statistics for specific operation
probe lsp cache stats --operation CallHierarchy
Sample Output
$ probe lsp cache stats --detailed
=== LSP Cache Statistics ===
Performance Overview:
Cache Hit Rate: 89.3% (4,127 hits / 4,622 requests)
Average Response Time: 2.1ms
Total Cache Size: 1,847 entries
Memory Usage: 127 MB
Layer Performance:
L1 (Memory): 78% hit rate, <1ms avg
L2 (Persistent): 11% hit rate, 3ms avg
L3 (LSP Server): 11% miss rate, 487ms avg
Persistent Cache:
Database Size: 245 MB
Total Files Tracked: 1,203
Git Commits Tracked: 47
Oldest Entry: 12 days ago
Cleanup Due: In 18 days
Operation Breakdown:
CallHierarchy: 2,341 entries (87% hit rate)
Definition: 1,204 entries (92% hit rate)
References: 892 entries (85% hit rate)
Hover: 410 entries (94% hit rate)
Recent Performance (last hour):
Requests: 234
Cache Hits: 198 (84.6%)
Average Response: 1.8ms
Peak Memory: 142 MB
probe lsp cache clear
Clear cache data with fine-grained control options.
probe lsp cache clear [OPTIONS]
Options
Option
Type
Default
Description
--operation <TYPE>
String
All
Clear specific operation type
--file <PATH>
String
All
Clear cache for specific file
--branch <BRANCH>
String
All
Clear cache for specific git branch
--older-than <DAYS>
Integer
All
Clear entries older than N days
--memory-only
Flag
false
Clear only in-memory cache
--persistent-only
Flag
false
Clear only persistent cache
--dry-run
Flag
false
Show what would be cleared
--force
Flag
false
Skip confirmation prompts
Operation Types
CallHierarchy - Call hierarchy information
Definition - Go-to-definition data
References - Find references data
Hover - Hover information
WorkspaceSymbols - Workspace symbol data
Examples
# Clear all cache data
probe lsp cache clear
# Clear specific operation type
probe lsp cache clear --operation CallHierarchy
# Clear cache for specific file
probe lsp cache clear --file src/main.rs
# Clear old entries (older than 30 days)
probe lsp cache clear --older-than 30
# Clear git branch-specific cache
probe lsp cache clear --branch feature/new-api
# Clear only memory cache (keep persistent)
probe lsp cache clear --memory-only
# Dry run to see what would be cleared
probe lsp cache clear --older-than 7 --dry-run
# Force clear without confirmation
probe lsp cache clear --force
probe lsp cache export
Export cache data for sharing or backup purposes.
probe lsp cache export<OUTPUT_FILE> [OPTIONS]
Arguments
Argument
Required
Description
<OUTPUT_FILE>
Yes
Output file path (will be compressed)
Options
Option
Type
Default
Description
--operation <TYPE>
String
All
Export specific operation type
--include-git-metadata
Flag
false
Include git branch/commit info
--compression-level <N>
Integer
6
Gzip compression level (0-9)
--format <FORMAT>
String
binary
Export format: binary, json
--filter-branch <BRANCH>
String
All
Export only specific branch
--newer-than <DAYS>
Integer
All
Export entries newer than N days
Examples
# Export entire cache
probe lsp cache export team-cache.gz
# Export with git metadata
probe lsp cache export full-cache.gz --include-git-metadata
# Export specific operation type
probe lsp cache export call-hierarchy.gz --operation CallHierarchy
# Export in JSON format
probe lsp cache export cache-backup.json.gz --format json
# Export recent entries only
probe lsp cache export recent-cache.gz --newer-than 7
# Export specific branch cache
probe lsp cache export feature-cache.gz --filter-branch feature/new-api
probe lsp cache import
Import previously exported cache data.
probe lsp cache import <INPUT_FILE> [OPTIONS]
Arguments
Argument
Required
Description
<INPUT_FILE>
Yes
Input cache file path
Options
Option
Type
Default
Description
--merge
Flag
true
Merge with existing cache
--replace
Flag
false
Replace existing cache
--filter-operation <TYPE>
String
All
Import only specific operation type
--validate
Flag
true
Validate cache integrity
--dry-run
Flag
false
Show what would be imported
--skip-git-check
Flag
false
Skip git compatibility checks
Examples
# Import shared team cache
probe lsp cache import team-cache.gz
# Replace existing cache completely
probe lsp cache import backup.gz --replace
# Import only call hierarchy data
probe lsp cache import cache.gz --filter-operation CallHierarchy
# Dry run to validate import
probe lsp cache import cache.gz --dry-run
# Import without git validation
probe lsp cache import external-cache.gz --skip-git-check
probe lsp cache compact
Optimize persistent cache database storage.
probe lsp cache compact [OPTIONS]
Options
Option
Type
Default
Description
--aggressive
Flag
false
Perform aggressive compaction
--vacuum
Flag
true
Reclaim unused space
--defragment
Flag
false
Defragment database files
--backup
Flag
true
Create backup before compaction
Examples
# Standard compaction
probe lsp cache compact
# Aggressive compaction with defragmentation
probe lsp cache compact --aggressive --defragment
# Compact without backup (faster)
probe lsp cache compact --no-backup
# Initialize all workspaces in current directory
probe lsp init-workspaces .# Recursive initialization
probe lsp init-workspaces /home/user/projects --recursive
# Initialize only specific languages
probe lsp init-workspaces . --languages rust,typescript,python
# Dry run to see what would be initialized
probe lsp init-workspaces . --recursive --dry-run
# Sequential initialization for debugging
probe lsp init-workspaces . --recursive --no-parallel --timeout 60
# Force re-initialization
probe lsp init-workspaces . --force
Sample Output
$ probe lsp init-workspaces . --recursive
Discovering workspaces in: /home/user/projects
Scanning recursively...
Found 5 workspaces:
✓ /home/user/projects/rust-app (Rust)
✓ /home/user/projects/web-frontend (TypeScript)
✓ /home/user/projects/api-server (Rust)
✓ /home/user/projects/scripts (Python)
✓ /home/user/projects/mobile-app (TypeScript)
Initializing language servers...
✓ rust-analyzer for /home/user/projects/rust-app (3.2s)
✓ typescript-language-server for /home/user/projects/web-frontend (2.1s)
✓ rust-analyzer for /home/user/projects/api-server (1.8s)
✓ pylsp for /home/user/projects/scripts (1.5s)
✓ typescript-language-server for /home/user/projects/mobile-app (2.3s)
Summary:
Initialized: 5 workspaces
Languages: rust (2), typescript (2), python (1)
Total time: 4.2s
Errors: 0
probe lsp workspaces
List and manage registered workspaces.
probe lsp workspaces [SUBCOMMAND] [OPTIONS]
Subcommands
Subcommand
Description
list
List all registered workspaces (default)
add <PATH> <LANGUAGE>
Manually add a workspace
remove <PATH>
Remove a workspace
refresh <PATH>
Refresh workspace state
Options for list
Option
Type
Default
Description
--language <LANG>
String
All
Filter by language
--status <STATUS>
String
All
Filter by status
--json
Flag
false
JSON output
--detailed
Flag
false
Show detailed information
Examples
# List all workspaces
probe lsp workspaces list
# List only Rust workspaces
probe lsp workspaces list --language rust
# Detailed workspace information
probe lsp workspaces list --detailed
# Add workspace manually
probe lsp workspaces add /path/to/project rust
# Remove workspace
probe lsp workspaces remove /path/to/project
# Refresh workspace state
probe lsp workspaces refresh /path/to/project
Logging and Monitoring
probe lsp logs
View and follow LSP daemon logs.
probe lsp logs [OPTIONS]
Options
Option
Type
Default
Description
-n, --lines <N>
Integer
50
Number of recent log entries
-f, --follow
Flag
false
Follow logs in real-time
--level <LEVEL>
String
All
Filter by log level
--grep <PATTERN>
String
None
Filter by regex pattern
--since <TIME>
String
None
Show logs since timestamp
--json
Flag
false
Output in JSON format
--no-color
Flag
false
Disable colored output
Log Levels
error - Error conditions
warn - Warning messages
info - Informational messages
debug - Debug information
trace - Detailed tracing
Examples
# View recent logs
probe lsp logs
# Follow logs in real-time
probe lsp logs --follow
# View only errors
probe lsp logs --level error -n 100
# Filter by pattern
probe lsp logs --grep "rust-analyzer" -n 200
# Logs since specific time
probe lsp logs --since "2024-01-01 10:00:00"# JSON output for processing
probe lsp logs --json -n 1000 | jq '.[] | select(.level == "error")'
Sample Output
$ probe lsp logs -n 10
2024-01-15 14:30:15.123 INFO [lsp_daemon] Starting LSP daemon on socket /tmp/probe-lsp-daemon.sock
2024-01-15 14:30:15.124 INFO [server_manager] Registered rust-analyzer for language Rust
2024-01-15 14:30:15.125 INFO [server_manager] Registered typescript-language-server for language TypeScript
2024-01-15 14:30:16.200 INFO [workspace_resolver] Discovered workspace: /home/user/rust-project (Rust)
2024-01-15 14:30:17.156 INFO [call_graph_cache] Cache HIT for calculate_total at src/main.rs:42:8
2024-01-15 14:30:18.203 DEBUG [lsp_protocol] Incoming call hierarchy request for src/auth.rs:15:4
2024-01-15 14:30:18.204 DEBUG [lsp_protocol] Outgoing: prepareCallHierarchy request to rust-analyzer
2024-01-15 14:30:18.267 DEBUG [lsp_protocol] Incoming: prepareCallHierarchy response from rust-analyzer
2024-01-15 14:30:18.268 INFO [call_graph_cache] Cache MISS for authenticate at src/auth.rs:15:4
2024-01-15 14:30:18.345 INFO [call_graph_cache] Cached call hierarchy for authenticate (45 nodes)
Start indexing a workspace with language-specific processing pipelines.
probe lsp index [OPTIONS]
Arguments & Options
Option
Type
Default
Description
--workspace <PATH>
String
.
Workspace path to index
--languages <LIST>
String
All
Comma-separated language list
--recursive
Flag
false
Index nested workspaces recursively
--max-workers <N>
Integer
CPU count
Maximum worker threads
--memory-budget <MB>
Integer
512
Memory budget in MB
--format <FORMAT>
String
terminal
Output format: terminal, json
--progress
Flag
true
Show progress bar
--wait
Flag
false
Wait for completion before returning
Examples
# Index current workspace with all languages
probe lsp index
# Index specific languages only
probe lsp index --languages rust,typescript,python
# Recursive indexing with custom settings
probe lsp index --recursive --max-workers 16 --memory-budget 2048
# Index and wait for completion
probe lsp index --wait --progress
# JSON output for scripting
probe lsp index --format json --languages go
# Show current config
probe lsp index-config show
# Set performance options
probe lsp index-config set --max-workers 20 --memory-budget 4096
# Set file patterns
probe lsp index-config set --exclude "*.log,target/*,node_modules/*"# Enable incremental mode
probe lsp index-config set --incremental true# Reset to defaults
probe lsp index-config reset
Cache Management
probe lsp cache
Manage LSP caches with content-addressed storage.
probe lsp cache <SUBCOMMAND> [OPTIONS]
Subcommands
Subcommand
Description
stats
Show comprehensive cache statistics
clear
Clear cache entries with optional filtering
export
Export cache contents to JSON
list
List all workspace caches
info
Show detailed workspace cache information
clear-workspace
Clear workspace-specific caches
Note: Cache uses content-addressed storage with MD5 hashing for automatic invalidation when files change. Cache provides 250,000x+ performance improvements for repeated queries.
Per-Workspace Caching: Probe automatically creates separate cache instances for each workspace, providing cache isolation and better performance for monorepos. Each workspace cache is stored in ~/Library/Caches/probe/lsp/workspaces/{hash}_{name}/.
probe lsp cache stats
Show comprehensive cache statistics including hit rates and performance metrics.
probe lsp cache stats
No options required - displays full cache statistics:
Optional workspace path to clear (clears all if not specified)
--force
Flag
false
Skip confirmation prompt
--format <FORMAT>
String
terminal
Output format: terminal, json
Workspace Cache Examples
# List all workspace caches
probe lsp cache list
# List with detailed statistics
probe lsp cache list --detailed
# Get JSON output for scripting
probe lsp cache list --format json
# Show info for all workspaces
probe lsp cache info
# Show info for specific workspace
probe lsp cache info /path/to/my-project
# Clear all workspace caches (with confirmation)
probe lsp cache clear-workspace
# Clear specific workspace cache
probe lsp cache clear-workspace /path/to/my-project
# Force clear without confirmation
probe lsp cache clear-workspace --force
# Clear specific workspace without confirmation
probe lsp cache clear-workspace /path/to/my-project --force
Example Output:
$ probe lsp cache list --detailed
Workspace Caches (3 active, 5 total):
✓ abc123_my-rust-project
Path: /Users/dev/projects/my-rust-project
Size: 45.2 MB (3,421 entries)
Hit Rate: 94.5%
Last Used: 2 minutes ago
✓ def456_backend-api
Path: /Users/dev/monorepo/backend
Size: 23.1 MB (1,897 entries)
Hit Rate: 91.2%
Last Used: 5 minutes ago
○ ghi789_frontend-app
Path: /Users/dev/monorepo/frontend
Size: 12.4 MB (892 entries)
Hit Rate: 88.7%
Last Used: 2 hours ago (evicted from memory)
Memory Usage: 68.3 MB / 800 MB (8.5%)
Active Caches: 3 / 8 max
LRU Evictions: 2 total
Configuration Management
probe lsp config
Manage LSP configuration.
probe lsp config <SUBCOMMAND> [OPTIONS]
Subcommands
Subcommand
Description
get [KEY]
Get configuration value(s)
set <KEY> <VALUE>
Set configuration value
reset [KEY]
Reset to default value(s)
validate
Validate configuration
paths
Show configuration file paths
init
Create default configuration
Examples
# View all configuration
probe lsp config get
# Get specific value
probe lsp config get cache.size_per_operation
# Set configuration value
probe lsp config set cache.ttl_seconds 7200
# Reset to defaults
probe lsp config reset cache
# Validate configuration
probe lsp config validate
# Show config file locations
probe lsp config paths
# Create default config file
probe lsp config init
Troubleshooting Commands
probe lsp check
Run system health checks.
probe lsp check [OPTIONS]
Options
Option
Type
Default
Description
--fix
Flag
false
Attempt to fix issues automatically
--verbose
Flag
false
Show detailed check results
--json
Flag
false
JSON output
Examples
# Basic health check
probe lsp check
# Detailed check with auto-fix
probe lsp check --fix --verbose