Concise IRC client library

circl is a concise IRC client library for node.js. It provides almost nothing except for a basic environment to connect to an IRC server and channels, you build upon it using triggers that call functions.


npm install circl

Basic implementation:

circl = require("circl")
irc = circl.ircClient(nick, numeric-mode, [ channel1, channel2 ], host, port, log)


User specified triggers can be added by using circl.addTrigger. Here's an example of a trigger that sends a message to the console when a ping is received:

circl.addTrigger(/^PING (.+)/, function(groups) {
    console.log("Ping with message " + groups[1]);


When the log argument evaluates to true, transactions are logged. You can separate outgoing data from incoming data by the stream it is using; data from the client (i.e. you) is on STDERR, data from the server is on STDOUT.