Skip to main content

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.

YAML Editor

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 PostSubmit or CommentSubmit appear 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!

Node Visualizer

Structure Overview​

A Modegator configuration document can contain five top-level sections:

  1. macros: Defined collections of actions that can be executed together.
  2. rules: Event-driven automations.
  3. ui_actions: Buttons injected into the Reddit UI.
  4. scheduled: Time-based Cron jobs.
  5. 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 descriptive name and version: "1.0", rather than embedding the settings block 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​

KeyTypeDefaultDescription
dry_run_modebooleanfalseIf enabled (true), actions are simulated but not actually executed on Reddit or external endpoints (useful for testing new rules safely).
enable_action_logbooleantrueWhen true, successful or failed action execution logs are appended to the internal database and viewable via the Dashboard.
log_retention_daysnumber30Number of days of historical action execution logs to keep in Redis storage before expiring them.
max_actions_per_user_per_hournumber10Rate 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.