Sonar command line client

The command line client is an open source script that will help you take advantage of the Sonar API.

At the moment, sonar-cli allows you to list your new messages. It does not support sending messages.

Download & install

You can use your browser or your command line to download the script.

You can download the script from the following urls:

https://sonarmsniko2lvfu.tor2web.io:8443/sonar-cli.sh.gz
https://sonarmsng5vzwqezlvtu2iiwwdn3dxkhotftikhowpfjuzg7p3ca5eid.tor2web.io:8443/sonar.cli.sh.gz

You can verify the checksum after download:

# sha256sum sonar-cli.sh.gz 
a86b272b9d2edc11f008c2577b529ca3b4fc6f37ee5fe823d1316f78ace86458  sonar-cli.sh.gz

Once you download the script, you need to uncompress it:

gunzip sonar-cli.sh.gz

And then assign the correct permissions:

chmod 750 sonar-cli.sh
Configure

Now you need to add your api key to the script. Edit the script with your text editor and add your api key in the api_key variable, it should look like this:

api_key="";

When you add your api key between the quotes, it will look similar to this:

api_key="lk7a86ef455b235108eac289839051d1b5cbda20";
Usage

Now the installation is finished and you can run the script with the following command:

./sonar-cli.sh

If you don't have new messages, you will receive the following output:

Trying mirror 1...
There are no new messages

If you have new messages, the output will be like this:

Trying mirror 1...
{"1":{"from":"guest-d89c3c31aa","date":"2020-03-16"}}

If you have new messages and jq installed, you get a nicer output like this instead:

Trying mirror 1...
{
  "1": {
    "from": "guest-d89c3c31aa",
    "date": "2020-03-16"
  }
}
Security

It is important to protect your API key. If somebody gets access to your API key, they will be able to:

Even if somebody has access to your key, they won't be able to:

Questions

For more information about the API, you can check our API documentation.

If you have any question, do not hesitate to contact us using our contact form.



The private PGP key is stored encrypted so even if the server gets hacked the hacker gets no keys.
For higher security, you can manually encrypt the messages with PGP.


PGP key · FAQ · Contact Us · Donate · API · Sonar-cli

Sonar is listed on
Dark Eye · Raptor