Home

Awesome

NanoChat

NanoChat is a peer-to-peer, end-to-end encrypted and discoverable chat application that can be used inside command line. It is totally server-less and every peer can discover other peers in the same subnet without having the network address of them in advance.

It can be compiled and works on both Linux and OSX system platforms.

How to use

Call nanochat with desired flags. In order to see the list of available flags, use --help as follows:

NanoChat help
-------------
Avaliable flags:
    Help:          -h --help
    Host IP:       -H --host {host IP}
    Broadcast IP:  -B --broadcast {broadcast IP}
    RPC Port:      -P --port {port}
    Discoverable:  -d --discoverable
    Secure:        -s --secure

In order to see available commands inside NanoChat use /help command as follows:

$ nanochat --discoverable
NanoChat shell was started.
>> /help
Available commands:
  /help                    prints this text
  /probe                   find online peers
  /list peers              list online peers
  /list rooms              list availabe rooms
  /connect {host} {port}   connect to remote client
  /attach {room}           attach to room
  /quit                    quit nanochat console
>> ...

Installation

NanoChat uses GNU Autotools. So you need to have them installed in your system. Also it needs GCC or Clang, GNU Make and GNU Readline library. Other dependencies are included in the NanoChat/lib directory and will be compiled and linked with autotools automatically. So there is no need to get and build it manually.

Debian dependencies:

$ apt-get install gcc make automake autoconf libreadline-dev

Fedora dependencies:

$ yum install gcc make automake autoconf libreadline-devel

OSX dependencies:

$ port install gcc make automake autoconf readline

After making sure that your system has required dependencies, clone the repo and follow installation steps:

$ git clone https://github.com/hamidreza-s/NanoChat.git
$ cd NanoChat
$ autoreconf -i
$ ./configure
$ make && make install
...
=============================================================
|            NanoChat was successfully installed 
-------------------------------------------------------------
| NanoChat was installed in /usr/local/bin directory. 
| Just type 'nanochat --help' there to get started.
=============================================================

Now nanochat executable file is accessible in the path of your shell.

How it works

My main purpose for writing NanoChat is learning things, so I think it is good to know for you how it works and what tools and protocols it uses.

Contribution

Comments, contributions and patches are greatly appreciated.

License

The MIT License (MIT).