Skip to content

Quick start

There are two ways to start. The setup wizard connects Cicord to a real Discord server and checks every step live. The simulator (cicord dev --sim) needs no Discord account at all. Both assume cicord is installed.

Started in a directory without cicord.yaml, the runtime enters setup mode and prints a one-time link to the setup wizard.

  1. Start the runtime in an empty directory:

    Terminal window
    mkdir my-community && cd my-community
    cicord serve --public-url https://cicord.example.org

    To work on your own machine instead, run cicord dev: it writes the repository files into the directory and hot-reloads them. The log prints the link:

    Cicord is not set up yet: setup mode on http://127.0.0.1:7420
    open the setup wizard: http://127.0.0.1:7420/admin/setup?token=…

    The token is single-use and a restart prints a new link. The wizard state is kept in the data directory, so it resumes after a restart.

  2. Welcome. Choose between an existing server and a new community (the wizard explains how to create a server first).

  3. Discord application. Follow the numbered instructions in the Discord developer portal: New Application, then Bot, Reset Token, Copy. Paste only the token. Cicord derives the application ID from it and names the exact privileged intents to turn on (“Server Members Intent”, “Message Content Intent”), with a Re-check button.

  4. Server. Open the invite link (scopes bot applications.commands, Administrator permission) and authorize the bot. The server appears by itself, no ID to copy. Cicord then checks the bot’s permissions and that its role is above every role it will manage; if not, it tells you which role to drag, for example “drag the role Cicord above Admin” in Server Settings → Roles.

  5. Repository. Choose where the configuration lives:

    • Managed by Cicord: a git repository inside the data directory. No git knowledge needed; every change is still a commit.
    • GitHub: an HTTPS repository URL, a branch and a token.
    • With cicord dev, This folder writes the files into the current directory.

    Import and activate reads the server as it is, writes cicord.yaml, servers/<key>.yaml and bots/<bot>/bot.yaml, and computes a preflight plan. The first plan must be empty: everything is adopted, nothing changes on Discord. Cicord then writes the first commit and activates it without a restart.

  6. Admin login (optional). Add the redirect URL <public-url>/auth/callback in the application’s OAuth2 settings and paste the client secret, so that you can sign in to the admin console with Discord. Test login checks the round trip.

  7. Verify. A checklist runs until everything is green: token, intents, membership, permissions, role hierarchy, slash commands, live events (send a message in the server when asked), an empty plan and a write-back probe.

  8. First plugin. Pick one of the official plugins, review what it may do, configure it and install it. The wizard waits for the new revision and suggests a slash command to try (/poll, /rank…).

  9. Done. Click Finish. The setup endpoints are closed and the admin console is at <public-url>/admin/.

The same checks are available at any time on each server’s Diagnostics page in the admin console. The wizard manages one server and one bot; add more by editing the repository.

The wizard does all of this for you, but every step can be done manually:

  1. Create the bot in the Discord developer portal: a new application, then Bot → reset and copy the token. Under Privileged Gateway Intents, enable what your plugins declare (ServerMembers for memberJoin, MessageContent to read message text).

  2. Scaffold the repository with your real IDs:

    Terminal window
    cicord init my-community --server-id <discord server id> --application-id <discord application id>
    cd my-community
    cicord validate

    To start from a server that already exists, cicord import <server-id> writes servers/<key>.yaml from the live server (see the CLI reference).

  3. Invite the bot with the bot and applications.commands scopes and the Administrator permission, for example https://discord.com/oauth2/authorize?client_id=<application id>&scope=bot+applications.commands&permissions=8. Move its role high enough: a bot can only manage roles below its own.

  4. Run the runtime with the token in the variable named by token.secretRef:

    Terminal window
    export DISCORD_TOKEN_BOT=...
    cicord serve --local --public-url https://cicord.example.org

    --local serves the directory as is. Without it, cicord serve follows cicord.yaml spec.source (see Deploy).

  5. Admin login. Set CICORD_DISCORD_CLIENT_SECRET (the application’s OAuth2 client secret) and add <public-url>/auth/callback as a redirect URL. Server owners are admins; spec.access grants admin or moderator to roles and users.

Next: make your first change.