Solves Flagsmith issue #3457 · open since 2024

Bad config never reaches your users.

FlagGuard checks every Flagsmith value change against a JSON Schema in your repo. Invalid values are rolled back in seconds, and your team hears about it in Slack.
$ git clone github.com/mrstrange1708/flagguard
$ pnpm install && pnpm demo   # Flagsmith + FlagGuard + demo shop

Remote config is code that skips code review.

Teams hand config to PMs, support and now AI agents. Flagsmith's dashboard has a syntax check, but it leaves four gaps.

A warning, not a block

The dashboard asks “Are you sure you wish to save?”, and Save still wins.

Syntax, not meaning

{"max_items": "ten"} is valid JSON. It still crashes the app.

Dashboard only

API, CLI, Terraform, MCP and AI-agent changes skip the check entirely.

Nothing after the save

No rollback, no alert. You find out from your users.

Try it: break the checkout.

This is FlagGuard's real rule engine running in your browser, with the rules file from the repo. Save a bad value, then switch FlagGuard off and save it again.

What FlagGuard does

Pick a value and press Save.

    acme.store · what customers see right now

    Wireless earbuds × 1₹2,499.00

    Max 10 items per order

    Pay ₹2,499.00

    Everything a team needs to trust remote config

    rolled back
    Automatic rollback
    Invalid values go back to the last valid one within seconds, through Flagsmith's Admin API.
    segment: premium
    Segments and A/B variants
    Segment overrides and every experiment variant are checked too, not just defaults.
    #releases
    Slack and Discord alerts
    Who changed what, the rejected value, the reason, and what was restored.
    exit 1
    flagguard check in CI
    The same rules as a GitHub Action. Fails the build if any live value is invalid, and catches anything missed while FlagGuard was down.
    approval required
    An Agent Skill for safe edits
    flagsmith-safe-config takes a coding agent through a change with the Flagsmith CLI: check, diff, human approval for production, verify, rollback command.
    monitor
    Monitor mode first
    Alert-only mode to try it on a live project before it is allowed to roll back.

    How it plugs into Flagsmith

    1 · Write rules

    flagguard.rules.json in your repo: one JSON Schema per feature. Reviewed in PRs like code.

    2 · Add a webhook

    Point each Flagsmith environment's webhook at FlagGuard. Signed with HMAC-SHA256.

    3 · Done

    Every change, from any source, is checked. Bad ones are rolled back and reported.

    Built only on public Flagsmith APIs: environment webhooks, the Admin API, the JS SDK and the Flagsmith CLI. Runs next to self-hosted Flagsmith in Docker.