A painfully simple C instant messaging application
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


CIM: the C Instant Messenger

CIM (The C Instant Messenger) aims to be an utterly simple instant messaging application written in C.

At the moment the application is found in an early, almost proof-of-concept state so expect instability and bugs galore. Nevertheless, the core real-time messaging functionality is implemented.

Check the GitHub Project page for this repo to learn what's on my roadmap.


  • openssl 1.1.0 (libcrypto)
  • glibc

CIM requires openssl 1.1.0, the latest version of the library, in order to implement its encryption routines. However, at the time of this writing this version of the library may not be preinstalled or even available at all in most platforms. Until openssl 1.1.0 becomes more widespread, you will need to download and build it from source and then copy the resulting libcrypto.so file in /usr/local/lib/cim.


Simply run make from the cim top-level directory. This will in turn build the library (libcim), the server (cimd) and the client (cimx). If you're only interested in using the CIM client, you can skip this step and go straight to the AppImage section below.


AppImage (client only)

cimx (the CIM client) can be built and used as a completely no-frills, self-contained http://appimage.org/ by invoking the make target make cimx-appimage at the top-level directory of the repo. This will download and build any dependencies the application requires (namely openssl) alongside the application's source and will then bundle everything together in a standalone AppImage executable that you can just launch to get going.

In the near future, pre-built AppImages for Linux x86-64 will be distributed too. At the moment there is no AppImage option available for the CIM server (cimd).

From Source

Alternatively, you can build all of CIM from source yourself. Both cimx and cimd depend on the libcim library to run. Therefore, once you've built libcim's sources, you have to install it from its directory like so

sudo make install

Running cim

cim utilises a traditional client-server architecture akin to IRC's but it's important to note CIM utilises its own (rather simplistic) messaging protocol, completely different to IRC. All cim clients will connect to a central server found at a known address. To launch the server, just execute its binary


Then, provided the computer hosting cimd is in a well known location and allows incoming TCP traffic, you should be able to connect to it from any other device by launching the cim client node


cimx will attempt to locate its configuration file cim.conf on startup. If it's unable to find it, it will fire off the "First Run" wizard. The wizard will prompt you to provide your username. It will then write your preferences alongside some defaults to the settings file cited before. The file is at the moment an extremely simple, key-value plaintext file which you can modify at your leisure. Note however that any changes you make to this file won't be applied until you restart the client.

Using the CIM client

Once you've completed the setup process you should be able to connect to the CIM server you provided before by typing the command connect.

Now you're connected to the server but before you can get started, you need to join a room. Use the command join and supply a room name of your choosing to the command. If no room is found with the name you supplied, it will be created for you and you will join that room automatically. If all goes well you can start typing and participate in the room conversation immediately.

At the moment there is no way to participate in multiple rooms concurrently so you'll need to abandon your current room to join a new one. To leave the room you're in, just type the command leave. Now you're free to join another room as explained before.

When you're done, just issue the command quit to leave your current room (if you're in one) and immediately exit the application.


To obtain the automatically generated documentation for cim, just run make doc in the top-level directory. This will create a docs directory containing the documentation in HTML and LaTeX format.

Errata and Bugs

CIM is, all in all, just a learning project to improve my poor C skills and as such does not represent a remotely good standard of efficient, secure and idiomatic C programming. Moreover, CIM is still very much a work in progress and currently is lacking a lot of functionality and robustness that I intend to implement eventually. If you wish to contribute or file a bug report, just raise an issue!