Spotlight List
The list command displays all running Spotlight instances created with spotlight run. You can view instance details, check their health status, and manage multiple instances across different projects.
Basic Usage
spotlight list [options]Key features:
- See all running
spotlight runinstances - Check health status of each instance
- Identify which instance you’re currently in with
[self]indicator - Multiple output formats for different use cases
- Filter to show only healthy instances or include all
Quick Start
# Show all healthy instancesspotlight list
# Show all instances including unhealthy onesspotlight list --all
# Output as JSONspotlight list --format json
# Output as markdown tablespotlight list --format mdOutput Formats
Human-Readable Format (Default)
Colored, easy-to-read format perfect for terminal viewing:
spotlight list# or explicitly:spotlight list --format humanExample output:
11:30:45 [INFO] [server] my-app@8969 (npm run dev) - http://localhost:896911:32:10 [INFO] [server] api-server [self]@54321 (node server.js) - http://localhost:5432111:35:22 [INFO] [server] frontend@3000 (pnpm dev) - http://localhost:3000Features:
- Timestamp of when instance started
- Project name with
[self]indicator for current instance - Port number
- Command being run
- Direct URL to access Spotlight UI
JSON Format
Structured JSON output for programmatic processing:
spotlight list --format jsonExample output:
[ { "instanceId": "019aa118-31a2-7f6f-8a81-2e4bad249d6d", "port": 8969, "pid": 12345, "pidStartTime": 1763639308263, "childPid": 12346, "childPidStartTime": 1763639308716, "command": "npm run dev", "cmdArgs": ["npm", "run", "dev"], "cwd": "/home/user/my-app", "startTime": "2025-11-20T11:30:45.000Z", "projectName": "my-app", "detectedType": "package.json", "status": "healthy", "uptime": 125000 }]Perfect for:
- Scripting and automation
- CI/CD pipelines
- Integration with other tools via
jq - Monitoring systems
Logfmt Format
Machine-readable key-value format:
spotlight list --format logfmtExample output:
instanceId=019aa118-31a2-7f6f-8a81-2e4bad249d6d projectName=my-app port=8969 command="npm run dev" cwd=/home/user/my-app pid=12345 childPid=12346 startTime=2025-11-20T11:30:45.000Z detectedType=package.json status=healthy uptime=125 isSelf=falsePerfect for:
- Log aggregation tools
- Structured logging systems
- Parsing with standard Unix tools
- Monitoring and alerting
Markdown Format
Formatted table perfect for documentation:
spotlight list --format mdExample output:
| Project | Port | Command | Started | PID | URL | Status ||---------|------|---------|---------|-----|-----|--------|| my-app | 8969 | npm run dev | 11/20/2025, 11:30:45 AM (125s) | 12345 | http://localhost:8969 | healthy || api-server [self] | 54321 | node server.js | 11/20/2025, 11:32:10 AM (40s) | 12400 | http://localhost:54321 | healthy |Perfect for:
- Documentation
- Status reports
- GitHub issues or PRs
- Team communication
Instance Status
Each instance shows a health status:
- healthy ✅ - Instance is running and responding
- unresponsive ⚠️ - Process is alive but not responding to health checks
- dead ❌ - Process has terminated
- orphaned ⚠️ - Child process is alive but Spotlight crashed
By default, only healthy instances are shown. Use --all to see all statuses.
The [self] Indicator
When you run spotlight list from within a Spotlight instance, that instance is marked with [self]:
# From terminal running inside a spotlight instancespotlight list
# Output:11:32:10 [INFO] [server] my-app [self]@54321 (npm run dev) - http://localhost:54321This helps you identify which instance you’re currently working in when managing multiple instances.
Options
Include All Instances
By default, only healthy instances are shown. Use --all to include unhealthy instances:
# Show only healthy instances (default)spotlight list
# Show all instances including unresponsive/orphanedspotlight list --allFormat Selection
# Human-readable (default)spotlight list -f human
# JSON for automationspotlight list -f json
# Logfmt for parsingspotlight list -f logfmt
# Markdown for documentationspotlight list -f mdCommon Use Cases
Check Running Instances
See what Spotlight instances are currently active:
spotlight listMonitor Multiple Projects
When working on multiple projects simultaneously:
# Terminal 1: Frontendcd frontend && spotlight run npm run dev
# Terminal 2: Backend APIcd api && spotlight run node server.js
# Terminal 3: Check bothspotlight list# Shows both frontend and backend instancesAutomation and Scripting
Get instance data programmatically:
# Get all portsspotlight list -f json | jq -r '.[].port'
# Find instance by project namespotlight list -f json | jq '.[] | select(.projectName == "my-app")'
# Count running instancesspotlight list -f json | jq 'length'
# Get URLs for all instancesspotlight list -f json | jq -r '.[] | "http://localhost:\(.port)"'Status Monitoring
Check health of all instances:
# Check if any instances are unhealthyspotlight list --all -f json | jq '.[] | select(.status != "healthy")'
# Monitor uptimespotlight list -f json | jq -r '.[] | "\(.projectName): \(.uptime / 1000)s"'Documentation Generation
Create status reports:
# Generate markdown reportspotlight list -f md > instances-status.md
# Create JSON report for processingspotlight list -f json > instances.jsonIntegration Examples
Shell Scripts
#!/bin/bash# Check if any Spotlight instances are running
INSTANCES=$(spotlight list -f json)COUNT=$(echo "$INSTANCES" | jq 'length')
if [ "$COUNT" -eq 0 ]; then echo "No Spotlight instances running" exit 1else echo "Found $COUNT running instances" echo "$INSTANCES" | jq -r '.[] | "\(.projectName) on port \(.port)"'fiGitHub Actions
- name: Check Spotlight Instances run: | spotlight list -f json > spotlight-instances.json cat spotlight-instances.json | jq '.'Monitoring Scripts
# Watch for instance changeswatch -n 5 'spotlight list'
# Log instance status every minutewhile true; do spotlight list -f logfmt >> spotlight-monitoring.log sleep 60doneUnderstanding Instance Data
Instance ID
Unique identifier (UUIDv7) for each instance. Used for management operations.
Port
Port where the Spotlight UI is accessible. Visit http://localhost:<port> to view the UI.
PIDs
- pid: Main Spotlight process ID
- childPid: Your application’s process ID
- Both include start times to prevent false matches from PID reuse
Command & Arguments
The exact command and arguments used to start your application.
Working Directory
The directory from which the instance was started.
Start Time
ISO 8601 timestamp of when the instance started.
Project Name
Detected from package.json name field, or directory name if not available.
Detected Type
How Spotlight detected what to run:
package.json- Found and used npm scriptdocker-compose- Detected Docker Compose projectunknown- Explicit command provided
Uptime
Milliseconds since the instance started (in JSON/logfmt) or human-readable format (in human/markdown).
Troubleshooting
No Instances Shown
If spotlight list shows no instances:
- Check if instances are running: Only
spotlight runinstances are tracked - Verify registry location: Instances are stored in
/tmp/spotlight-$USER/instances/ - Try —all flag: Instances might be unhealthy
# Show all instances including unhealthyspotlight list --all[self] Not Appearing
The [self] indicator only appears when:
- You run
spotlight listfrom within a terminal that is itself a Spotlight instance - The current process PID matches a tracked instance PID
Stale Instances
Stale instances (where the process has died) are automatically cleaned up on the next list command. If you see dead instances, they’ll be removed from the registry.