# Artisan Commands

# Command Line Commands (Artisan)

CFM includes a number of custom Laravel Artisan commands to help automate and manage blocklists, phishing detection, feed ingestion, and other system behaviors.

To view available commands, use the following in your project root:

```
php artisan
```

Below is an overview of the key command groups available in CFM:

<div id="bkmrk-">---

</div>## 🔌 `agents`

<table id="bkmrk-command-description-"><tbody><tr><th>Command</th><th>Description</th></tr><tr><td>`agents:check-notifications`</td><td>Checks the last-seen status of each agent and sends notifications (e.g., Slack) if any are down.</td></tr></tbody></table>

<div id="bkmrk--1">---

</div>## 🗑️ `autodelete`

<table id="bkmrk-command-description--1"><tbody><tr><td>Command</td><td>Description</td></tr><tr><td>`autodelete:run`</td><td>Runs `AutoDeleteJob` to remove old records (e.g., blocklist entries, logs) based on custom rules.</td></tr></tbody></table>

<div id="bkmrk--2">---

</div>## 🚫 `blocklist`

<table id="bkmrk-command-description--2"><tbody><tr><td>Command</td><td>Description</td></tr><tr><td>`blocklist:fetch-geodata`</td><td>Bulk fetches GeoIP data for blocklist entries (country, ASN, etc.).</td></tr><tr><td>`blocklist:resolve-geodata`</td><td>Resolves GeoIP data with optional processing limits for batching.</td></tr><tr><td>`blocklist:resolve-ptr`</td><td>Resolves PTR (Reverse DNS) records for IPs in batches. Parallel processing supported.</td></tr></tbody></table>

<div id="bkmrk--3">---

</div>## 🧹 `cache`

<table id="bkmrk-command-description--3"><tbody><tr><td>Command</td><td>Description</td></tr><tr><td>`cache:clear`</td><td>Clears the Laravel application cache.</td></tr></tbody></table>

<div id="bkmrk--4">---

</div>## 🦠 `clamav`

<table id="bkmrk-command-description--4"><tbody><tr><td>Command</td><td>Description</td></tr><tr><td>`clamav:generate-signatures`</td><td>Generates ClamAV-compatible signature files from phishing URLs and malware file hashes (MD5, SHA1, SHA256).</td></tr></tbody></table>

<div id="bkmrk--5">---

</div>## ⚙️ `config`

> *This section may include config sync-related commands, depending on future additions.*

<div id="bkmrk--6">---

</div>## 🌐 `data-feeds`

<table id="bkmrk-command-description--5"><tbody><tr><td>Command</td><td>Description</td></tr><tr><td>`data-feeds:fetch`</td><td>Fetches and processes all active data feeds configured in the system.</td></tr><tr><td>`import:blocklist`</td><td>Imports a list of IPs into the blocklist, whitelist, or greylist.</td></tr><tr><td>`import:domains`</td><td>Imports domains into the blocklist or whitelist.</td></tr><tr><td>`import:mail-filters`</td><td>Imports email sender/domain filters from a file.</td></tr></tbody></table>

<div id="bkmrk--7">---

</div>## 📄 `iplists`

<table id="bkmrk-command-description--6"><tbody><tr><td>Command</td><td>Description</td></tr><tr><td>`iplists:generate`</td><td>Generates `whitelist.txt`, `greylist.txt`, and `blacklist.txt` files from the database for CSF or DNS use.</td></tr></tbody></table>

<div id="bkmrk--8">---

</div>## 📬 `mailfromfilters`

<table id="bkmrk-command-description--7"><tbody><tr><td>Command</td><td>Description</td></tr><tr><td>`mailfromfilters:generate`</td><td>Generates `mailfromfilters.cf` used by the mail filtering system, based on DB entries.</td></tr></tbody></table>

<div id="bkmrk--9">---

</div>## 🧠 `spamassassin`

<table id="bkmrk-command-description--8"><tbody><tr><td>Command</td><td>Description</td></tr><tr><td>`spamassassin:generate-rules`</td><td>Generates a SpamAssassin custom keyword rule file from the `spam_keywords` table. Supports strict and loose matching, Greek normalization, etc.</td></tr></tbody></table>

<div id="bkmrk--10">---

</div>These commands allow you to maintain and automate your security infrastructure directly from the console, and can be scheduled or run on-demand as needed.