Skip to content
This page was generated and translated with the assistance of AI. If you spot any inaccuracies, feel free to help improve it. Edit on GitHub

CLI Command Reference

The sd command-line interface provides 27 subcommands organized into 10 categories. This page serves as a quick-reference index. Each command links to its detailed documentation page where available.

Global Options

These flags can be passed to any subcommand:

FlagDefaultDescription
--log-level <LEVEL>warnLogging verbosity: trace, debug, info, warn, error
--data-dir <PATH>~/.prx-sdBase data directory for signatures, quarantine, config, and plugins
--help--Show help for any command or subcommand
--version--Show the engine version
bash
# Enable debug logging
sd --log-level debug scan /tmp

# Use a custom data directory
sd --data-dir /opt/prx-sd scan /home

Scanning

Commands for on-demand file and system scanning.

CommandDescription
sd scan <PATH>Scan a file or directory for threats
sd scan-memoryScan running process memory (Linux only, requires root)
sd scan-usb [DEVICE]Scan USB/removable devices
sd check-rootkitCheck for rootkit indicators (Linux only)
bash
# Scan a directory recursively with auto-quarantine
sd scan /home --auto-quarantine

# Scan with JSON output for automation
sd scan /tmp --json

# Scan with 4 threads and HTML report
sd scan /var --threads 4 --report /tmp/report.html

# Exclude patterns
sd scan /home --exclude "*.log" --exclude "/home/user/.cache"

# Scan and auto-remediate (kill process, quarantine, clean persistence)
sd scan /tmp --remediate

# Scan process memory
sudo sd scan-memory
sudo sd scan-memory --pid 1234

# Scan USB devices
sd scan-usb
sd scan-usb /dev/sdb1 --auto-quarantine

# Check for rootkits
sudo sd check-rootkit
sudo sd check-rootkit --json

Real-Time Monitoring

Commands for continuous file system monitoring and background daemon operation.

CommandDescription
sd monitor <PATHS...>Start real-time file system monitoring
sd daemon [PATHS...]Run as a background daemon with monitoring and auto-updates
bash
# Monitor /home and /tmp for changes
sd monitor /home /tmp

# Monitor with block mode (fanotify, requires root)
sudo sd monitor /home --block

# Run as daemon with default paths (/home, /tmp)
sd daemon

# Daemon with custom update interval (every 2 hours)
sd daemon /home /tmp /var --update-hours 2

Quarantine Management

Commands for managing the AES-256-GCM encrypted quarantine vault.

CommandDescription
sd quarantine listList all quarantined files
sd quarantine restore <ID>Restore a quarantined file to its original location
sd quarantine delete <ID>Permanently delete a quarantined file
sd quarantine delete-allPermanently delete all quarantined files
sd quarantine statsShow quarantine vault statistics
bash
# List quarantined files
sd quarantine list

# Restore a file (use first 8 chars of ID)
sd quarantine restore a1b2c3d4

# Restore to an alternate path
sd quarantine restore a1b2c3d4 --to /tmp/recovered/

# Delete a specific entry
sd quarantine delete a1b2c3d4

# Delete all entries (with confirmation prompt)
sd quarantine delete-all

# Delete all without confirmation
sd quarantine delete-all --yes

# View quarantine statistics
sd quarantine stats

Signature Management

Commands for updating and importing threat signatures.

CommandDescription
sd updateCheck for and apply signature database updates
sd import <FILE>Import hash signatures from a blocklist file
sd import-clamav <FILES...>Import ClamAV signature files (.cvd, .hdb, .hsb)
sd infoDisplay engine version, signature status, and system info
bash
# Update signatures
sd update

# Check for updates without downloading
sd update --check-only

# Force re-download
sd update --force

# Import custom hash file
sd import /path/to/hashes.txt

# Import ClamAV signatures
sd import-clamav main.cvd daily.cvd

# Show engine info
sd info

Configuration

Commands for managing engine configuration and remediation policy.

CommandDescription
sd config showDisplay current configuration
sd config set <KEY> <VALUE>Set a configuration value
sd config resetReset configuration to defaults
sd policy showDisplay remediation policy
sd policy set <KEY> <VALUE>Set a remediation policy value
sd policy resetReset remediation policy to defaults
bash
# Show config
sd config show

# Set scan threads
sd config set scan.threads 8

# Reset to defaults
sd config reset

# Show remediation policy
sd policy show

See Configuration Overview and Configuration Reference for details.

Scheduled Scans

Commands for managing recurring scheduled scans via systemd timers or cron.

CommandDescription
sd schedule add <PATH>Register a recurring scheduled scan
sd schedule removeRemove the scheduled scan
sd schedule statusShow current schedule status
bash
# Schedule a weekly scan of /home
sd schedule add /home --frequency weekly

# Schedule a daily scan
sd schedule add /var --frequency daily

# Available frequencies: hourly, 4h, 12h, daily, weekly
sd schedule add /tmp --frequency 4h

# Remove the schedule
sd schedule remove

# Check schedule status
sd schedule status

Alerts & Webhooks

Commands for configuring alert notifications via webhooks and email.

CommandDescription
sd webhook listList configured webhook endpoints
sd webhook add <NAME> <URL>Add a webhook endpoint
sd webhook remove <NAME>Remove a webhook endpoint
sd webhook testSend a test alert to all webhooks
sd email-alert configureConfigure SMTP email alerts
sd email-alert testSend a test alert email
sd email-alert send <NAME> <LEVEL> <PATH>Send a custom alert email
bash
# Add a Slack webhook
sd webhook add my-slack https://hooks.slack.com/services/... --format slack

# Add a Discord webhook
sd webhook add my-discord https://discord.com/api/webhooks/... --format discord

# Add a generic webhook
sd webhook add my-webhook https://example.com/webhook

# List all webhooks
sd webhook list

# Test all webhooks
sd webhook test

# Configure email alerts
sd email-alert configure

# Test email alerts
sd email-alert test

Network Protection

Commands for DNS-level ad and malicious domain blocking.

CommandDescription
sd adblock enableEnable adblock protection via hosts file
sd adblock disableDisable adblock protection
sd adblock syncRe-download all filter lists
sd adblock statsShow adblock engine statistics
sd adblock check <URL>Check if a URL/domain is blocked
sd adblock logShow recent blocked entries
sd adblock add <NAME> <URL>Add a custom filter list
sd adblock remove <NAME>Remove a filter list
sd dns-proxyStart local DNS proxy with filtering
bash
# Enable adblock
sudo sd adblock enable

# Start DNS proxy
sudo sd dns-proxy --listen 127.0.0.1:53 --upstream 1.1.1.1:53

See Adblock and DNS Proxy for details.

Reporting

CommandDescription
sd report <OUTPUT>Generate an HTML report from JSON scan results
bash
# Scan with JSON output, then generate HTML report
sd scan /home --json > results.json
sd report report.html --input results.json

# Or use the --report flag directly
sd scan /home --report /tmp/scan-report.html

System

Commands for engine maintenance, integration, and self-update.

CommandDescription
sd statusShow daemon status (running/stopped, PID, threats blocked)
sd install-integrationInstall file manager right-click scan integration
sd self-updateCheck for and apply engine binary updates
bash
# Check daemon status
sd status

# Install desktop integration
sd install-integration

# Check for engine updates
sd self-update --check-only

# Apply engine update
sd self-update

Community

Commands for community threat intelligence sharing.

CommandDescription
sd community statusShow community sharing configuration
sd community enrollEnroll this machine with the community API
sd community disableDisable community sharing
bash
# Check enrollment status
sd community status

# Enroll in community sharing
sd community enroll

# Disable sharing (preserves credentials)
sd community disable

Next Steps

Released under the Apache-2.0 License.