URL Detector Plugin
Automatically detects URLs in terminal output and notifies you. Great for catching links in build logs, test output, or general terminal usage.
Features
- Detects HTTP and HTTPS URLs
- Filters out localhost URLs
- Shows notifications for detected URLs
- Configurable detection thresholds
Installation
just plugin-build url-detectorConfiguration
Add to your ~/.config/scarab/config.toml:
[[plugins]]
name = "url-detector"
enabled = true
[plugins.config]
notify_on_detection = true
max_urls_in_notification = 3
min_url_length = 10Usage
The plugin runs automatically. Try these commands to test:
echo "Check out https://github.com/raibid-labs/scarab"
curl -I https://example.com
git clone https://github.com/user/repo.gitDevelopment
just dev-mode url-detectorHow It Works
- Monitors all terminal output in real-time
- Uses regex to detect URL patterns
- Filters out common false positives (localhost, etc.)
- Shows a notification with detected URLs
- Logs all detections for review
Performance
- Uses compiled regex for speed
- Processes 100k+ lines/sec
- Minimal impact on terminal performance
Future Enhancements
- Click to open URLs in browser
- URL history tracking
- Domain-based filtering
- Automatic URL shortening
License
MIT