Skip to content

CLI reference ​

Every command of diffuse-chat, generated from the script itself. If a page here disagrees with what your terminal prints, the page is a bug: a test regenerates all of this and fails on any difference.

./diffuse-chat is the script at the root of the diffuse-chat repository. It runs from inside that directory, on the machine that runs the chat interface, which needs Docker with the compose plugin and a route to the coordinator's /v1 port.

Where to start ​

./diffuse-chat puts a chat interface in front of a deployment that already serves a model. It runs from its repository, on the machine that runs the interface:

bash
git clone https://github.com/diffuse-systems/diffuse-chat.git
cd diffuse-chat
cp .env.example .env

In .env: the coordinator's /v1 address, the path to a copy of its /etc/diffuse/ca.crt, and the key from one of the two cases below.

Chat on your own machine, with one key ​

On the coordinator, give an application a key named chat, and put it in .env as DIFFUSE_TOKEN. Then, here:

bash
./diffuse-chat up
./diffuse-chat doctor

up starts it on http://127.0.0.1:3080; the first account created there closes registration behind it. doctor says what works, and what does not with the reason.

Chat for an organisation, as each person ​

The deployment then records who asked, not which key. On the coordinator, a key that acts for each person, in .env as DIFFUSE_GATEWAY_TOKEN, and the people it acts for. Then, here:

bash
./diffuse-chat up --enterprise
./diffuse-chat doctor

up --enterprise: registration stays closed, and somebody not imported on the coordinator is refused by it. doctor reads the profile from what is running.

After changing .env ​

A new key, a moved coordinator, a new title: the same up again recreates what it configured. With the flag of the profile that runs, because up without --enterprise starts the one-key profile.

bash
./diffuse-chat up --enterprise
./diffuse-chat doctor

up · doctor

Stop it, or remove it ​

bash
./diffuse-chat down
./diffuse-chat down --volumes

down keeps the conversations and the accounts; with --volumes they go with it.

up ​

Start the stack.

bash
./diffuse-chat up

doctor ​

Check what is actually working.

bash
./diffuse-chat doctor

down ​

Stop the stack.

bash
./diffuse-chat down

Diffuse Enterprise is commercial software. Diffuse Open is AGPL-3.0.