Skip to content

CLI Reference

The seerflow CLI ships as a single entry point. Run it directly (seerflow) or through uv run python -m seerflow.

Terminal window
seerflow --help
seerflow --version
seerflow --config /path/to/seerflow.yaml <command>
FlagDescription
--config FILEUse a specific YAML config. Default: seerflow.yaml in the working directory.
--versionPrint version and exit.
--helpPrint help for the current command.

Boot the full pipeline: receivers, parsers, detection, correlation, dashboard, REST API, and WebSocket stream — all in one process.

Terminal window
seerflow start
seerflow --config /etc/seerflow.yaml start

The dashboard and APIs are exposed on dashboard_port (default 8080):

  • UI — http://127.0.0.1:8080/
  • REST — http://127.0.0.1:8080/api/v1/
  • WebSocket — ws://127.0.0.1:8080/api/v1/ws

Ctrl+C triggers a graceful shutdown that flushes events, persists ML model state, and prints a session summary.

Zero-config one-shot mode — monitor one or more files without touching seerflow.yaml. Detection still runs, but only file tailing is enabled and storage uses an ephemeral SQLite DB unless --config is passed.

Terminal window
seerflow tail /var/log/syslog
seerflow tail /var/log/auth.log /var/log/nginx/access.log
seerflow tail '/var/log/*.log'

Stops cleanly on Ctrl+C with the same summary as start.

Read from the storage backend currently configured.

Terminal window
seerflow query events --limit 50
seerflow query events --since 1h --entity 10.0.1.42
seerflow query alerts --since 24h
seerflow query alerts --severity high
seerflow query templates --top 20
seerflow query timeline <entity_uuid> --since 24h
seerflow query health
SubcommandPurpose
eventsStored SeerflowEvent rows. Filters: --since, --entity, --template, --source, --limit.
alertsStored alerts. Filters: --since, --severity, --rule, --limit.
templatesDrain3 templates ranked by count or recency. Filters: --top, --since.
timelineChronological events involving a given entity UUID. Filters: --since, --limit.
healthDetection ensemble health: per-detector status, queue depth, throughput, last-scored-at, model warm-up state.

--format json is available on every subcommand for scripting.

Inspect the loaded Sigma rule set (63 bundled rules + any directories listed under detection.sigma_rules_dirs).

Terminal window
seerflow rules list
seerflow rules list --technique T1110 # MITRE technique prefix match
seerflow rules list --tactic credential-access # tactic name or ATT&CK ID
seerflow rules list --tactic TA0006
seerflow rules list --format json

Natural-language threat hunt — the query is translated to an EventQuery by the configured LLM (backend matrix) and executed against LogStore. The argument is positional; quote it.

Terminal window
seerflow hunt "show me failed SSH logins from 10.0.1.42 in the last 24h"
seerflow hunt "outbound DNS queries to flagged domains" --limit 100
seerflow hunt "ssh brute force attempts" --json
FlagDefaultPurpose
--limitfrom llm.hunt_max_resultsMax events to return
--dbfrom configOverride storage DB path
--jsonfalseEmit machine-readable JSON

Requires llm.backend to be configured. See Natural-Language Hunt for the request/response shape.

Stream stored events or alerts to NDJSON or CSV. Useful for backup, replay, or backend migration.

Terminal window
seerflow export events --since 7d --output events.ndjson
seerflow export events --since 24h --format csv --output events.csv
seerflow export alerts --since 7d --output alerts.ndjson
FlagDefaultPurpose
--formatjsonjson (NDJSON) or csv
--since24hRelative window (e.g. 1h, 30m, 7d)
--sourceFilter by source type (events only)
--severityMinimum severity 0–6 (events only)
--limit100000Row cap
--outputstdoutOutput path

Ingest log files at high speed through the offline import path. Paths are positional and accept globs.

Terminal window
seerflow import /var/log/syslog
seerflow import '/var/log/*.log' --db /tmp/replay.db
FlagDefaultPurpose
--dbfrom configOverride storage DB path

Live pipeline metrics — receivers, queue depth, detection ensemble health, alert counts — fetched from the running Seerflow daemon’s local control endpoint.

Terminal window
seerflow status
seerflow status --json
seerflow status --timeout 5

Inspect Drain3 templates in detail.

Terminal window
seerflow templates list --top 20
seerflow templates list --since 24h --format json
seerflow templates show <template-id>
SubcommandPurpose
listPersisted Drain3 templates ranked by recency or count.
showFull template detail: matched count, first/last seen, example messages.

Label an alert as a true positive (tp) or false positive (fp). Feedback flows into the rule-suggestion pipeline (LLM Rule Suggestion) and the alert-store audit log.

Terminal window
seerflow feedback <alert-id> tp
seerflow feedback <alert-id> fp --note "ssh from ops jumphost"

Positional args: alert_id, then tp or fp. Optional --note.

Entity-graph maintenance operations.

Move the entity graph between backends (igraph, falkordb, postgres_age).

Terminal window
seerflow graph migrate --from igraph --to falkordb --dry-run
seerflow graph migrate --from igraph --to falkordb
seerflow graph migrate --from falkordb --to igraph
seerflow graph migrate --from igraph --to falkordb --wipe-destination

--dry-run reports counts without writing. --wipe-destination is required if the destination already contains a graph.