GitOps for Discord

Declare your Discord servers and bots in a git repository. Cicord shows the plan for every change, applies it, keeps the server in line with the repository, and runs your bots with sandboxed TypeScript plugins.

Pre-releaseVersion v1alpha1. Formats and APIs may still change.

servers/ma-commu.yaml+5 -0
spec:  roles:    modo:      name: Modo      color: "#e67e22"      permissions:        - KickMembers        - ModerateMembers        - ManageMessages        - ManageThreads  channels:    announcements:      name: annonces      type: announcement      category: info
terminal
cicord planServer ma-commu: 2 change(s)  ~ update role "Modo": permissions      permissions: +ManageThreads  + create announcement channel #annonces in "Infos"      category: "info"      name:     "annonces"      type:     "announcement" Plan: 1 to create, 1 to update, 0 to delete.
A commit to examples/basic and the plan Cicord computes for it. The runtime applies the same plan when the commit reaches the branch it follows.

From a commit to your server

  1. Declare it in git

    Roles, channels, permissions, onboarding and bots live as YAML files in a repository: on GitHub, any git host, or a repository Cicord manages for you.

    servers/ma-commu.yaml
  2. Read the plan

    Each revision is compared with the live server. The plan lists every create, update and delete before anything is touched, and protected resources are never deleted.

    cicord plan
  3. Apply it

    The runtime applies the plan in order (roles, categories, channels, overwrites, positions), respecting Discord rate limits, and resumes after a failure.

    cicord serve
  4. Stay in sync

    Hand edits to managed roles and channels are detected as they happen: reported, or reverted withselfHeal. Edits made in the admin console come back to git as a commit or a pull request.

    selfHeal: true

The whole server, as code

A server file covers what you would otherwise click through in Server Settings: the profile, Community, roles and their order, categories and channels with their permission overwrites, the welcome screen, onboarding, AutoMod, emojis, stickers and soundboard sounds.

Cicord only touches what it manages. Pointing it at an existing server adopts matching roles and channels instead of duplicating them, resources you never declared are left alone, and a key removed from YAML is deleted, kept or blocked according to your sync policy. cicord validate checks the files offline, and the plan blocks, with a reason, what Discord would refuse at the server's boost level.

servers/<server>.yaml
spec:
  profile:        # name, icon, banner, verification
  community:      # rules and updates channels
  everyone:       # @everyone permissions
  roles:          # colors, icons, permissions
  hierarchy:      # role order
  categories:     # with permission overwrites
  channels:       # text, voice, forum, stage…
  welcomeScreen:
  onboarding:     # prompts and default channels
  automod:        # AutoMod rules
  emojis:       
  stickers:     
  soundboard:   
  widget:       
  afk:          
  access:         # admins and moderators
  portal:         # the community portal
  syncPolicy:     # selfHeal, prune, deletionProtection

Bots that run your TypeScript, in a sandbox

One runtime hosts any number of bots across any number of servers. Their behavior comes from plugins written in TypeScript with @cicord/sdk: events, slash commands, buttons and modals, schedules, storage and portal routes.

Each plugin instance runs in its own isolated VM with time and size limits, and only reaches its own server. A plugin can only do what its manifest declares and the bot grants: an ungranted call throws, and a new capability in an update shows up in review. The runtime bundles the TypeScript itself, so running Cicord needs no Node.js. Unit tests use @cicord/sdk/testing.

Read the plugin guide

plugins/welcome/src/index.tsexcerpt
import { definePlugin } from "@cicord/sdk";

export default definePlugin({
  events: {
    async memberJoin(ctx, member) {
      const { channel, autoRole } = ctx.config;
      await ctx.server.channel(channel).send(`Bienvenue ${member.mention} !`);

      if (autoRole && !member.hasRole(autoRole)) {
        await member.addRole(autoRole, "welcome: default role");
      }

      const total = await ctx.kv.increment("stats:joined");
      ctx.log.info("member welcomed", { member: member.id, total });
    },
  },
});
plugins/welcome/plugin.yamlexcerpt
spec:
  entry: ./src/index.ts
  capabilities:
    - discord.messages.send
    - discord.channels.read
    - discord.members.read
    - discord.roles.assign
    - storage.kv
  intents: [ServerMembers]

A Store where you see what you grant

The official plugins ship with the binary:welcome, onboarding, tickets, polls, levels, moderation, reaction-roles, audit-log, announcements.

Third-party plugins come from registries: git repositories with an index. Their trust is computed from the URL, never declared, so they are labeled unofficial everywhere and ask for an explicit confirmation. Before any install or update, the Store shows the capabilities, gateway intents and network hosts being granted, with privileged intents highlighted. The reviewed version is pinned in cicord.lock by commit and content hash, and an index from the official registry is only trusted when it is signed by keys built into the binary.

An admin console that writes to git

Moderators change plugin settings in forms generated from each plugin's config schema, with channel and role pickers, without opening a YAML file. The console also shows sync status, drift, the history of the configuration and the audit log.

Every save goes back to the repository. Path policies in cicord.yaml decide whether a change is committed directly or opened as a pull request for review, so git stays the single source of truth.

cicord.yamlexcerpt
spec:
  writeBack:
    defaultMode: pullRequest
    policies:
      - paths: ["bots/**"]
        mode: commit
      - paths: ["servers/**"]
        mode: pullRequest
  • Change the welcome messagebots/moderator/bot.yamlCommit
  • Add a roleservers/ma-commu.yamlPull request

Also included

Setup wizard

Start cicord serve in an empty directory and follow the one-time link. The wizard checks the bot token, intents and role position live, then imports your existing server. The first plan has to be empty: everything is adopted, nothing changes on Discord.

No changes. Discord matches the configuration.

Discord simulator

cicord dev --sim replaces Discord with an in-memory server seeded from your YAML, with the users alice, bob and charlie. From the console's Simulator panel, join servers, send messages, run slash commands and click buttons while plugins hot-reload. No token needed.

Community portal SDK

The runtime serves a community portal at /: sign-in with Discord, onboarding, member profile, themed from YAML. Fork it withcicord portal init, or build your own with @cicord/client,@cicord/react and @cicord/ui in a site you already have.

Self-hosted, single binary

One static Go binary holds the reconciler, the bot gateways, the plugin host, the API, the admin console and the portal. No database server, no Node.js, no git binary: just a data directory. A container image is described too.

Self-hosting guide

Get started in five minutes

Build the binary from source, then either connect a real server with the setup wizard or try everything offline against the simulator.

1. Build from source

Go 1.27, plus Node 26 and pnpm for the web UIs.

git clone https://github.com/cicord/cicord.git
cd cicord
make all            # builds the UIs and bin/cicord

2a. Connect a real server

With bin/cicord on your PATH.

mkdir my-community && cd my-community
cicord serve --public-url https://cicord.example.org
# open the setup link it prints

2b. Or try it offline

From the clone, on the example repository. No bot token.

cicord dev --sim examples/basic
# then open http://127.0.0.1:7420/admin/