coderClaw

Use IRC when you want CoderClaw in classic channels (#room) and direct messages. IRC ships as an extension plugin, but it is configured in the main config under channels.irc.

Quick start

  1. Enable IRC config in ~/.coderclaw/coderclaw.json.
  2. Set at least:
{
  "channels": {
    "irc": {
      "enabled": true,
      "host": "irc.libera.chat",
      "port": 6697,
      "tls": true,
      "nick": "coderclaw-bot",
      "channels": ["#coderclaw"]
    }
  }
}
  1. Start/restart gateway:
coderclaw gateway run

Security defaults

Access control

There are two separate “gates” for IRC channels:

  1. Channel access (groupPolicy + groups): whether the bot accepts messages from a channel at all.
  2. Sender access (groupAllowFrom / per-channel groups["#channel"].allowFrom): who is allowed to trigger the bot inside that channel.

Config keys:

Allowlist entries can use nick or nick!user@host forms.

Common gotcha: allowFrom is for DMs, not channels

If you see logs like:

…it means the sender wasn’t allowed for group/channel messages. Fix it by either:

Example (allow anyone in #tuirc-dev to talk to the bot):

{
  channels: {
    irc: {
      groupPolicy: "allowlist",
      groups: {
        "#tuirc-dev": { allowFrom: ["*"] },
      },
    },
  },
}

Reply triggering (mentions)

Even if a channel is allowed (via groupPolicy + groups) and the sender is allowed, CoderClaw defaults to mention-gating in group contexts.

That means you may see logs like drop channel … (missing-mention) unless the message includes a mention pattern that matches the bot.

To make the bot reply in an IRC channel without needing a mention, disable mention gating for that channel:

{
  channels: {
    irc: {
      groupPolicy: "allowlist",
      groups: {
        "#tuirc-dev": {
          requireMention: false,
          allowFrom: ["*"],
        },
      },
    },
  },
}

Or to allow all IRC channels (no per-channel allowlist) and still reply without mentions:

{
  channels: {
    irc: {
      groupPolicy: "open",
      groups: {
        "*": { requireMention: false, allowFrom: ["*"] },
      },
    },
  },
}

If you allow allowFrom: ["*"] in a public channel, anyone can prompt the bot. To reduce risk, restrict tools for that channel.

Same tools for everyone in the channel

{
  channels: {
    irc: {
      groups: {
        "#tuirc-dev": {
          allowFrom: ["*"],
          tools: {
            deny: ["group:runtime", "group:fs", "gateway", "nodes", "cron", "browser"],
          },
        },
      },
    },
  },
}

Different tools per sender (owner gets more power)

Use toolsBySender to apply a stricter policy to "*" and a looser one to your nick:

{
  channels: {
    irc: {
      groups: {
        "#tuirc-dev": {
          allowFrom: ["*"],
          toolsBySender: {
            "*": {
              deny: ["group:runtime", "group:fs", "gateway", "nodes", "cron", "browser"],
            },
            eigen: {
              deny: ["gateway", "nodes", "cron"],
            },
          },
        },
      },
    },
  },
}

Notes:

For more on group access vs mention-gating (and how they interact), see: /channels/groups.

NickServ

To identify with NickServ after connect:

{
  "channels": {
    "irc": {
      "nickserv": {
        "enabled": true,
        "service": "NickServ",
        "password": "your-nickserv-password"
      }
    }
  }
}

Optional one-time registration on connect:

{
  "channels": {
    "irc": {
      "nickserv": {
        "register": true,
        "registerEmail": "[email protected]"
      }
    }
  }
}

Disable register after the nick is registered to avoid repeated REGISTER attempts.

Environment variables

Default account supports:

Troubleshooting