Configuration
Modegator utilizes a highly flexible and powerful YAML-based configuration engine. Instead of navigating dozens of individual form pages, you can express complex automation flows concisely in a unified YAML format.
The YAML Editor
The YAML Editor is the heart of the Modegator dashboard. It provides a real-time, syntax-highlighted editing experience powered by CodeMirror.
Features of the YAML Editor:
- Syntax Highlighting: Clear coloring for YAML keys, values, strings, and booleans.
- Multi-File Support: Organize your configuration logically across multiple virtual files (e.g.,
main.yaml,automod.yaml,filters.yaml). - Templates: Quickly scaffold new rules or macros by loading predefined templates from the dropdown.
- Import/Export: Use the Download and Upload buttons in the top toolbar to back up your configurations locally or share them with other subreddits.
- Instant Validation: The backend rigorously validates the YAML structure upon saving, immediately catching typos or invalid schemas.

The Node Visualizer
For those who prefer a graphical overview, the Visualizer tab translates your YAML configuration into an interactive node-based graph.
- Event Nodes: Triggers like
PostSubmitorCommentSubmitappear as root nodes. - Rule Nodes: The specific rules listening to those events.
- Condition & Action Nodes: The logical flow of what conditions must be met, branching out to the specific moderation actions taken.
The "Explain" Feature (Static Translation)
In addition to visual graphs, each category in the dashboard (Rules, Macros, Scheduled Tasks, UI Actions) includes a powerful "Explain" button next to each item.
This feature is entirely static and client-side: when clicked, Modegator's built-in translation engine parses the raw YAML configuration (the conditions, operators, and actions) in real-time and converts it into plain, human-readable English. Because it performs static translation directly in the browser, it requires no server execution, database access, or active Reddit context to audit.
For example, a complex rule with regular expressions and numerical thresholds will be translated into a simple paragraph explaining exactly what the rule does. This makes it incredibly easy for non-technical moderators to audit automations offline and understand how the subreddit is being moderated without having to read a single line of code!

Structure Overview
A Modegator configuration document can contain five top-level sections:
macros: Defined collections of actions that can be executed together.rules: Event-driven automations.ui_actions: Buttons injected into the Reddit UI.scheduled: Time-based Cron jobs.settings: Subreddit-wide behavior overrides and global keys.
Here is a minimal valid structure:
settings: {}
macros: []
rules: []
ui_actions: []
scheduled: []
Settings Configuration
Modegator allows configuring application-wide behaviors and parameters inside a global settings block in your YAML configuration. These settings control rate limits, log retention, dry-run safety modes, and webhook destinations.
[!TIP] Best Practice: Dedicated Settings File Since configurations are merged during deployment, it is highly recommended to place your application-wide configurations in a dedicated, separate virtual file (e.g.,
settings.yaml) with its own descriptivenameandversion: "1.0", rather than embedding thesettingsblock inside rules, macros, or scheduled task files. This keeps configurations modular, prevents conflicting settings across multiple files, and ensures a clean, auditable setup.
Settings Keys & Defaults
| Key | Type | Default | Description |
|---|---|---|---|
dry_run_mode | boolean | false | If enabled (true), actions are simulated but not actually executed on Reddit or external endpoints (useful for testing new rules safely). |
enable_action_log | boolean | true | When true, successful or failed action execution logs are appended to the internal database and viewable via the Dashboard. |
log_retention_days | number | 30 | Number of days of historical action execution logs to keep in Redis storage before expiring them. |
max_actions_per_user_per_hour | number | 10 | Rate limiting threshold. Prevents a single moderator from executing more than this amount of UI actions per hour to prevent runaway script usage. |
Example Settings File (settings.yaml)
version: "1.0"
name: "Global Subreddit Settings"
description: "Application-wide configurations, safety controls, and webhook endpoints."
settings:
dry_run_mode: false
enable_action_log: true
log_retention_days: 14
max_actions_per_user_per_hour: 25
Continue reading the documentation to learn how to populate these sections and harness the full power of Modegator.