CLI commandline-interface / websocket interface etc / Node.JS client

FEATURE REQUESTS

  • Run Jami on Debian (desktop or terminal (without X session)) then connect to it via websocket or UNIX socket / whatever, then have the ability to list messages, receive a constant stream of new messages, and send messages.

  • Node.JS NPM module so I can create a standalone Node.JS Jami bot that can send/receive messages.

  • Ability to run Jami from a bash script, and simply send a message: jami-send abc123 'Install complete!'

  • Group chat

  • Create a group with self only (so bots can send me messages)

node.js already exists and you can also use it in a bash script. there is some different APIs like REST, dbus (where bash, python, etc can be used), JNI.

For node, https://review.jami.net/admin/repos/jami-web

Python example: tools/jamictrl · master · savoirfairelinux / jami-daemon · GitLab

GitHub - AmarOk1412/jami-cli: Jami client for terminal another example

The two latest will be available with swarm.

3 Likes

What @sblin said is correct.

A Rust tool that can be used from the CLI is jami-cli. It is a TUI to use Jami from the Terminal with a Jami GUI front end. It can be found here
github.com/AmarOk1412/jami-cli and here GitHub - 8go/jami-cli: Jami client for terminal (sending text messages and sending files has been tested in Aug 2024).

Python tools that can be used from the CLI are here git.jami.net/savoirfairelinux/ring-daemon/-/tree/master/tools/jamictrl and here github.com/savoirfairelinux/jami-daemon/tree/master/tools/jamictrl and here github.com/8go/jami-daemon/tree/master/tools/jamictrl .

jami-daemon/tools/jamictrl at master · 8go/jami-daemon · GitHub contains 2 small Python programs sendtext.py and sendfile.py to send messages and files to swarms from the CLI. These 2 programs have been tested on Linux with peers on Android in Aug 2024.

This is not a lot, but it is the minimum for a bot to send text and files to Jami swarms.

Also it is enough to set everything up on a headless server like a Raspberry Pi without a monitor and all through SSH. This includes creating account, creating conversation, sending invites, send text and files to the conversation swarm.

2 Likes

There is now a Python package available at PyPi for easy installation. This package has some functionality, but certainly far from being complete.

Have a look at:

Install via command pip install jami-commander

PyPi page has a link to the source code: GitHub - 8go/jami-commander: simple but convenient CLI-based Jami client app for setting up accounts and swarms as well as sending

1 Like