Documents
CLI Reference
CLI Reference
Type
External
Status
Published
Created
Apr 18, 2026
Updated
Apr 18, 2026
Updated by
Dosu Bot
Source
View

CLI Reference#

This document provides comprehensive reference information for all
DaemonEye command-line interfaces.


Table of Contents#

[TOC]


Overview#

DaemonEye provides three main command-line tools:

  • procmond: Privileged process collector daemon
  • daemoneye-agent: Detection orchestrator and
    lifecycle manager
  • daemoneye-cli: Command-line interface for queries
    and management

procmond#

The privileged process monitoring daemon that collects process
information with minimal attack surface.

Usage#

procmond[OPTIONS]

Options#

OptionShortDefaultDescription
--database-d/var/lib/daemoneye/processes.dbDatabase path for storing process data
--log-level-linfoLog level (debug, info, warn, error)
--interval-i30Collection interval in seconds (5-3600)
--max-processes0Maximum processes per cycle (0 = unlimited)
--enhanced-metadataEnable enhanced metadata collection
--compute-hashesEnable executable hashing for integrity
--help-hPrint help information
--version-VPrint version information

Examples#

# Basic process monitoring with 30-second intervalsprocmond--database /var/lib/daemoneye/processes.db --interval 30# Enhanced collection with metadata and hashingprocmond--enhanced-metadata--compute-hashes--interval 60# Debug mode with verbose loggingprocmond--log-level debug --interval 10# Limited collection for testingprocmond--max-processes 100 --interval 5

Configuration#

procmond is orchestrated by
daemoneye-agent; collectors do not consume
component-specific configuration files. When the binary is launched
directly (for example during development or troubleshooting) it honours
the following sources:

  1. Command-line flags (highest precedence)
  2. Environment variables (PROCMOND_*) typically injected
    by the agent
  3. System DaemonEye configuration file
    (/etc/daemoneye/config.toml)
  4. Embedded defaults (lowest precedence)
    Per-user configuration is not supported for collectors; only the
    operator-facing CLI honours user-scoped overrides when invoked
    directly.
    Operators should configure collection behaviour through the agent,
    which materialises these settings when spawning the collector.

Exit Codes#

CodeDescription
0Success
1Unhandled error returned from the runtime (includes configuration, permission, database)
2CLI argument parsing failure reported by clap

daemoneye-agent#

The detection orchestrator that manages procmond lifecycle, executes
detection rules, and handles alerting.

Usage#

daemoneye-agent[OPTIONS]

Options#

OptionShortDefaultDescription
--database-d/var/lib/daemoneye/processes.dbDatabase path for process data
--log-level-linfoLog level (debug, info, warn, error)
--help-hPrint help information
--version-VPrint version information

Examples#

# Start orchestrator with default settingsdaemoneye-agent# Use custom database locationdaemoneye-agent--database /custom/path/processes.db# Enable debug loggingdaemoneye-agent--log-level debug# Test mode (exits immediately for integration tests)DAEMONEYE_AGENT_TEST_MODE=1 daemoneye-agent

Environment Variables#

VariableDescription
DAEMONEYE_AGENT_TEST_MODESet to 1 to enable test mode (immediate exit)

Features#

  • Embedded EventBus Broker: Runs daemoneye-eventbus
    broker for multi-collector coordination
  • IPC Server: Provides IPC server for CLI
    communication via protobuf over Unix sockets/named pipes
  • IPC Client: Communicates with procmond via protobuf
    over Unix sockets/named pipes
  • Detection Engine: Executes SQL-based detection
    rules against collected data
  • Alert Management: Multi-channel alert delivery
    (stdout, syslog, webhooks, email)
  • Graceful Shutdown: Handles SIGTERM/SIGINT for clean
    shutdown

Configuration#

daemoneye-agent supports hierarchical configuration loading:

  1. Command-line flags (highest precedence)
  2. Environment variables (DAEMONEYE_AGENT_*)
  3. User configuration file
    (~/.config/daemoneye-agent/config.yaml)
  4. System configuration file
    (/etc/daemoneye-agent/config.yaml)
  5. Embedded defaults (lowest precedence)

daemoneye-cli#

The command-line interface for querying database statistics, health
checks, and system management.

Usage#

daemoneye-cli[OPTIONS]

Options#

OptionShortDefaultDescription
--database-d/var/lib/daemoneye/processes.dbDatabase path for queries
--format-fhumanOutput format (human, json)
--help-hPrint help information
--version-VPrint version information

Examples#

# View database statistics in human-readable formatdaemoneye-cli--database /var/lib/daemoneye/processes.db --format human# Get statistics in JSON format for scriptingdaemoneye-cli--database /var/lib/daemoneye/processes.db --format json# Use default database locationdaemoneye-cli--format json

Output Formats#

Human Format#

`DaemonEye Database Statistics#

Processes: 1234
Rules: 5
Alerts: 42
System Info: 1
Scans: 100
Health status: Healthy`

JSON Format#

{"processes":1234,"rules":5,"alerts":42,"system_info":1,"scans":100,"health_status":"Healthy"}

Configuration#

daemoneye-cli supports hierarchical configuration loading:

  1. Command-line flags (highest precedence)
  2. Environment variables (DAEMONEYE_CLI_*)
  3. User configuration file
    (~/.config/daemoneye-cli/config.yaml)
  4. System configuration file
    (/etc/daemoneye-cli/config.yaml)
  5. Embedded defaults (lowest precedence)

Common Patterns#

Basic Monitoring Setup#

# Terminal 1: Start the orchestratordaemoneye-agent--log-level info# Terminal 2: Monitor database statisticswatch-n 5 'daemoneye-cli --format json'# Terminal 3: Run procmond directly (optional)procmond--enhanced-metadata--compute-hashes

Testing and Development#

# Test procmond collectionprocmond--interval 5 --max-processes 10 --log-level debug# Test agent in test modeDAEMONEYE_AGENT_TEST_MODE=1 daemoneye-agent# Check database growthdaemoneye-cli--format json |jq'.processes'

Production Deployment#

# Start agent as servicesystemctl start daemoneye-agent# Monitor healthdaemoneye-cli--format json |jq'.processes, .alerts'# Check logsjournalctl-u daemoneye-agent -f

Shell Completions#

All DaemonEye CLI tools support shell completions for bash, zsh,
fish, and PowerShell.

Generate Completions#

# Bashdaemoneye-cli--generate-completion bash > /etc/bash_completion.d/daemoneye-cli# Zshdaemoneye-cli--generate-completion zsh > ~/.zsh/completions/_daemoneye-cli# Fishdaemoneye-cli--generate-completion fish > ~/.config/fish/completions/daemoneye-cli.fish# PowerShelldaemoneye-cli--generate-completion powershell > DaemonEye.ps1

Error Handling#

All CLI tools follow consistent error handling patterns:

  • Exit Code 0: Success
  • Exit Code 1: General error
  • Exit Code 2: CLI argument parsing failure
  • Exit Code 3: Permission denied
  • Exit Code 4: Database error

Common Error Messages#

ErrorCauseSolution
Permission deniedInsufficient privilegesRun with appropriate privileges or check file permissions
Database lockedAnother process is using the databaseStop other DaemonEye processes or check for stale locks
Invalid intervalInterval outside 5-3600 rangeUse interval between 5 and 3600 seconds
Configuration errorInvalid configuration fileCheck configuration syntax and values

Environment Variables#

Global Environment Variables#

VariableDescriptionDefault
NO_COLORDisable colored outputNot set
TERMTerminal type (affects color detection)System default
RUST_LOGRust logging configurationNot set
RUST_BACKTRACEEnable Rust backtracesNot set

Component-Specific Variables#

procmond#

VariableDescriptionDefault
PROCMOND_DATABASEDatabase path/var/lib/daemoneye/processes.db
PROCMOND_LOG_LEVELLog levelinfo
PROCMOND_INTERVALCollection interval30

daemoneye-agent#

VariableDescriptionDefault
DAEMONEYE_AGENT_DATABASEDatabase path/var/lib/daemoneye/processes.db
DAEMONEYE_AGENT_LOG_LEVELLog levelinfo
DAEMONEYE_AGENT_TEST_MODEEnable test modeNot set

daemoneye-cli#

VariableDescriptionDefault
DAEMONEYE_CLI_DATABASEDatabase path/var/lib/daemoneye/processes.db
DAEMONEYE_CLI_FORMATOutput formathuman

Integration Examples#

Systemd Service#

[Unit]Description=DaemonEye AgentAfter=network.target[Service]Type=simpleUser=daemoneyeGroup=daemoneyeExecStart=/usr/local/bin/daemoneye-agent --database /var/lib/daemoneye/processes.dbRestart=alwaysRestartSec=5[Install]WantedBy=multi-user.target

Docker Deployment#

FROM rust:1.91-slim as builderCOPY . /appWORKDIR /appRUNcargo build --releaseFROM debian:bookworm-slimRUNapt-get update &&apt-get install -y ca-certificates &&rm-rf /var/lib/apt/lists/*COPY--from=builder /app/target/release/daemoneye-agent /usr/local/bin/COPY--from=builder /app/target/release/daemoneye-cli /usr/local/bin/COPY--from=builder /app/target/release/procmond /usr/local/bin/VOLUME ["/data"]CMD ["daemoneye-agent", "--database", "/data/processes.db"]

Kubernetes DaemonSet#

apiVersion: apps/v1kind: DaemonSetmetadata:name: daemoneyespec:selector:matchLabels:app: daemoneyetemplate:metadata:labels:app: daemoneyespec:hostPID:truecontainers:-name: daemoneye-agentimage: daemoneye/daemoneye:latestsecurityContext:privileged:truevolumeMounts:-name: datamountPath: /data-name: procmountPath: /host/procreadOnly:truevolumes:-name: datahostPath:path: /var/lib/daemoneye-name: prochostPath:path: /proc


This CLI reference provides comprehensive information for using
DaemonEye command-line tools. For additional help, use the
--help flag with any command or consult the user
guides.


Source note: Populated from the public repo
(docs/src/cli-reference.md) on 2026-04-18. This page was
previously empty; the content above mirrors the repo at the time of
sync.

CLI Reference | Dosu