Commands

One command for your keys, the server and the screens.

How to run it

  • In the turjuman folder: pnpm turjuman <command>.
  • With Docker: the make helpers below. make cli ARGS="<command>" runs any other command in the container.
  • Every command takes --help, and pnpm turjuman help <command> does the same. A wrong option stops the command with exit code 2.
  • Every option, the config folders and the exit codes: docs/cli.md.

Get going

Optional: saves your Soniox key after checking it, and creates the first admin account (both can also be done in the app). The key never goes on the command line: it is typed, or read from a file.

pnpm turjuman setuppnpm turjuman setup --checkpnpm turjuman setup --yes --soniox-key-file ~/keys/soniox.txt

Starts Turjuman and prints where to open the app, then a log line for each request. Ctrl-C stops it. The first start makes config.yaml and downloads the Quran data in the background. Another port: server.port in config.yaml.

pnpm turjuman start

Opens the dashboard, the screen builder or the look editor in your browser.

pnpm turjuman openpnpm turjuman open builderpnpm turjuman open look

Checks the setup: config, the Soniox key, HTTPS certificate, Quran data, ffmpeg, the port and the connection to Soniox. Without --online it only checks that a key is set; --online also asks Soniox whether it accepts your key. Nothing is billed. It exits with 1 when a line says [FAIL].

pnpm turjuman doctorpnpm turjuman doctor --online

Screens

screens list

All options

Every screen: its id, name, languages, on or off, and screen link (the SCREEN LINK column). --json gives the same as JSON.

pnpm turjuman screens listpnpm turjuman screens list --json

screens add

All options

Makes a screen and prints its screen link (Screen link for OBS: …). It starts off unless you give --enable.

pnpm turjuman screens add --name "Main hall" --from ar --to nl --enablepnpm turjuman screens add --name "Sisters" --from ar --to en --preset mosque-light --layout rollup

screens url

All options

Prints only the screen link. When the links use HTTPS, --local prints the http://127.0.0.1 link instead, for OBS on the computer that runs Turjuman.

pnpm turjuman screens url "Sisters"pnpm turjuman screens url "Sisters" --local

screens enable · disable

All options

Switches a screen on or off; open pages follow within a few seconds.

pnpm turjuman screens enable Sisterspnpm turjuman screens disable Sisters

screens rm

All options

Deletes a screen; its link stops working. It asks first, unless you give --yes.

pnpm turjuman screens rm Sisters --yes

An <id> can also be the screen's exact name.

Accounts

Accounts for the app: add, list, passwd and remove. A password is read from piped input, or generated and shown once.

pnpm turjuman users add imam --adminpnpm turjuman users listpnpm turjuman users passwd imam

Caption pages without a screen link

keys · usage

All options

Access keys for caption pages without a screen link, needed only with exposure: lan or public, and the minutes each one used. These are not your Soniox key.

pnpm turjuman keys add --label "Mosque OBS" --daily-minutes 120pnpm turjuman keys listpnpm turjuman usagepnpm turjuman keys revoke <id>

For hosted servers

Only on a server that hosts many mosques: the mosques, and switching one off or on again.

pnpm turjuman orgs listpnpm turjuman orgs disable <id>pnpm turjuman orgs enable <id>

More commands

status shows whether the server runs; sessions the recent sessions; estimate start the cost per minute; run starts the server without the app addresses. For server-side capture and testing: devices, ctl, record and replay. status and ctl use the admin token Turjuman made itself (admin.token, with exposure lan or public); nothing to paste. See docs/cli.md; pnpm turjuman --version prints the version.

make helpers (Docker)

With Docker, run these in the turjuman folder; on Windows, from Git Bash. The first make up sets everything up; Docker explains the start.

  • make upBuild and start, the first time too: it makes config/, data/ and .env when they are missing. It returns once Turjuman is healthy.
  • make downStop Turjuman; a running session is finished first.
  • make restartRestart, for example after a change in config/config.yaml.
  • make adminOpen the app. With exposure local, the first visit creates the admin account; on the network, use make user-add. make app does the same.
  • make keysEnter your Soniox key (checked with Soniox, saved in config/.env); Turjuman then restarts.
  • make statusThe container's state and health: sessions, audio.
  • make logsFollow the logs.
  • make screensThe screens, with their screen links.
  • make usersThe accounts of the app.
  • make quran-dataDownload the Quran text and translations again. Not needed: Turjuman downloads what is missing by itself when it starts.
  • make updategit pull, rebuild, restart, and wait until healthy.
  • make backupArchive config/ and the transcripts to backups/, without .env, keys.yaml, master.key and admin.token.
  • make doctorCheck the setup: config, key, HTTPS certificate, Quran data, the connection to Soniox. Of the key it only checks that it is set.
  • make doctor ONLINE=1The same, and it also asks Soniox whether it accepts your key. Nothing is billed.
  • make cli ARGS="screens enable <id>"Any turjuman command, run in the container. make cli ARGS=--help lists them.
  • make lan-certHTTPS on the LAN: a local CA and a certificate in config/tls. On Windows, add LAN_NAMES="<IP>" with this computer's address.
  • make helpEvery helper and variable.